如何在下面的示例中为模块hr_payroll添加输入(代码和名称)?
例如:输入名称为“刺激”,编码= "STM“
<record id="hr_rule_taxable" model="hr.salary.rule">
<field name="name">Gross</field>
<field name="sequence" eval="100"/>
<field name="code">GROSS</field>
<field name="category_id" ref="hr_payroll.GROSS"/>
<field name="condition_select">none</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result = categories.BASIC + categories.ALW</field>
</record>发布于 2017-12-23 14:34:34
您是否在询问如何在模块的XML中覆盖此数据的一部分?
如果是这样,可以通过使用<module_name>.<view_id>覆盖同一记录中的某些字段来完成,例如:
<record id="hr_payroll.hr_rule_taxable" model="hr.salary.rule">
<field name="name">Stimulation</field>
<field name="code">STM</field>
</record>注意:如果原始记录在 <data noupdate="1"> 块中,这将不起作用。
https://stackoverflow.com/questions/47928002
复制相似问题