上一页 1 ··· 3 4 5 6 7
摘要: 有句话经典的概括了这段代码的意义: “Make a script both importable and executable” 意思就是说让你写的脚本模块既可以导入到别的模块中用,另外该模块自己也可执行。 这句话,可能一开始听的还不是很懂。下面举例说明: 先写一个模块: 这个函数定义了一个main 阅读全文
posted @ 2017-05-19 17:24 553490191 阅读(121) 评论(0) 推荐(0) 编辑
摘要: * context 这是一个上下文,运用很灵活 * 得到整个context V7 context=dict(context or {}) 这个版本是明传 V8 self.context_get() self.env['res.users'].context_get() * 得到context里面对应 阅读全文
posted @ 2017-05-19 16:34 553490191 阅读(272) 评论(0) 推荐(1) 编辑
摘要: Examples Generating Excel Documents Using Python’s xlwt Here are some simple examples using Python’s xlwt library to dynamically generate Excel documents. Please note a useful alternative may be ez... 阅读全文
posted @ 2017-05-17 10:52 553490191 阅读(323) 评论(0) 推荐(0) 编辑
摘要: python 对 excel基本的操作如下: 1、python读取excel中单元格内容为日期的方式 python读取excel中单元格的内容返回的有5种类型,即上面例子中的ctype: ctype : 0 empty,1 string, 2 number, 3 date, 4 boolean, 5 阅读全文
posted @ 2017-05-17 10:13 553490191 阅读(248) 评论(0) 推荐(0) 编辑
摘要: get_object_reference是 ir.model.data 模块中下的一个函数 该函数通过调用ir.model.data 模块中另外一个函数 xmlid_lookup 返回结果 返回的是 xml 视图id model res_id 实例: 在odoo里有很多类似例子,用它来返回一个for 阅读全文
posted @ 2017-05-17 09:15 553490191 阅读(435) 评论(0) 推荐(0) 编辑
摘要: Python算术运算符 以下假设变量: a=10,b=20: 以下实例演示了Python所有算术运算符的操作: 实例(Python 2.0+) #!/usr/bin/python # -*- coding: UTF-8 -*- a = 21 b = 10 c = 0 c = a + b print 阅读全文
posted @ 2017-05-11 17:04 553490191 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 用法: $("div:contains('John')") 测试HTML文件: <div>john</div> <div>John</div> <div>hey hey JOHN hey hey</div> 阅读全文
posted @ 2017-05-11 09:32 553490191 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 1.数组中的each [javascript] view plain copy var arr = [ "one", "two", "three", "four"]; $.each(arr, function(){ alert(this); }); //上面这个each输出的结果分别为:one,tw 阅读全文
posted @ 2017-05-10 11:04 553490191 阅读(460) 评论(0) 推荐(0) 编辑
摘要: // 在OpenERP的Web框架内, // 通过声明一个函数来声明一个JavaScript模块【openerp.ext_picking就是这个JS模块】, // 并把这个函数放在全局变量openerp的属性内. // 这个属性名称必须和OpenERP addon 模块名称一致【文件夹就是ext_picking】 // 【采用匿名函数封装,函数openerp_ext_picking_widget... 阅读全文
posted @ 2017-05-10 09:09 553490191 阅读(509) 评论(0) 推荐(0) 编辑
摘要: 1.web 模块 注意,OpenERP 模块中 web 部分用到的所有文件必须被放置在模块内的 static 文件夹里。这是强制性的,出于安全考虑。 事实上,我们创建的文件夹 CSS,JS 和 XML,仅仅是一个习惯。 static文件夹 oepetstore/static/css/petstore 阅读全文
posted @ 2017-04-18 09:47 553490191 阅读(653) 评论(0) 推荐(0) 编辑
摘要: * 概述 QWeb是odoo主要模板引擎,采用xml表述,最后生成HTML文件 * 一般用法 #条件表达式 比较符号: lt(<) lte(<=) gt(>) gte(>=) 注 < <= 不能用在表达式中,只能用字母代替 # 输出值 t-esc 和 t-raw <t t-esc="record.m 阅读全文
posted @ 2017-04-13 09:38 553490191 阅读(2942) 评论(1) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7