From 277dd8918fa7acbbc3830d7661d50ef6c46edd72 Mon Sep 17 00:00:00 2001 From: David Beal Date: Tue, 10 Sep 2024 14:56:26 +0200 Subject: [PATCH] IMP account_facto_receivable_bal: track journal fields --- .../models/account_journal.py | 21 +++++++++++++------ .../models/subrogation_receipt.py | 6 ++++-- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/account_factoring_receivable_balance/models/account_journal.py b/account_factoring_receivable_balance/models/account_journal.py index 6cb01ea..9ba9913 100644 --- a/account_factoring_receivable_balance/models/account_journal.py +++ b/account_factoring_receivable_balance/models/account_journal.py @@ -12,7 +12,7 @@ class AccountJournal(models.Model): _inherit = "account.journal" - factor_type = fields.Selection(string="Factor", selection=[]) + factor_type = fields.Selection(string="Factor", selection=[], tracking=True) factor_code = fields.Char(help="Account Number for factor company") factor_start_date = fields.Date( tracking=True, @@ -24,22 +24,31 @@ class AccountJournal(models.Model): relation="account_journal_factor_invoice_rel", column1="factor_journal_id", column2="sale_journal_id", + tracking=True, help="Journals to limit Factoring to. Leave blank to allow all journals", ) factoring_receivable_account_id = fields.Many2one( - comodel_name="account.account", string="Receivable Account" + comodel_name="account.account", string="Receivable Account", tracking=True ) factoring_current_account_id = fields.Many2one( - comodel_name="account.account", string="Current Account" + comodel_name="account.account", + string="Current Account", + tracking=True, ) factoring_holdback_account_id = fields.Many2one( - comodel_name="account.account", string="Holdback Account" + comodel_name="account.account", + string="Holdback Account", + tracking=True, ) factoring_pending_recharging_account_id = fields.Many2one( - comodel_name="account.account", string="Pending Recharging Account" + comodel_name="account.account", + string="Pending Recharging Account", + tracking=True, ) factoring_expense_account_id = fields.Many2one( - comodel_name="account.account", string="Expense Account" + comodel_name="account.account", + string="Expense Account", + tracking=True, ) _sql_constraints = [ diff --git a/account_factoring_receivable_balance_eurofactor/models/subrogation_receipt.py b/account_factoring_receivable_balance_eurofactor/models/subrogation_receipt.py index e0c6028..74c6080 100644 --- a/account_factoring_receivable_balance_eurofactor/models/subrogation_receipt.py +++ b/account_factoring_receivable_balance_eurofactor/models/subrogation_receipt.py @@ -161,8 +161,10 @@ def _compute_instruction(self): mail_prod = settings.get("mail_prod") if mail_prod: instruction = ( - "Le fichier de quittance est à joindre " - f"à l'adresse ' {mail_prod} '" + "Les fichiers de quittance sont à joindre " + f"à l'adresse ' {mail_prod} '. Un seul fichier par mail\n" + "Le mail ne doit contenir que le fichier sans signature " + "ni image." ) rec.instruction = rec.instruction or instruction return res