[9.0] account_mass_reconcile_by_purchase_line: do not consider partner.

This commit is contained in:
lreficent
2017-09-01 11:47:39 +02:00
committed by Don Kendall
parent b104e4f2f2
commit ac0c3f165c
2 changed files with 4 additions and 6 deletions

View File

@@ -13,6 +13,6 @@ class AccountMassReconcileMethod(models.Model):
methods = super(AccountMassReconcileMethod, self)._get_all_rec_method()
methods += [
('mass.reconcile.advanced.by.purchase.line',
'Advanced. Partner, product, purchase order line.'),
'Advanced. Product, purchase order line.'),
]
return methods

View File

@@ -16,17 +16,15 @@ class MassReconcileAdvancedByPurchaseLine(models.TransientModel):
will be skipped for reconciliation. Can be inherited to
skip on some conditions. ie: ref or partner_id is empty.
"""
return not (move_line.get('partner_id') and move_line.get(
'product_id') and move_line.get('purchase_line_id'))
return not (move_line.get('product_id') and
move_line.get('purchase_line_id'))
@api.multi
def _matchers(self, move_line):
return (('partner_id', move_line['partner_id']),
('product_id', move_line['product_id']),
return (('product_id', move_line['product_id']),
('purchase_line_id', move_line['purchase_line_id']))
@api.multi
def _opposite_matchers(self, move_line):
yield ('partner_id', move_line['partner_id'])
yield ('product_id', move_line['product_id'])
yield ('purchase_line_id', move_line['purchase_line_id'])