Fix submit electronic

This commit is contained in:
oscar alvarez 2022-05-19 09:06:22 -05:00
parent 025a61c15b
commit 72b5852bc6
1 changed files with 2 additions and 2 deletions

View File

@ -377,9 +377,7 @@ class Booking(Workflow, ModelSQL, ModelView):
cls.check_finished(records)
@classmethod
# @ModelView.button
def bill_to_channel(cls, records):
for rec in records:
if rec.channel_invoice or not rec.channel or \
rec.channel.collection_mode != 'anticipated':
@ -655,6 +653,8 @@ class Booking(Workflow, ModelSQL, ModelView):
invoice.save()
invoice.update_taxes([invoice])
cls.write([bk], {'channel_invoice': invoice.id})
Invoice.validate([invoice])
Invoice.submit([invoice])
Invoice.post([invoice])
@classmethod