diff --git a/contract/models/account_analytic_contract.py b/contract/models/account_analytic_contract.py index 6f04a9e5..3a1f9060 100644 --- a/contract/models/account_analytic_contract.py +++ b/contract/models/account_analytic_contract.py @@ -80,4 +80,5 @@ class AccountAnalyticContract(models.Model): domain = [ ('type', '=', 'sale'), ('company_id', '=', company_id)] - return self.env['account.journal'].search(domain, limit=1) + return self.env['account.journal'].search( + domain, order='sequence asc', limit=1)