[IMP] account: do not block user creation without CoA
During the onboarding, if Invoicing is installed but no chart of account is set the field property_account_receivable_id and property_account_payable_id prevent from validating a new partner because they are required but not auto-filled, and the fields are not visible if Invoicing is not installed. closes odoo/odoo#49732 X-original-commit: 29c362b7c3353c2be11ab117f454d04ed9853f75 Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com> Signed-off-by: wan <william-andre@users.noreply.github.com>
This commit is contained in:
@@ -404,12 +404,12 @@ class ResPartner(models.Model):
|
||||
string="Account Payable",
|
||||
domain="[('internal_type', '=', 'payable'), ('deprecated', '=', False), ('company_id', '=', current_company_id)]",
|
||||
help="This account will be used instead of the default one as the payable account for the current partner",
|
||||
required=True)
|
||||
required=lambda env: env.company.chart_template_id)
|
||||
property_account_receivable_id = fields.Many2one('account.account', company_dependent=True,
|
||||
string="Account Receivable",
|
||||
domain="[('internal_type', '=', 'receivable'), ('deprecated', '=', False), ('company_id', '=', current_company_id)]",
|
||||
help="This account will be used instead of the default one as the receivable account for the current partner",
|
||||
required=True)
|
||||
required=lambda env: env.company.chart_template_id)
|
||||
property_account_position_id = fields.Many2one('account.fiscal.position', company_dependent=True,
|
||||
string="Fiscal Position",
|
||||
domain="[('company_id', '=', current_company_id)]",
|
||||
|
||||
Reference in New Issue
Block a user