[IMP] l10n_ro: Minor changes for l10n_ro_saft
For the l10n_ro_saft module that generates the D.406 declaration, we needed to: - create a new export tax specifically for services (which should be reported separately from goods); and - make sure the Bank, Outstanding Receipts and Outstanding Payments accounts are created with codes 5121xx, and the Cash account with code 5311xx, because codes 5120 and 5130 are not available in the official CoA and were therefore causing validation errors in the SAF-T export. - because the CUI number (found in the company_registry field) for partners is required for the SAF-T export, and it is substantially the same as the VAT number, re-use logic from l10n_be to automatically fill in the company_registry if the VAT exists. closes odoo/odoo#132269 Task-id: 3172198 X-original-commit: 74be0779164f8cd65c399977d5f3e058c213318d Related: odoo/enterprise#45939 Related: odoo/documentation#5532 Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com> Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
This commit is contained in:
@@ -117,10 +117,10 @@
|
||||
"","","","","","","","tvac_05","tvati_extra",""
|
||||
"","","","","","","","tvac_09","tvati_extra",""
|
||||
"","","","","","","","tvac_19","tvati_extra",""
|
||||
"","","","","","","","tvac_00_s","tvati_extra",""
|
||||
"","","","","","","","tvac_05_s","tvati_extra",""
|
||||
"","","","","","","","tvac_09_s","tvati_extra",""
|
||||
"","","","","","","","tvac_19_s","tvati_extra",""
|
||||
"","","","","","","","tvac_00_s","tvati_extras",""
|
||||
"","","","","","","","tvac_05_s","tvati_extras",""
|
||||
"","","","","","","","tvac_09_s","tvati_extras",""
|
||||
"","","","","","","","tvac_19_s","tvati_extras",""
|
||||
"","","","","","","","tvad_00","tvati_extrap0b",""
|
||||
"","","","","","","","tvad_05","tvati_extrap0b",""
|
||||
"","","","","","","","tvad_09","tvati_extrap0b",""
|
||||
|
||||
|
@@ -153,7 +153,11 @@
|
||||
"","","","","","","","","","","","tax","invoice","","","",""
|
||||
"","","","","","","","","","","","base","refund","-03 - TAX BASE","","",""
|
||||
"","","","","","","","","","","","tax","refund","","","",""
|
||||
"tvati_extra","35","VAT Exportation","","0% EX","0.0","percent","sale","tax_group_tva_scutit","","","base","invoice","+14 - TAX BASE","","","TVA Export"
|
||||
"tvati_extra","35","VAT Exportation Goods","","0% EX G","0.0","percent","sale","tax_group_tva_scutit","","","base","invoice","+14 - TAX BASE","","","TVA Export Bunuri"
|
||||
"","","","","","","","","","","","tax","invoice","","","",""
|
||||
"","","","","","","","","","","","base","refund","-14 - TAX BASE","","",""
|
||||
"","","","","","","","","","","","tax","refund","","","",""
|
||||
"tvati_extras","35","VAT Exportation Services","","0% EX S","0.0","percent","sale","tax_group_tva_scutit","","","base","invoice","+14 - TAX BASE","","","TVA Export Servicii"
|
||||
"","","","","","","","","","","","tax","invoice","","","",""
|
||||
"","","","","","","","","","","","base","refund","-14 - TAX BASE","","",""
|
||||
"","","","","","","","","","","","tax","refund","","","",""
|
||||
|
||||
|
@@ -18,3 +18,16 @@ class ResPartner(models.Model):
|
||||
return super(ResPartner, self)._commercial_fields() + ['nrc']
|
||||
|
||||
nrc = fields.Char(string='NRC', help='Registration number at the Registry of Commerce')
|
||||
|
||||
@api.depends('vat', 'country_id')
|
||||
def _compute_company_registry(self):
|
||||
# OVERRIDE
|
||||
# In Romania, if you have a VAT number, it's also your company registry (CUI) number
|
||||
super()._compute_company_registry()
|
||||
for partner in self.filtered(lambda p: p.country_id.code == 'RO' and p.vat):
|
||||
vat_country, vat_number = self._split_vat(partner.vat)
|
||||
if vat_country.isnumeric():
|
||||
vat_country = 'ro'
|
||||
vat_number = partner.vat
|
||||
if vat_country == 'ro' and self.simple_vat_check(vat_country, vat_number):
|
||||
partner.company_registry = vat_number
|
||||
|
||||
@@ -22,8 +22,8 @@ class AccountChartTemplate(models.AbstractModel):
|
||||
return {
|
||||
self.env.company.id: {
|
||||
'account_fiscal_country_id': 'base.ro',
|
||||
'bank_account_code_prefix': '512',
|
||||
'cash_account_code_prefix': '531',
|
||||
'bank_account_code_prefix': '5121',
|
||||
'cash_account_code_prefix': '5311',
|
||||
'transfer_account_code_prefix': '581',
|
||||
'account_default_pos_receivable_account_id': 'ro_pcg_recv',
|
||||
'income_currency_exchange_account_id': 'pcg_7651',
|
||||
|
||||
Reference in New Issue
Block a user