[IMP] l10n_fr_reports: Round lines of tax report and closing entries to the nearest euro

French tax reports require that each line is rounded to the nearest euro.
This requires that a line is added to the closing entries to account for the
differences from rounding. The line requires a couple of default
accounts for the profit/loss from rounding to be applied.

These accounts for profit/loss are by default 758000/658000 and are inherited in the
chart of accounts for l10n_fr (you will only need them if you're doing
french tax reports). The fields are also added to res_company for
l10n_fr, non french companies can still file french tax reports, so if
they are filing french tax reports without these accounts then they'll
need to specify them in settings

This commit also adapts the subformula of the carryover line on the tax
report to round the final value, this means that a rounded value will
persist between periods.
task-2610752

closes odoo/odoo#75634

Related: odoo/enterprise#20245
Signed-off-by: Josse Colpaert <jco@odoo.com>
This commit is contained in:
Daniel Kosky (dako)
2023-06-26 20:00:21 +02:00
committed by Josse Colpaert
parent 8a7bf14fbb
commit 682620cddc
3 changed files with 6 additions and 0 deletions
+1
View File
@@ -890,6 +890,7 @@
<field name="engine">aggregation</field>
<field name="formula">box_27.balance</field>
<field name="carryover_target">box_22._applied_carryover_balance</field>
<field name="subformula">round(0)</field>
</record>
</field>
</record>
+3
View File
@@ -11,6 +11,9 @@ class ResCompany(models.Model):
siret = fields.Char(related='partner_id.siret', string='SIRET', size=14, readonly=False)
ape = fields.Char(string='APE')
l10n_fr_rounding_difference_loss_account_id = fields.Many2one('account.account')
l10n_fr_rounding_difference_profit_account_id = fields.Many2one('account.account')
@api.model
def _get_unalterable_country(self):
return ['FR', 'MF', 'MQ', 'NC', 'PF', 'RE', 'GF', 'GP', 'TF'] # These codes correspond to France and DOM-TOM.
+2
View File
@@ -29,6 +29,8 @@ class AccountChartTemplate(models.AbstractModel):
'expense_currency_exchange_account_id': 'pcg_666',
'account_journal_early_pay_discount_loss_account_id': 'pcg_665',
'account_journal_early_pay_discount_gain_account_id': 'pcg_765',
'l10n_fr_rounding_difference_loss_account_id': 'pcg_658',
'l10n_fr_rounding_difference_profit_account_id': 'pcg_758',
},
}