[FIX] purchase: in a x2m fields in tree must be in form too

On the PO form view, change the order_lines inline view:
- the tree becomes not editable
- allowed modes are tree,form

Add a new order line, the form view of order_lines opens up
Modify some stuff, then save and new

Before this commit, it crashed because some fields were expected in the tree view
that were not defaulted in the form view by the JS framework.

After this commit, this flow doesn't crash because we make sure every field
in the tree view is present in the form view

OPW 1917111

closes odoo/odoo#30219
This commit is contained in:
Lucas Perais (lpe)
2019-01-15 10:26:55 +00:00
parent 9916c30da8
commit c99e1facf9
+2
View File
@@ -244,6 +244,7 @@
<field name="taxes_id" widget="many2many_tags" domain="[('type_tax_use', '=', 'purchase')]" options="{'no_create': True}"/>
<field name="date_planned" widget="date"/>
<field name="account_analytic_id" colspan="2" groups="purchase.group_analytic_accounting"/>
<field name="analytic_tag_ids" groups="purchase.group_analytic_accounting" widget="many2many_tags" options="{'color_field': 'color'}"/>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
</group>
</group>
@@ -253,6 +254,7 @@
</page><page string="Invoices and Incoming Shipments">
<field name="invoice_lines"/>
<field name="move_ids"/>
<field name="move_dest_ids" invisible="1"/>
</page>
</notebook>
</sheet>