[IMP] account: add force_save="1" to move_type

For a better handling on onchanges.

By default, `move_type` is readonly and is therefore
not sent to the web client during an onchange.

During onchanges, `new` is used to pass values into records.

The `move_type` of the invoice was passed to that `new`
thanks to an `default_move_type` passed in the window action.

But, if the view was used outside of this action,
without `default_move_type`
the `move_type` wasn't correctly set and the invoice/move
type wasn't correctly passed

closes odoo/odoo#41723

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
This commit is contained in:
oco-odoo
2023-10-03 18:37:50 +00:00
parent 8ce3291eaf
commit 721e440d61
+2 -1
View File
@@ -831,7 +831,8 @@
<field name="journal_id" invisible="1"/>
<field name="show_name_warning" invisible="1"/>
<field name="posted_before" invisible="1"/>
<field name="move_type" invisible="1"/>
<!--test-tags .test_01_account_tour -->
<field name="move_type" invisible="1" force_save="1"/>
<field name="payment_state" invisible="1" force_save="1"/>
<field name="invoice_filter_type_domain" invisible="1"/>
<field name="suitable_journal_ids" invisible="1"/>