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

Hello!!

Please, i use the class "account_invoice_line" and i want to add a new field. I have tried but nothing appear in the invoice.

Here is my code:

#python:

class account_invoice_line(models.Model):

#Inhertis the model account.invoice.line

_inherit = 'account.invoice.line'

callim_id = fields.Many2one('account.invoice', string= 'Invoice Id ', required= False)

product_id = fields.Integer( help = 'Product', default=1 , required= False)

quantity = fields.Float(help='Quantity', default=2, required= False)

price_unit = fields.Integer(help='Unit Price', required= False)

name = fields.Char(help='Tax Description', required= False)

uos_id = fields.Many2one('product.uom', string='Unit of Measure', required= False)

invoice_line_tax_id = fields.Many2many('account.tax','account_invoice_line_tax', 'invoice_line_id', 'tax_id',string='Taxes', required= False)

project_name = fields.Char(string = 'Project Name', help= 'Project_Name')

#XML:

<xpath expr="//field[@name='product_id']" position="before">
                  <field name="project_name"/>

</xpath>

Please help...

Thanks in advance.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มี.ค. 25
1428
0
ม.ค. 25
3514
1
ส.ค. 23
14874
change password แก้ไขแล้ว
1
ส.ค. 23
13529
1
ก.ค. 23
10504