Get contract from consumption lines when create an invoice

#045111
This commit is contained in:
Raimon Esteve 2021-07-07 13:23:14 +02:00 committed by GitHub
parent 88aac31bca
commit 08589d08ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,8 +57,8 @@ class ContractConsumption(metaclass=PoolMeta):
]
@classmethod
def _get_invoice(cls, keys):
invoice = super(ContractConsumption, cls)._get_invoice(keys)
def _get_invoice(cls, keys, lines):
invoice = super(ContractConsumption, cls)._get_invoice(keys, lines)
values = dict(keys)
invoice.payment_type = values['payment_type']
invoice.bank_account = values['bank_account']