支持的视图类型:form.tree.search ... 支持的定位方法:                  <notebook position="inside">  <xpath expr="//page[@name='page_history']" position="inside">                  <field name="mobile" position="…
视图(tree\form)中隐藏按钮( 创建.编辑.删除 )create="false" edit="false" delete="false" tree视图中启用编辑editable="top" (新增行在上) 或 editable="bottom" (新增行在下) 代码示例: <record model="ir.ui.view" id="dispatch_produc…
表格行颜色:             <tree string="请假单列表" colors="red:state == 'refuse';blue:state == 'draft';black:state in ('confirm','validate')">            <tree string="Meeting" colors="gray:state in ('cancel','done');blue:…
1.对象继承     _inherit = "product.product" 继承产品对象,给产品对象添加字段或方法,不需要设置 _name._table 等属性     注意:当继承后的子类不定义 _name 属性,则相当于在父类中增加字段和方法,并不创建新对象             当继承后的子类重新定义 _name 属性,则创建一个新的对象,新对象拥有父类中所有的字段和方法,父类不受任何影响.     _inherits = {'product.template': 'pro…
1.修改产品数量时,自动计算产品销售金额.销售成本和销售利润<field name="num" on_change="on_change_product(product, num, price)"/>2.选择历史工单时,按销售单中当前选择的客户自动过滤,打开选择历史工单窗口时,过滤条件默认为销售单中当前选择的客户<field name="work_order" domain="[('customer','=',cust…
删除菜单示例: <delete id="base.menu_module_updates" model="ir.ui.menu"/><delete id="base.module_mi" model="ir.ui.menu"/>…
title: c++学习笔记之继承篇 date: 2017-03-26 16:36:33 tags: [c++,继承,public,virtual,private,protected] categories: [学习,程序员,c++] 一 继承方式 public protected private 二 多继承和多重继承 举个例子就明白了 多继承 :农民工就算是多继承. graph TD; 人类-->农民; 人类-->工人; 农民-->农民工; 工人-->农民工; 多重继承 :小学生…
待解决:图形中当改变分组时,图例不正确            存储比率计算时,分组合计不正确 wizard:过滤条件向导,用于输入过滤条件 wizard/sale_chart.py # -*- coding: utf-8 -*-from openerp.osv import fields, osvimport datetime class dispatch_sale_chart(osv.osv_memory):    _name = "dispatch.sale.chart"    _…
自己创建的: domain="[('create_uid','=',uid)]" 自己的: domain="[('employee_id','=','#kl_user_emp#')]" 本部门的: domain="[('department_id','=','#kl_user_dept#')]" 本部门及下属部门的: domain="[('department_id','child_of','#kl_user_dept#')]"…
1.在Action中定义,context用于传递搜索条件和分组条件,在搜索视图中默认显示: 示例代码: <record model="ir.actions.act_window" id="open_company_allocation"> <field name="name">Leaves Summary</field> <field name="res_model">hr.ho…