update common

This commit is contained in:
ivan deng
2021-01-15 14:30:31 +08:00
parent 18b5bec7f4
commit b8ae3fde85
3 changed files with 3 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ msgstr ""
#. module: app_mrp_workcenter_zchart
#: model:ir.model.fields,field_description:app_mrp_workcenter_zchart.field_mrp_workcenter__child_ids
msgid "Child WCs"
msgstr "下级"
msgstr "层次结构"
#. module: app_mrp_workcenter_zchart
#: model:ir.model.fields,field_description:app_mrp_workcenter_zchart.field_mrp_workcenter__child_all_count

View File

@@ -21,7 +21,7 @@ class MrpWorkCenter(models.Model):
child_all_count = fields.Integer(
'Indirect Surbordinates Count',
compute='_compute_child_all_count', store=False)
level = fields.Integer('Level', compute='_compute_level', inverse='_set_level', default=0, store=True)
level = fields.Integer('Level', compute='_compute_level', inverse=False, default=0, readonly=True, store=True)
@api.depends('child_ids.child_all_count')
def _compute_child_all_count(self):

View File

@@ -8,7 +8,7 @@
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="after">
<field name="parent_id" widget="ztree_select"/>
<field name="level"/>
<field name="level" force_save="1"/>
</xpath>
<!-- 引入树结构图 -->
<xpath expr="//group[1]" position="inside">