blob: 40acbb6fd6632557b6d4dc8f3d432b7792dce4cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models, api, _
class ResPartner(models.Model):
_inherit = 'res.partner'
siret = fields.Char(string='SIRET', size=14)
class ChartTemplate(models.Model):
_inherit = 'account.chart.template'
def _prepare_all_journals(self, acc_template_ref, company, journals_dict=None):
journals = super(ChartTemplate, self)._prepare_all_journals(acc_template_ref, company, journals_dict)
if company.country_id.code == "FR":
#For France, sale/purchase journals must have a dedicated sequence for refunds
for journal in journals:
if journal['type'] in ['sale', 'purchase']:
journal['refund_sequence'] = True
return journals
|