good afternoon,
I have a calculated field in the invoice detail (account_invoice_line) that works correctly when the invoice is created from the invoicing module.
but when generated automatically from the point of sale, this calculated invoice field is not generated and is blank.
How can I call a custom function from the account_invoice_line from the sales order line.
I will pass a field, but I don't know how to call a function. I will appreciate your help.
Thank you.
*sale.order.line
def _prepare_invoice_line(self, qty):
res=super(sale_send_value,self)._prepare_invoice_line(qty)
res.update({'_my_function': #how to call custom function accoun_invoice_line#})
*account_invoice_line
@api.one
@api.depends('invoice_line_tax_ids','quantity')
def _my_function(self):
new_field=price_unit*3