123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <openerp>
- <data>
- <!-- explicit list view definition -->
- <record model="ir.ui.view" id="archives_work_logic_setting_list">
- <field name="name">控制设置列表</field>
- <field name="model">archives.work_logic_setting</field>
- <field name="arch" type="xml">
- <tree>
- <field name="name"/>
- <field name="available"/>
- <field name="module_id"/>
- <field name="model_id"/>
- <field name="run_before_method"/>
- <field name="not_replace_method"/>
- <field name="work_logic_type_id"/>
- </tree>
- </field>
- </record>
- <record model="ir.ui.view" id="archives_work_logic_setting_edit">
- <field name="name">控制设置新建</field>
- <field name="model">archives.work_logic_setting</field>
- <field name="arch" type="xml">
- <form>
- <header>
- <field name="id" attrs="{'invisible': True}"/>
- <field name="available" attrs="{'invisible': True}"/>
- </header>
- <sheet>
- <notebook>
- <page name="控制设置" string="控制设置">
- <group name="group_top" col="4">
- <field name="module_id" options="{'no_open':True,'no_create':True}"/>
- <field name="model_id" options="{'no_open':True,'no_create':True}"/>
- <field name="company_id" options="{'no_open':True,'no_create':True}" readonly="1"/>
- <field name="work_logic_type_id" options="{'no_open':True,'no_create':True}"/>
- <field name="run_before_method"/>
- <field name="not_replace_method"/>
- <field name="code_flag" options="{'no_open':True,'no_create':True}" invisible="1"/>
- <field name="code1_flag" options="{'no_open':True,'no_create':True}" invisible="1"/>
- <field name="code2_flag" options="{'no_open':True,'no_create':True}" invisible="1"/>
- <field name="code3_flag" options="{'no_open':True,'no_create':True}" invisible="1"/>
- <field name="code4_flag" options="{'no_open':True,'no_create':True}" invisible="1"/>
- <field name="code5_flag" options="{'no_open':True,'no_create':True}" invisible="1"/>
- <field name="code6_flag" options="{'no_open':True,'no_create':True}" invisible="1"/>
- <field name="code7_flag" options="{'no_open':True,'no_create':True}" invisible="1"/>
- <field name="code8_flag" options="{'no_open':True,'no_create':True}" invisible="1"/>
- <field name="code" widget="ace" options="{'mode': 'python'}" colspan="4"
- attrs="{'invisible': [('code_flag','!=',True)]}"/>
- <field name="code1" widget="ace" options="{'mode': 'python'}" colspan="4"
- attrs="{'invisible': [('code1_flag','!=',True)]}"/>
- <field name="code2" widget="ace" options="{'mode': 'python'}" colspan="4"
- attrs="{'invisible': [('code2_flag','!=',True)]}"/>
- <field name="code3" widget="ace" options="{'mode': 'python'}" colspan="4"
- attrs="{'invisible': [('code3_flag','!=',True)]}"/>
- <field name="code4" widget="ace" options="{'mode': 'python'}" colspan="4"
- attrs="{'invisible': [('code4_flag','!=',True)]}"/>
- <field name="code5" widget="ace" options="{'mode': 'python'}" colspan="4"
- attrs="{'invisible': [('code5_flag','!=',True)]}"/>
- <field name="code6" widget="ace" options="{'mode': 'python'}" colspan="4"
- attrs="{'invisible': [('code6_flag','!=',True)]}"/>
- <field name="code7" widget="ace" options="{'mode': 'python'}" colspan="4"
- attrs="{'invisible': [('code7_flag','!=',True)]}"/>
- <field name="code8" widget="ace" options="{'mode': 'python'}" colspan="4"
- attrs="{'invisible': [('code8_flag','!=',True)]}"/>
- </group>
- </page>
- <page string="字段对照">
- <group name="group_top" col="2">
- <field name="model_detail_id" options="{'no_open':True,'no_create':True}"/>
- <field name="field_contrast" colspan="4"/>
- </group>
- </page>
- <page string="说明">
- <field name="code_content" widget="ace" options="{'mode': 'python'}"/>
- <div style="color:rgb(170,170,170)">
- <div>
- <span style="color:red">事例:</span>
- </div>
- <div style="margin-left:16%">
- </div>
- <div>
- <div>
- <span style="color:black">1、[销售订单明细]{单价}不能低于{原价} 的比例
- 10(%)
- </span>
- <div>
- <div>if self.detail:</div>
- <div style="margin-left:20px">
- for rec in self.detail:
- </div>
- <div style="margin-left:40px">
- if rec.price < rec.origin_price *0.1:
- </div>
- <div style="margin-left:60px">
- raise ValidationError('[销售订单明细]{单价}不能低于{原价} 的比例
- 10(%)')
- </div>
- </div>
- </div>
- <div>
- <span style="color:black">2、[销售订单明细]{单价}为0不能审核 :</span>
- </div>
- <div>
- <div>if self.detail:</div>
- <div style="margin-left:20px">
- for rec in self.detail:
- </div>
- <div style="margin-left:40px">
- if not rec.price:
- </div>
- <div style="margin-left:60px">
- raise ValidationError('[销售订单明细]{单价}为0不能审核')
- </div>
- </div>
- <div>
- <span style="color:black">3、[销售订单]保存时,明细产品不允许重复</span>
- </div>
- <div>
- <div>if self.detail:</div>
- <div style="margin-left:20px">
- ids = self.detail.mapped('goods_id').ids
- </div>
- <div style="margin-left:40px">
- if len(ids) != len(self.detail):
- </div>
- <div style="margin-left:60px">
- raise ValidationError('3、[销售订单]保存时,明细产品不允许重复')
- </div>
- </div>
- </div>
- </div>
- </page>
- </notebook>
- </sheet>
- </form>
- </field>
- </record>
- <record model="ir.ui.view" id="work_logic_setting_search_view">
- <field name="name">archives.work_logic_setting.search</field>
- <field name="model">archives.work_logic_setting</field>
- <field name="arch" type="xml">
- <search>
- <field name="name" filter_domain="['|', ('spell', 'ilike', self), ('name', 'ilike', self)]"/>
- <field name="module_id"/>
- <field name="model_id"/>
- <field name="work_logic_type_id"/>
- </search>
- </field>
- </record>
- <!-- actions opening views on models -->
- <record model="ir.actions.act_window" id="archives_work_logic_setting_action_window">
- <field name="name">控制设置</field>
- <field name="res_model">archives.work_logic_setting</field>
- <field name="view_mode">tree,form</field>
- </record>
- <!-- actions -->
- <menuitem name="控制设置" id="archives.menu_work_logic_setting" parent="archives.menu_system"
- action="archives_work_logic_setting_action_window" sequence="14"/>
- </data>
- </openerp>
|