Skip to content

Commit

Permalink
Add external_name to account.move.line_ids view
Browse files Browse the repository at this point in the history
We need to display the field as invisible here although it
is already defined on invoice_line_ids tree above. Having it
defined only there would only set the external_name key with its
value inside the invoice_line_ids key of the values dictionary
that is passed to create function. However, this invoice_line_ids
key is popped in account.move._move_autocomplete_invoice_lines_create
function to keep only the line_ids to create the account.move and
avoid duplicated account.move.line records.
  • Loading branch information
grindtildeath committed Oct 28, 2021
1 parent cab7403 commit f3a39ca
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions account_move_line_accounting_description/views/account_move.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@
<xpath expr="//field[@name='invoice_line_ids']//form" position="inside">
<field name="external_name" />
</xpath>
<!--
WARNING: We need to display the field as invisible here although it
is already defined on invoice_line_ids tree above. Having it
defined only there would only set the external_name key with its
value inside the invoice_line_ids key of the values dictionary
that is passed to create function. However, this invoice_line_ids
key is popped in account.move._move_autocomplete_invoice_lines_create
function to keep only the line_ids to create the account.move and
avoid duplicated account.move.line records. -->
<xpath expr="//field[@name='line_ids']//tree" position="inside">
<field name="external_name" invisible="1" />
</xpath>
</field>
</record>
</odoo>

0 comments on commit f3a39ca

Please sign in to comment.