[IMP] account: disable quick create on account.account
Task 1958439 Purpose: prevent the erroneous account creation closes odoo/odoo#32177 Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<group name="amount" position="after">
|
||||
<group/> <!-- put Accounting group under Amount group -->
|
||||
<group name="accounting" string="Accounting">
|
||||
<field name="general_account_id"/>
|
||||
<field name="general_account_id" options="{'no_create': True}"/>
|
||||
<field name="move_id"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<group>
|
||||
<field name="rounding"/>
|
||||
<field name="strategy"/>
|
||||
<field name="account_id" attrs="{'invisible': [('strategy', '!=', 'add_invoice_line')], 'required': [('strategy', '=', 'add_invoice_line')]}"
|
||||
<field name="account_id" options="{'no_create': True}" attrs="{'invisible': [('strategy', '!=', 'add_invoice_line')], 'required': [('strategy', '=', 'add_invoice_line')]}"
|
||||
groups="account.group_account_user"/>
|
||||
<field name="rounding_method"/>
|
||||
</group>
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
</group>
|
||||
<group>
|
||||
<field name="analytic_tag_ids" groups="analytic.group_analytic_accounting" widget="many2many_tags" options="{'color_field': 'color'}"/>
|
||||
<field domain="[('company_id', '=', company_id)]" name="account_id" groups="account.group_account_user"/>
|
||||
<field domain="[('company_id', '=', company_id)]" name="account_id" options="{'no_create': True}" groups="account.group_account_user"/>
|
||||
<field name="invoice_line_tax_ids" context="{'type': invoice_type}" domain="[('type_tax_use','!=','none'),('company_id', '=', company_id)]" widget="many2many_tags" options="{'no_create': True}"/>
|
||||
<field domain="[('company_id', '=', company_id)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="analytic_tag_ids" widget="many2many_tags" groups="analytic.group_analytic_tags"/>
|
||||
@@ -138,7 +138,7 @@
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="sequence"/>
|
||||
<field name="account_id" groups="account.group_account_user"/>
|
||||
<field name="account_id" options="{'no_create': True}" groups="account.group_account_user"/>
|
||||
<field name="account_analytic_id" domain="[('company_id', '=', parent.company_id)]" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="manual"/>
|
||||
<field name="amount_total" string="Amount"/>
|
||||
@@ -329,7 +329,7 @@
|
||||
context="{'partner_id': parent.partner_id}" domain="[('purchase_ok','=',True)]"/>
|
||||
<field name="name"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="account_id" groups="account.group_account_user"
|
||||
<field name="account_id" options="{'no_create': True}" groups="account.group_account_user"
|
||||
domain="[('company_id', '=', parent.company_id), ('internal_type', '=', 'other'), ('deprecated', '=', False)]"/>
|
||||
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
|
||||
domain="[('company_id', '=', parent.company_id)]"
|
||||
@@ -502,6 +502,7 @@
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field
|
||||
name="account_id"
|
||||
options="{'no_create': True}"
|
||||
groups="account.group_account_user"
|
||||
domain="[('company_id', '=', parent.company_id), ('internal_type', '=', 'other'), ('deprecated', '=', False)]"
|
||||
attrs="{'required': [('display_type', '=', False)]}"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<page string="Information">
|
||||
<group>
|
||||
<group string="Amount">
|
||||
<field name="account_id" domain="[('company_id', '=', company_id)]" attrs="{'readonly':[('parent_state','=','posted')]}"/>
|
||||
<field name="account_id" options="{'no_create': True}" domain="[('company_id', '=', company_id)]" attrs="{'readonly':[('parent_state','=','posted')]}"/>
|
||||
<field name="debit" attrs="{'readonly':[('parent_state','=','posted')]}"/>
|
||||
<field name="credit" attrs="{'readonly':[('parent_state','=','posted')]}"/>
|
||||
<field name="quantity"/>
|
||||
@@ -337,7 +337,7 @@
|
||||
context="{'line_ids': line_ids, 'journal_id': journal_id }">
|
||||
<tree editable="bottom" string="Journal Items">
|
||||
<field name="tax_line_id" invisible="1"/>
|
||||
<field name="account_id" domain="[('company_id', '=', parent.company_id), ('deprecated', '=', False)]"/>
|
||||
<field name="account_id" options="{'no_create': True}" domain="[('company_id', '=', parent.company_id), ('deprecated', '=', False)]"/>
|
||||
<field name="partner_id"
|
||||
domain="['|', ('parent_id', '=', False), ('is_company', '=', True)]"/>
|
||||
<field name="name"/>
|
||||
|
||||
@@ -284,7 +284,7 @@
|
||||
<field name="payment_difference_handling" widget="radio" nolabel="1"/>
|
||||
<div attrs="{'invisible': [('payment_difference_handling','=','open')]}">
|
||||
<label for="writeoff_account_id" class="oe_edit_only" string="Post Difference In"/>
|
||||
<field name="writeoff_account_id" string="Post Difference In" attrs="{'required': [('payment_difference_handling', '=', 'reconcile')]}"/>
|
||||
<field name="writeoff_account_id" options="{'no_create': True}" string="Post Difference In" attrs="{'required': [('payment_difference_handling', '=', 'reconcile')]}"/>
|
||||
<label for="journal_id" string="Journal" attrs="{'invisible': [('amount', '!=', 0)]}"/>
|
||||
<field name="journal_id" string="Journal" widget="selection" attrs="{'invisible': [('amount', '!=', 0)]}"/>
|
||||
<label for="writeoff_label" class="oe_edit_only" string="Label"/>
|
||||
@@ -356,7 +356,7 @@
|
||||
<field name="payment_difference_handling" widget="radio" nolabel="1"/>
|
||||
<div attrs="{'invisible': [('payment_difference_handling','=','open')]}">
|
||||
<label for="writeoff_account_id" class="oe_edit_only" string="Post Difference In"/>
|
||||
<field name="writeoff_account_id" string="Post Difference In" attrs="{'required': [('payment_difference_handling', '=', 'reconcile')]}"/>
|
||||
<field name="writeoff_account_id" options="{'no_create': True}" string="Post Difference In" attrs="{'required': [('payment_difference_handling', '=', 'reconcile')]}"/>
|
||||
<label for="journal_id" string="Journal" attrs="{'invisible': [('amount', '!=', 0)]}"/>
|
||||
<field name="journal_id" string="Journal" widget="selection" attrs="{'invisible': [('amount', '!=', 0)]}"/>
|
||||
<label for="writeoff_label" class="oe_edit_only" string="Label"/>
|
||||
|
||||
@@ -251,8 +251,8 @@
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<field name="default_debit_account_id" domain="[('deprecated', '=', False)]" groups="account.group_account_user"/>
|
||||
<field name="default_credit_account_id" domain="[('deprecated', '=', False)]" groups="account.group_account_user"/>
|
||||
<field name="default_debit_account_id" options="{'no_create': True}" domain="[('deprecated', '=', False)]" groups="account.group_account_user"/>
|
||||
<field name="default_credit_account_id" options="{'no_create': True}" domain="[('deprecated', '=', False)]" groups="account.group_account_user"/>
|
||||
<field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/>
|
||||
</group>
|
||||
</group>
|
||||
@@ -281,8 +281,8 @@
|
||||
<field name="outbound_payment_method_ids" widget="many2many_checkboxes"/>
|
||||
</group>
|
||||
<group string="Accounting App Options">
|
||||
<field name="profit_account_id" attrs="{'invisible': [('type', '!=', 'cash')]}"/>
|
||||
<field name="loss_account_id" attrs="{'invisible': [('type', '!=', 'cash')]}"/>
|
||||
<field name="profit_account_id" options="{'no_create': True}" attrs="{'invisible': [('type', '!=', 'cash')]}"/>
|
||||
<field name="loss_account_id" options="{'no_create': True}" attrs="{'invisible': [('type', '!=', 'cash')]}"/>
|
||||
<field name="group_invoice_lines" attrs="{'invisible': [('type', 'not in', ['sale', 'purchase'])]}"/>
|
||||
<field name="post_at_bank_rec" attrs="{'invisible': [('type', 'not in', ['bank', 'cash'])]}"/>
|
||||
</group>
|
||||
@@ -805,7 +805,7 @@
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button type="object" name="action_reconcile_stat"
|
||||
class="oe_stat_button" icon="fa-book">
|
||||
<field name="number_entries" string="Journal Entries" widget="statinfo"/>
|
||||
<field name="number_entries" string="Journal Entries" widget="statinfo"/>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
@@ -882,7 +882,7 @@
|
||||
<group string="Counterpart Values"
|
||||
attrs="{'invisible': [('rule_type', '=', 'invoice_matching'), '|', ('match_total_amount', '=', False), '&', ('match_total_amount', '=', True), ('match_total_amount_param', '=', 100.0)]}">
|
||||
<group>
|
||||
<field name="account_id" domain="[('company_id', '=', company_id)]"
|
||||
<field name="account_id" options="{'no_create': True}" domain="[('company_id', '=', company_id)]"
|
||||
attrs="{'required': ['|', ('rule_type', '!=', 'invoice_matching'), '&', '&', ('rule_type', '=', 'invoice_matching'), ('match_total_amount', '=', True), ('match_total_amount_param', '!=', 100.0)]}"/>
|
||||
<field name="amount_type"/>
|
||||
<field name="tax_ids"
|
||||
@@ -915,7 +915,7 @@
|
||||
</div>
|
||||
<group name="second_line" attrs="{'invisible':['|', ('has_second_line', '=', False), '&', ('rule_type', '=', 'invoice_matching'), '|', ('match_total_amount', '=', False), '&', ('match_total_amount', '=', True), ('match_total_amount_param', '=', 100.0)]}">
|
||||
<group>
|
||||
<field name="second_account_id" string="Account" domain="[('company_id', '=', company_id)]"
|
||||
<field name="second_account_id" options="{'no_create': True}" string="Account" domain="[('company_id', '=', company_id)]"
|
||||
attrs="{'required': [('has_second_line', '=', True), '|', ('rule_type', '!=', 'invoice_matching'), '&', '&', ('rule_type', '=', 'invoice_matching'), ('match_total_amount', '=', True), ('match_total_amount_param', '!=', 100.0)]}"/>
|
||||
<field name="second_amount_type" string="Amount type"/>
|
||||
<field name="second_tax_ids"
|
||||
@@ -1164,8 +1164,8 @@
|
||||
</div>
|
||||
</group>
|
||||
<group attrs="{'invisible':[('amount_type','=', 'group')]}" groups="account.group_account_user">
|
||||
<field name="account_id"/>
|
||||
<field name="refund_account_id"/>
|
||||
<field name="account_id" options="{'no_create': True}"/>
|
||||
<field name="refund_account_id" options="{'no_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<field name="children_tax_ids"
|
||||
@@ -1193,8 +1193,8 @@
|
||||
<field name="include_base_amount" attrs="{'invisible':[('amount_type','=', 'group')]}" />
|
||||
<field name="hide_tax_exigibility" invisible="1"/>
|
||||
<field name="tax_exigibility" widget="radio" attrs="{'invisible':['|', ('amount_type','=', 'group'), ('hide_tax_exigibility', '=', False)]}" groups="account.group_account_user"/>
|
||||
<field name="cash_basis_account_id" attrs="{'invisible': [('tax_exigibility', '=', 'on_invoice')], 'required': [('tax_exigibility', '=', 'on_payment')]}" groups="account.group_account_user"/>
|
||||
<field name="cash_basis_base_account_id" attrs="{'invisible': [('tax_exigibility', '=', 'on_invoice')], 'required': [('tax_exigibility', '=', 'on_payment')]}" groups="account.group_account_user"/>
|
||||
<field name="cash_basis_account_id" options="{'no_create': True}" attrs="{'invisible': [('tax_exigibility', '=', 'on_invoice')], 'required': [('tax_exigibility', '=', 'on_payment')]}" groups="account.group_account_user"/>
|
||||
<field name="cash_basis_base_account_id" options="{'no_create': True}" attrs="{'invisible': [('tax_exigibility', '=', 'on_invoice')], 'required': [('tax_exigibility', '=', 'on_payment')]}" groups="account.group_account_user"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
@@ -1518,8 +1518,8 @@
|
||||
</div>
|
||||
</group>
|
||||
<group attrs="{'invisible':[('amount_type','=', 'group')]}">
|
||||
<field name="account_id"/>
|
||||
<field name="refund_account_id"/>
|
||||
<field name="account_id" options="{'no_create': True}"/>
|
||||
<field name="refund_account_id" options="{'no_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<field name="children_tax_ids"
|
||||
@@ -1547,7 +1547,7 @@
|
||||
<field name="tag_ids" domain="[('applicability', '!=', 'accounts')]" widget="many2many_tags" context="{'default_applicability': 'taxes'}"/>
|
||||
<field name="active" groups="base.group_no_one"/>
|
||||
<field name="tax_exigibility" widget="radio" attrs="{'invisible':[('amount_type','=', 'group')]}"/>
|
||||
<field name="cash_basis_account_id" attrs="{'invisible': [('tax_exigibility', '=', 'on_invoice')], 'required': [('tax_exigibility', '=', 'on_payment')]}"/>
|
||||
<field name="cash_basis_account_id" options="{'no_create': True}" attrs="{'invisible': [('tax_exigibility', '=', 'on_invoice')], 'required': [('tax_exigibility', '=', 'on_payment')]}"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
<field name="tax_id" widget="selection"/>
|
||||
</group>
|
||||
<group string="Accounts">
|
||||
<field name="debit_account_id"/>
|
||||
<field name="credit_account_id"/>
|
||||
<field name="debit_account_id" options="{'no_create': True}"/>
|
||||
<field name="credit_account_id" options="{'no_create': True}"/>
|
||||
</group>
|
||||
<group string="Options">
|
||||
<field name="journal_id"/>
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<field name="currency_id" invisible="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="account_id"/>
|
||||
<field name="account_id" options="{'no_create': True}"/>
|
||||
<field name="tax_ids" widget="many2many_tags"/>
|
||||
<field name="account_analytic_id" domain="[('company_id', '=', company_id)]" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="analytic_tag_ids" widget="many2many_tags" groups="analytic.group_analytic_tags"/>
|
||||
@@ -236,7 +236,7 @@
|
||||
<field name="pay_now" required="1"/>
|
||||
<field name="payment_journal_id"
|
||||
attrs="{'invisible': [('pay_now', '!=', 'pay_now')], 'required': [('pay_now', '=', 'pay_now')]}"/>
|
||||
<field name="account_id" groups="account.group_account_user"/>
|
||||
<field name="account_id" options="{'no_create': True}" groups="account.group_account_user"/>
|
||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<group>
|
||||
@@ -256,7 +256,7 @@
|
||||
<tree string="Voucher Lines" editable="bottom">
|
||||
<field name="product_id"/>
|
||||
<field name="name"/>
|
||||
<field name="account_id" groups="account.group_account_user"/>
|
||||
<field name="account_id" options="{'no_create': True}" groups="account.group_account_user"/>
|
||||
<field name="account_analytic_id" domain="[('company_id', '=', parent.company_id)]" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="analytic_tag_ids" widget="many2many_tags" groups="analytic.group_analytic_tags"/>
|
||||
<field name="quantity"/>
|
||||
@@ -354,7 +354,7 @@
|
||||
<field name="pay_now" required="1"/>
|
||||
<field name="payment_journal_id"
|
||||
attrs="{'invisible': [('pay_now', '!=', 'pay_now')], 'required': [('pay_now', '=', 'pay_now')]}"/>
|
||||
<field name="account_id" groups="account.group_account_user"/>
|
||||
<field name="account_id" options="{'no_create': True}" groups="account.group_account_user"/>
|
||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
||||
<field name="reference"/>
|
||||
</group>
|
||||
@@ -375,7 +375,7 @@
|
||||
<tree string="Voucher Lines" editable="bottom">
|
||||
<field name="product_id"/>
|
||||
<field name="name"/>
|
||||
<field name="account_id" groups="account.group_account_user"/>
|
||||
<field name="account_id" options="{'no_create': True}" groups="account.group_account_user"/>
|
||||
<field name="account_analytic_id" domain="[('company_id', '=', parent.company_id)]" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="analytic_tag_ids" widget="many2many_tags" groups="analytic.group_analytic_tags"/>
|
||||
<field name="quantity"/>
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
</group><group>
|
||||
<field name="reference"/>
|
||||
<field name="date"/>
|
||||
<field name="account_id" domain="[('internal_type', '=', 'other')]" groups="account.group_account_user"/>
|
||||
<field name="account_id" options="{'no_create': True}" domain="[('internal_type', '=', 'other')]" groups="account.group_account_user"/>
|
||||
<field name="employee_id" groups="hr_expense.group_hr_expense_team_approver"/>
|
||||
<field name="sheet_id" invisible="1"/>
|
||||
<field name="currency_id" groups="base.group_multi_currency"/>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr='//group[@name="acquirer"]' position='after'>
|
||||
<group attrs="{'invisible': [('provider', '!=', 'payulatam')]}">
|
||||
<field name="payulatam_account_id"/>
|
||||
<field name="payulatam_account_id" options="{'no_create': True}"/>
|
||||
<field name="payulatam_merchant_id"/>
|
||||
<field name="payulatam_api_key"/>
|
||||
</group>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<span
|
||||
attrs="{'invisible': [('advance_payment_method', '!=', 'percentage')]}" class="oe_inline">%</span>
|
||||
</div>
|
||||
<field name="deposit_account_id" class="oe_inline"
|
||||
<field name="deposit_account_id" options="{'no_create': True}" class="oe_inline"
|
||||
attrs="{'invisible': ['|', ('advance_payment_method', 'not in', ('fixed', 'percentage')), ('product_id', '!=', False)]}" groups="account.group_account_manager"/>
|
||||
<field name="deposit_taxes_id" class="oe_inline" widget="many2many_tags"
|
||||
domain="[('type_tax_use','=','sale')]"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<group name="account_stock_property" string="Account Stock Properties" groups="account.group_account_user">
|
||||
<field name="property_stock_account_input_categ_id" domain="[('deprecated', '=', False)]" attrs="{'required':[ ('property_valuation', '=', 'real_time')]}" />
|
||||
<field name="property_stock_account_output_categ_id" domain="[('deprecated', '=', False)]" attrs="{'required':[ ('property_valuation', '=', 'real_time')]}" />
|
||||
<field name="property_stock_valuation_account_id" domain="[('deprecated', '=', False)]" attrs="{'required':[ ('property_valuation', '=', 'real_time')]}"/>
|
||||
<field name="property_stock_valuation_account_id" options="{'no_create': True}" domain="[('deprecated', '=', False)]" attrs="{'required':[ ('property_valuation', '=', 'real_time')]}"/>
|
||||
<field name="property_stock_journal"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='localization']" position="after">
|
||||
<group string="Accounting Information" attrs="{'invisible':[('usage','not in',('inventory','production'))]}">
|
||||
<field name="valuation_in_account_id"/>
|
||||
<field name="valuation_out_account_id"/>
|
||||
<field name="valuation_in_account_id" options="{'no_create': True}"/>
|
||||
<field name="valuation_out_account_id" options="{'no_create': True}"/>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<field name="new_price" string="Cost"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="counterpart_account_id"
|
||||
<field name="counterpart_account_id" options="{'no_create': True}"
|
||||
attrs="{'invisible': [('counterpart_account_id_required', '=', False)], 'required': [('counterpart_account_id_required', '=', True)]}"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
</group>
|
||||
<group>
|
||||
<field name="split_method"/>
|
||||
<field name="account_id"/>
|
||||
<field name="account_id" options="{'no_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<label for="name"/>
|
||||
@@ -56,7 +56,7 @@
|
||||
domain="[('landed_cost_ok', '=', True)]"
|
||||
context="{'default_landed_cost_ok': True, 'default_type': 'service', 'form_view_ref':'stock_landed_costs.view_stock_landed_cost_type_form'}"/>
|
||||
<field name="name"/>
|
||||
<field name="account_id"/>
|
||||
<field name="account_id" options="{'no_create': True}"/>
|
||||
<field name="split_method"/>
|
||||
<field name="price_unit"/>
|
||||
</tree>
|
||||
|
||||
Reference in New Issue
Block a user