Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4768 มุมมอง

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ก.ย. 24
12604
1
มี.ค. 15
5685
How to add a sequence a field? แก้ไขแล้ว
2
ธ.ค. 24
21240
0
ก.ย. 24
1084
3
ส.ค. 24
2190