From 71b886866f3bb43819608e53e33a67c16f8767ad Mon Sep 17 00:00:00 2001 From: sergiocorato Date: Fri, 5 Apr 2019 17:54:00 +0200 Subject: [PATCH] [IMP] add sequence in search default journal --- contract/models/account_analytic_contract.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)