Minor fix not reconcile without origin

This commit is contained in:
oscar alvarez 2023-06-27 19:26:09 -05:00
parent c5d1fe9701
commit 2b49f48240
1 changed files with 7 additions and 0 deletions

View File

@ -104,6 +104,10 @@ class Invoice(metaclass=PoolMeta):
def _post(cls, invoices):
for invoice in invoices:
lines_ids = None
if invoice.type == 'in':
super()._post([invoice])
continue
if invoice.type == 'out' and invoice.agent:
lines_ids = cls.process_offset_move(invoice)
@ -114,6 +118,9 @@ class Invoice(metaclass=PoolMeta):
invoice._add_commission_payment()
cls.set_booking_payments(invoice)
print("intentando reocnciliar auto.....", invoice.state)
if not invoice.move.origin:
return
invoice.auto_reconcile()
@classmethod