摘要: 一。 类似于前面有个_ 的方法,格式是如下def _getdlvqty(self, cr, uid, ids, field_names, args, context=None): def _get_planqty(self, cr, uid, ids, field_names, args, cont 阅读全文
posted @ 2017-06-20 23:17 何双新 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 这是追踪信息用的查询语句,__init__方法初始化作用_order ="hpartner_id desc"def init(self,cr): tools.sql.drop_view_if_exists(cr, 'cust_product_info_report') cr.execute(""" 阅读全文
posted @ 2017-06-20 22:59 何双新 阅读(1853) 评论(0) 推荐(0) 编辑
摘要: def action_partner_account_state(self,cr,uid,context=None): cr.execute(""" select id from res_partner where is_company='t' and customer='t' and active 阅读全文
posted @ 2017-06-20 22:22 何双新 阅读(181) 评论(0) 推荐(0) 编辑
摘要: append()用法示例: >>> mylist = [1,2,0,'abc'] >>> mylist [1, 2, 0, 'abc'] >>> mylist.append(4) >>> mylist [1, 2, 0, 'abc', 4] >>> mylist.append('haha') >>> 阅读全文
posted @ 2017-06-20 22:10 何双新 阅读(744) 评论(0) 推荐(0) 编辑
摘要: 一。在主表中#改动地方 总结算金额 求和:def _get_subtotal2(self, cr, uid, ids, field_name, arg, context=None): # 初始化 res = {} # 获取本页面单据 for order in self.browse(cr, uid, 阅读全文
posted @ 2017-06-20 08:16 何双新 阅读(1733) 评论(0) 推荐(0) 编辑
摘要: def create(self,cr,uid,vals,context=None): if context is None: context ={} print 111111 print vals[] if vals.get('lx_origin', '/') == '/' : vals['lx_o 阅读全文
posted @ 2017-06-09 10:40 何双新 阅读(1022) 评论(0) 推荐(0) 编辑
摘要: 'product_id':fields.many2one('product.product',u'产品',domain=[('sale_ok', '=', True)],required=True,),'pname': fields.related('product_id', 'pname',rel 阅读全文
posted @ 2017-06-06 08:23 何双新 阅读(265) 评论(0) 推荐(0) 编辑
摘要: <style type="text/css"> .tg {border-collapse:collapse;border-spacing:0;} .tg td{font-family:Arial, sans-serif;font-size:14px;padding:12px 14px;border- 阅读全文
posted @ 2017-06-05 12:39 何双新 阅读(1246) 评论(0) 推荐(0) 编辑
摘要: sql2=" UPDATE sigining_contract SET accumulated_amount='%d',accumulated_pay='%d',discount=(contract_amount-'%d') where contract_origin='%s'"%(JT,PT,PT 阅读全文
posted @ 2017-06-04 18:37 何双新 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 单独的seq。xml文件<?xml version="1.0" encoding="utf-8"?><openerp> <data noupdate="1"><!-- Sequences for demo_contract_lx --> <record id="seq_type_demo_contr 阅读全文
posted @ 2017-06-04 17:44 何双新 阅读(1498) 评论(0) 推荐(0) 编辑