[IMP] base, account: move basic bank accounts info from account to base

Before this commit:
If neither Invoicing nor Accounting are installed, users are stuck with menus
items to create bank-related informations (Banks and Bank accounts). They won't
be able to set these information directly on their contacts.

After this commit:
The Bank Accounts part of the Invoicing tab has been moved from the `account`
module to `base`, so it's now visible in the partner form even when only
`contacts` is installed

Task ID: 2126832

closes odoo/odoo#40563

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Florimond Husquinet (fhu)
2020-01-08 16:21:10 +00:00
committed by laa
parent 69c86a2c1a
commit 34dd971ddc
3 changed files with 33 additions and 33 deletions
+7 -32
View File
@@ -166,38 +166,13 @@
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="groups_id" eval="[(5,)]"/>
<field name="arch" type="xml">
<page name="sales_purchases" position="after">
<page string="Invoicing" name="accounting" attrs="{'invisible': [('is_company','=',False),('parent_id','!=',False)]}" groups="account.group_account_invoice">
<group>
<group string="Bank Accounts" name="banks" groups="account.group_account_invoice">
<field name="bank_ids" nolabel="1">
<tree editable="bottom">
<field name="sequence" widget="handle"/>
<field name="bank_id"/>
<field name="acc_number"/>
<field name="acc_holder_name" invisible="1"/>
</tree>
</field>
<button type="action" class="btn-link"
name="%(base.action_res_partner_bank_account_form)d"
context="{'search_default_partner_id': active_id, 'default_partner_id': active_id, 'form_view_ref': 'account.view_company_partner_bank_form'}"
string="View accounts detail"
colspan="2"
/>
</group>
<group string="Accounting Entries" name="accounting_entries" groups="account.group_account_user">
<field name="currency_id" invisible="1"/>
<field name="property_account_receivable_id"/>
<field name="property_account_payable_id"/>
</group>
</group>
</page>
<page string="Invoicing" name="accounting_disabled" attrs="{'invisible': ['|',('is_company','=',True),('parent_id','=',False)]}" groups="account.group_account_invoice">
<div>
<p>Accounting-related settings are managed on <button name="open_commercial_entity" type="object" string="the parent company" class="oe_link"/></p>
</div>
</page>
</page>
<xpath expr="//group[@name='banks']" position="after">
<group string="Accounting Entries" name="accounting_entries" groups="account.group_account_user">
<field name="currency_id" invisible="1"/>
<field name="property_account_receivable_id"/>
<field name="property_account_payable_id"/>
</group>
</xpath>
<xpath expr="//group[@name='misc']" position="before">
<group string="Fiscal Information" name="fiscal_information" priority="5" groups="account.group_account_invoice">
<field name="property_account_position_id" options="{'no_create': True, 'no_open': True}"/>
+1 -1
View File
@@ -63,8 +63,8 @@ The kernel of Odoo, needed for all installation.
'data/ir_demo_failure_data.xml',
'views/res_company_views.xml',
'views/res_lang_views.xml',
'views/res_partner_views.xml',
'views/res_bank_views.xml',
'views/res_partner_views.xml',
'views/res_country_views.xml',
'views/res_currency_views.xml',
'views/res_users_views.xml',
@@ -403,6 +403,31 @@
</group>
</group>
</page>
<page string="Invoicing" name="accounting" attrs="{'invisible': [('is_company','=',False),('parent_id','!=',False)]}">
<group>
<group string="Bank Accounts" name="banks">
<field name="bank_ids" nolabel="1">
<tree editable="bottom">
<field name="sequence" widget="handle"/>
<field name="bank_id"/>
<field name="acc_number"/>
<field name="acc_holder_name" invisible="1"/>
</tree>
</field>
<button type="action" class="btn-link"
name="%(base.action_res_partner_bank_account_form)d"
context="{'search_default_partner_id': active_id, 'default_partner_id': active_id, 'form_view_ref': 'account.view_company_partner_bank_form'}"
string="View accounts detail"
colspan="2"
/>
</group>
</group>
</page>
<page string="Invoicing" name="accounting_disabled" attrs="{'invisible': ['|',('is_company','=',True),('parent_id','=',False)]}">
<div>
<p>Accounting-related settings are managed on <button name="open_commercial_entity" type="object" string="the parent company" class="oe_link"/></p>
</div>
</page>
<page name='internal_notes' string="Internal Notes">
<field name="comment" placeholder="Internal note..."/>
</page>