How to pass custom field value from sale.order.line to account.move.line in odoo 13?
23 September, 2021 by
Umme Huzaifa
| 1 Comment

Suppose, You have a field name free_quantity in sale.order.line and you have a filed with the same name in the account.move.line and you want to pass the field value to the account.move.line.

Solution: You have a function name def _prepare_invoice_line(self) in  sale.order.line, inherit it and pass your value in it like,

def _prepare_invoice_line(self):
        res = super(SaleOrderLine, self)._prepare_invoice_line()
            'free_quantity': self.free_quantity,

        return res

Hope it will help. Thanks

Umme Huzaifa
23 September, 2021
Share this post
Sign in to leave a comment