mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
update translate,update common
This commit is contained in:
@@ -14,14 +14,15 @@ class MrpWorkCenter(models.Model):
|
|||||||
_parent_name = "parent_id"
|
_parent_name = "parent_id"
|
||||||
_parent_store = True
|
_parent_store = True
|
||||||
_parent_order = 'code'
|
_parent_order = 'code'
|
||||||
|
_order = 'parent_path, code'
|
||||||
|
|
||||||
parent_id = fields.Many2one('mrp.workcenter', 'Parent WC', index=True, ondelete='cascade')
|
parent_id = fields.Many2one('mrp.workcenter', 'Parent WC', index=True, ondelete='restrict')
|
||||||
parent_path = fields.Char(index=True)
|
parent_path = fields.Char(index=True)
|
||||||
child_ids = fields.One2many('mrp.workcenter', 'parent_id', 'Child WCs')
|
child_ids = fields.One2many('mrp.workcenter', 'parent_id', 'Child WCs')
|
||||||
child_all_count = fields.Integer(
|
child_all_count = fields.Integer(
|
||||||
'Indirect Surbordinates Count',
|
'Indirect Surbordinates Count',
|
||||||
compute='_compute_child_all_count', store=False)
|
compute='_compute_child_all_count', store=False)
|
||||||
level = fields.Integer('Level', compute='_compute_level', inverse=False, default=0, readonly=True, store=True)
|
level = fields.Integer('Level', compute='_compute_level', inverse=False, readonly=True, store=True)
|
||||||
|
|
||||||
@api.depends('child_ids.child_all_count')
|
@api.depends('child_ids.child_all_count')
|
||||||
def _compute_child_all_count(self):
|
def _compute_child_all_count(self):
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//search">
|
<xpath expr="//search">
|
||||||
<searchpanel view_types="tree">
|
<searchpanel view_types="tree">
|
||||||
|
<field name="code"/>
|
||||||
<field name="warehouse_id" groups="stock.group_stock_multi_warehouses"/>
|
<field name="warehouse_id" groups="stock.group_stock_multi_warehouses"/>
|
||||||
</searchpanel>
|
</searchpanel>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|||||||
Reference in New Issue
Block a user