-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] fiscal_company_l10n_fr_siret: new module to propagate siren fields
- Loading branch information
1 parent
253af6a
commit e8e05e3
Showing
10 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright (C) 2024-Today: GRAP (http://www.grap.coop) | ||
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
{ | ||
"name": "CAE - L10n French SIRET", | ||
"version": "16.0.1.1.0", | ||
"category": "CAE", | ||
"summary": "Glue Module between CAE and L10 French SIRET modules", | ||
"author": "GRAP", | ||
"website": "https://github.com/grap/odoo-addons-cae", | ||
"license": "AGPL-3", | ||
"depends": ["fiscal_company_base", "l10n_fr_siret"], | ||
"installable": True, | ||
"auto_install": True, | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import res_company |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copyright (C) 2024-Today: GRAP (http://www.grap.coop) | ||
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from odoo import models | ||
|
||
|
||
class ResCompany(models.Model): | ||
_inherit = "res.company" | ||
|
||
def _get_fiscal_propagated_fields(self): | ||
res = super()._get_fiscal_propagated_fields() | ||
res += ["siren"] | ||
return res |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
This module extend Odoo functionnalities, regarding companies features to | ||
manage CAE (Coopearatives of Activities and Employment) that is a special | ||
status for french companies. | ||
|
||
This module is a glue module for the Odoo L10n french SIRET module. | ||
|
||
**Features** | ||
|
||
* propagate SIREN value from CAE companies on fiscal child companies. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import test_module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright (C) 2024 - Today: GRAP (http://www.grap.coop) | ||
# @author Sylvain LE GAL (https://twitter.com/legalsylvain) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from odoo.addons.fiscal_company_base.tests.test_abstract import TestAbstract | ||
|
||
|
||
class TestFiscalCompanyPropagatedFields(TestAbstract): | ||
@classmethod | ||
def setUpClass(cls): | ||
super().setUpClass() | ||
cls.correct_siren = "123456782" | ||
|
||
def test_propagated_fields_group(self): | ||
self.group_company.siren = self.correct_siren | ||
self.assertEqual(self.mother_company.siren, False) | ||
self.assertEqual(self.child_company.siren, False) | ||
|
||
def test_propagated_fields_fiscal_mother(self): | ||
self.mother_company.siren = self.correct_siren | ||
self.assertEqual(self.group_company.siren, False) | ||
self.assertEqual(self.mother_company.siren, self.correct_siren) | ||
self.assertEqual(self.child_company.siren, self.correct_siren) |