[FIX] point_of_sale: do not read undefined fields
Oversight of previous forward-port.
This commit is contained in:
@@ -334,11 +334,11 @@ class PosOrder(models.Model):
|
||||
|
||||
def _reconcile_payments(self):
|
||||
for order in self:
|
||||
aml = order.statement_ids.mapped('journal_entry_ids').mapped('line_ids') | order.account_move.line_ids | order.invoice_id.move_id.line_ids
|
||||
aml = order.statement_ids.mapped('journal_entry_ids') | order.account_move.line_ids | order.invoice_id.move_id.line_ids
|
||||
aml = aml.filtered(lambda r: not r.reconciled and r.account_id.internal_type == 'receivable' and r.partner_id == order.partner_id.commercial_partner_id)
|
||||
try:
|
||||
aml.reconcile()
|
||||
except:
|
||||
except Exception:
|
||||
# There might be unexpected situations where the automatic reconciliation won't
|
||||
# work. We don't want the user to be blocked because of this, since the automatic
|
||||
# reconciliation is introduced for convenience, not for mandatory accounting
|
||||
|
||||
Reference in New Issue
Block a user