mirror of
https://gitlab.com/flectra-community/bank-payment.git
synced 2024-11-27 16:07:27 +00:00
18 lines
586 B
Python
18 lines
586 B
Python
# © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
|
|
from flectra import models, api
|
|
|
|
|
|
class SaleAdvancePaymentInv(models.TransientModel):
|
|
_inherit = 'sale.advance.payment.inv'
|
|
|
|
@api.multi
|
|
def _create_invoice(self, order, so_line, amount):
|
|
"""Copy mandate from sale order to invoice"""
|
|
inv = super(SaleAdvancePaymentInv, self)._create_invoice(
|
|
order, so_line, amount)
|
|
if order.mandate_id:
|
|
inv.mandate_id = order.mandate_id.id
|
|
return inv
|