account_usability: adapt context for suspensed_account_id for user_type_id

This commit follows a change in the account module made in this commit: c16bc3192f
Improve multi-company support in the wizard account.group.generate
Remove widget="selection" on fiscal_position on res.partner form
This commit is contained in:
Alexis de Lattre
2022-06-28 22:13:20 +02:00
parent 5f704d34a7
commit a5b5dd83a2
5 changed files with 7 additions and 10 deletions

View File

@@ -10,6 +10,9 @@ class AccountGroupGenerate(models.TransientModel):
_name = 'account.group.generate'
_description = 'Generate Account Groups'
company_id = fields.Many2one(
'res.company', string='Company', required=True,
default=lambda self: self.env.company)
name_prefix = fields.Char(string='Prefix', required=True, default='Comptes')
level = fields.Integer(default=2, required=True)
@@ -18,7 +21,7 @@ class AccountGroupGenerate(models.TransientModel):
raise UserError(_("The level must be >= 1."))
ago = self.env['account.group']
aao = self.env['account.account']
company = self.env.company
company = self.company_id
groups = ago.search([('company_id', '=', company.id)])
if groups:
raise UserError(_(