Fix submit electronic
This commit is contained in:
parent
025a61c15b
commit
72b5852bc6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue