Hello,
I faced a problem while adding a new field to invoice_line_ids field in account.move.
Actually, the field has been added but it is not saving the value whenever I create a new invoice or edit an invoice.
Sometimes it is saving while editing and sometimes not !!
I don't know what is happening because this is just a small customization.
This is the view:
<odoo>
<data>
<record id="account_move_line_delivery" model="ir.ui.view">
<field name="name">account.move.delivery</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='quantity']" position="before">
<field name="delivery_date"/>
</xpath>
</field>
</record>
</data>
</odoo>
This is the python code:
from odoo import api, fields, models
class AccountMoveLine(models.Model):
_inherit = 'account.move.line'
delivery_date = fields.Date(string="Delivery Date")