[FIX] stock, purchase_stock: useless parent method

commit c914df5a36 introduced procurement
refactoring and a function _make_po_get_domain that is responsible to
forge a domain in order to find an existing PO that could append the
po line created by the procurement. However the function is defined in
stock and overriden in purchase_stock, purchase_requisition_stock,
mrp_mps(oe). All the module depends of purchase_stock and the method
in stock only return an empty tuple. So the method in stock could
be removed and the method in purchase_stock could become the new parent.

closes odoo/odoo#31580

Signed-off-by: "Simon Lejeune (sle)" <sle@openerp.com>
This commit is contained in:
Arnold Moyaux
2019-03-05 09:07:39 +00:00
parent 99dd3add88
commit ff63a123af
2 changed files with 1 additions and 5 deletions
+1 -2
View File
@@ -276,12 +276,11 @@ class StockRule(models.Model):
}
def _make_po_get_domain(self, company_id, values, partner):
domain = super(StockRule, self)._make_po_get_domain(company_id, values, partner)
gpo = self.group_propagation_option
group = (gpo == 'fixed' and self.group_id) or \
(gpo == 'propagate' and 'group_id' in values and values['group_id']) or False
domain += (
domain = (
('partner_id', '=', partner.id),
('state', '=', 'draft'),
('picking_type_id', '=', self.picking_type_id.id),
-3
View File
@@ -253,9 +253,6 @@ class StockRule(models.Model):
'res_model_id': self.env.ref('product.model_product_template').id,
})
def _make_po_get_domain(self, company_id, values, partner):
return ()
class ProcurementGroup(models.Model):
"""