Skip to Content
Menu
This question has been flagged
2 Replies
2352 Views

I would like to select the field customer reference that is set on the sale order and show this value on my invoice on the form view. 

Avatar
Discard
Best Answer

Find it on the Other Info Tab:


Invoice:


Sales Order:


Avatar
Discard
Best Answer

Hi,

The create _prepare_invoice in sale order creates the corresponding invoice. For passing any value from the sale order to the creating invoice inherit sale.order model and override the function. 

Try this example code

def _prepare_invoice(self):
   invoice_vals= super(SaleOrder, self)._prepare_invoice()
   invoice_vals['invoice_field_name'] = self.client_order_ref
   return invoice_vals

Regards

Avatar
Discard
Related Posts Replies Views Activity
1
Apr 25
5638
0
Mar 25
539
1
Mar 25
30
0
Mar 25
475
3
Sep 24
3544