[FIX] account: introduce a form view for account.move.line for mobile
On a small display, go to accounting > journal entries > create In the (now kanban) list of account move lines, click ADD Then, try to choose an account Before this commit: The list of accounts was empty. This was because the form view spawned was the automatic generic one The generated view did not have thr necessary structure to get fields' value from the parent form view. In this case, the domain of the name_search for account.account was wrong After this commit: The flow works on mobile as on desktop. The form view's arch is a 1 to 1 copy of the list view in terms of fields and their definition OPW 2030837 closes odoo/odoo#34601 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
This commit is contained in:
@@ -1623,6 +1623,27 @@
|
||||
<field name="recompute_tax_line" invisible="1" readonly="1"/>
|
||||
<field name="tax_line_grouping_key" invisible="1" readonly="1"/>
|
||||
</tree>
|
||||
<!-- Form view to cover mobile use -->
|
||||
<form>
|
||||
<group>
|
||||
<field name="tax_line_id" invisible="1"/>
|
||||
<field name="account_id" domain="[('company_id', '=', parent.company_id), ('deprecated', '=', False)]"/>
|
||||
<field name="partner_id" domain="['|', ('parent_id', '=', False), ('is_company', '=', True)]"/>
|
||||
<field name="name"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="analytic_tag_ids" groups="analytic.group_analytic_tags" widget="many2many_tags"/>
|
||||
<field name="amount_currency" groups="base.group_multi_currency"/>
|
||||
<field name="company_currency_id" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/>
|
||||
<field name="debit" sum="Total Debit"/>
|
||||
<field name="credit" sum="Total Credit"/>
|
||||
<field name="tax_ids" string="Taxes Applied" widget="many2many_tags" domain="[('type_tax_use', '=?', parent.tax_type_domain)]" context="{'append_type_to_tax_name': not parent.tax_type_domain}" options="{'no_create': True}"/>
|
||||
<field name="date_maturity" required="0" invisible="context.get('view_no_maturity', False)"/>
|
||||
<field name="recompute_tax_line" invisible="1" readonly="1"/>
|
||||
<field name="tax_line_grouping_key" invisible="1" readonly="1"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
<field name="narration" colspan="4" placeholder="Add an internal note..." nolabel="1" height="50"/>
|
||||
</page>
|
||||
|
||||
Reference in New Issue
Block a user