Skip to content

Commit

Permalink
IMP account_facto_receivable_bal: track journal fields
Browse files Browse the repository at this point in the history
  • Loading branch information
bealdav committed Sep 10, 2024
1 parent a3873ac commit 277dd89
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
21 changes: 15 additions & 6 deletions account_factoring_receivable_balance/models/account_journal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 277dd89

Please sign in to comment.