2024-05-16 14:07:59 发布
网友
如何在OCA模块wchich字段中添加阶段“新建”:
stage_id = fields.Many2one( 'mgmtsystem.action.stage', 'Stage', track_visibility='onchange', index=True, copy=False, default=lambda self: self._default_stage(), group_expand='_stage_groups', )
谢谢
如果您使用自己的模块来扩展它,那么它就是这样的
<?xml version="1.0" encoding="utf-8"?> <odoo> <! It mofifies the original starting stage to be second and to be nonstarting > <record id="mgmtsystem_action.stage_draft" model="mgmtsystem.action.stage"> <field name="sequence">1</field> <field name="is_starting" eval="False" /> </record> <record id="stage_new" model="mgmtsystem.action.stage"> <field name="name">New</field> <field name="sequence">0</field> <field name="is_starting" eval="True" /> <field name="is_ending" eval="False" /> </record> </odoo>
如果可以编辑原始模块,请编辑mgmtsystem_action_stage.xml文件:
https://github.com/OCA/management-system/blob/13.0/mgmtsystem_action/data/mgmtsystem_action_stage.xml
如果您使用自己的模块来扩展它,那么它就是这样的
如果可以编辑原始模块,请编辑mgmtsystem_action_stage.xml文件:
https://github.com/OCA/management-system/blob/13.0/mgmtsystem_action/data/mgmtsystem_action_stage.xml
相关问题 更多 >
编程相关推荐