Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
5141 Zobrazení

Hi, i have been trying to over_create_invoice using super in inherited wizard/sale_make_invoice_advance.py
Here is my .py code

class overrideCreateInvoice(models.TransientModel):

_inherit = 'sale.advance.payment.inv'

def _create_invoice(self, order, so_line, amount):

  res = super (overrideCreateInvoice,self)._create_invoice(order, so_line, amount)

  sale_line_obj = self.env['sale.order.line']

  res.write({'TotalWeight': sale_line_obj.TotalWeight})

  res.write({'PricePerUnit': sale_line_obj.PricePerUnit})

i have two custom field both of these field were added in sale order line and account invoice line

however, values still not propagate please help

thank you

Avatar
Zrušit
Nejlepší odpověď

Hi Vootipong,


Please see my answer here: https://www.odoo.com/forum/help-1/question/how-to-transfer-data-from-sale-order-to-invoice-when-clicking-on-create-invoice-85740#answer-85787


Thanks,

Peter

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
3
zář 24
13058
1
bře 15
6096
2
pro 24
21844
0
zář 24
1364
3
srp 24
2692