解决工艺外协采购单不显示的问题
This commit is contained in:
@@ -440,12 +440,12 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
action['context'] = dict(self._context, default_origin=self.name)
|
action['context'] = dict(self._context, default_origin=self.name)
|
||||||
return action
|
return action
|
||||||
|
|
||||||
@api.depends('state', 'production_id.name')
|
|
||||||
def _compute_surface_technics_purchase_ids(self):
|
def _compute_surface_technics_purchase_ids(self):
|
||||||
for order in self:
|
for order in self:
|
||||||
if order.routing_type == '表面工艺' and order.state not in ['cancel']:
|
if order.routing_type == '表面工艺' and order.state not in ['cancel']:
|
||||||
domain = [('group_id', '=', self.production_id.procurement_group_id.id),
|
domain = [('purchase_type', '=', 'consignment'),
|
||||||
('purchase_type', '=', 'consignment'), ('state', '!=', 'cancel')]
|
('origin', 'like', '%' + self.production_id.name + '%'),
|
||||||
|
('state', '!=', 'cancel')]
|
||||||
# domain = [('purchase_type', '=', 'consignment'),
|
# domain = [('purchase_type', '=', 'consignment'),
|
||||||
# ('origin', 'like', '%' + self.production_id.name + '%'),
|
# ('origin', 'like', '%' + self.production_id.name + '%'),
|
||||||
# ('state', '!=', 'cancel')]
|
# ('state', '!=', 'cancel')]
|
||||||
|
|||||||
Reference in New Issue
Block a user