[FIX] purchase : be able to use it with MPS
Since procurement group is passed by the optional values in the procurement proccess it should be considered as optional MPS do not use procurement group because they will add the planification in an existing RFQ it will fail because purchase search for the key 'group_id' in values opw-1833060
This commit is contained in:
@@ -1016,7 +1016,7 @@ class ProcurementRule(models.Model):
|
||||
|
||||
gpo = self.group_propagation_option
|
||||
group = (gpo == 'fixed' and self.group_id.id) or \
|
||||
(gpo == 'propagate' and values['group_id'].id) or False
|
||||
(gpo == 'propagate' and 'group_id' in values and values['group_id'].id) or False
|
||||
|
||||
return {
|
||||
'partner_id': partner.id,
|
||||
@@ -1041,7 +1041,7 @@ class ProcurementRule(models.Model):
|
||||
domain = super(ProcurementRule, self)._make_po_get_domain(values, partner)
|
||||
gpo = self.group_propagation_option
|
||||
group = (gpo == 'fixed' and self.group_id) or \
|
||||
(gpo == 'propagate' and values['group_id']) or False
|
||||
(gpo == 'propagate' and 'group_id' in values and values['group_id']) or False
|
||||
|
||||
domain += (
|
||||
('partner_id', '=', partner.id),
|
||||
|
||||
Reference in New Issue
Block a user