-
-
Notifications
You must be signed in to change notification settings - Fork 133
[19.0][MIG] l10n_fr_siret #723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 19.0
Are you sure you want to change the base?
Conversation
…ile and fr translation
Prepare the migration of l10n_fr_naf_ape to v10
Start with good version names
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: l10n-france-16.0/l10n-france-16.0-l10n_fr_siret Translate-URL: https://translation.odoo-community.org/projects/l10n-france-16-0/l10n-france-16-0-l10n_fr_siret/
Currently translated at 100.0% (21 of 21 strings) Translation: l10n-france-16.0/l10n-france-16.0-l10n_fr_siret Translate-URL: https://translation.odoo-community.org/projects/l10n-france-16-0/l10n-france-16-0-l10n_fr_siret/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: l10n-france-17.0/l10n-france-17.0-l10n_fr_siret Translate-URL: https://translation.odoo-community.org/projects/l10n-france-17-0/l10n-france-17-0-l10n_fr_siret/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: l10n-france-18.0/l10n-france-18.0-l10n_fr_siret Translate-URL: https://translation.odoo-community.org/projects/l10n-france-18-0/l10n-france-18-0-l10n_fr_siret/
Improve data migration for fields siret/siren/nic: if we have a valid siren inside a bad siret, we keep the siren.
The warning banner for duplicate siren partners is now a many2many instead of a many2one, taking advantage of the new widget introduced in v18.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: l10n-france-18.0/l10n-france-18.0-l10n_fr_siret Translate-URL: https://translation.odoo-community.org/projects/l10n-france-18-0/l10n-france-18-0-l10n_fr_siret/
2770a77 to
6228486
Compare
legalsylvain
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the ping Alexis. I'm asking if we can define siret / siren and nic fields, computed readonly, and stored, with exactly the same function as you wrote.
Pro :
- possibility to make SQL, request, etc.
- lesss useless computation. (those fields are very stable, so no need to recompute at each use).
- possibility to display it in views.
Cons :
Don't see, but maybe !
| if rec.parent_id: | ||
| parent_siren = rec.parent_id._get_siren(raise_if_none=False) | ||
| if parent_siren and parent_siren != siren: | ||
| raise ValidationError( | ||
| self.env._( | ||
| "SIREN '%(child_siren)s' of child partner " | ||
| "'%(child_partner)s' is different from SIREN " | ||
| "'%(parent_siren)s' of its parent partner " | ||
| "'%(parent_partner)s'.", | ||
| child_siren=siren, | ||
| child_partner=rec.display_name, | ||
| parent_siren=parent_siren, | ||
| parent_partner=rec.parent_id.display_name, | ||
| ) | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure about this test ?
I'm asking if some people design "holding" with parent in odoo. if yes, company_registry could be totally different between childs... not sure thought.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my interpretation of how partners should be organised in Odoo for companies, I consider that 1 parent partner = 1 legal entity (1 personne morale) i.e. a SIREN for a french company (or a VAT number). I think it's a mistake to use the parent / child relationship to consider a holding company which owns other companies created as children companies ; because, in the accounting, only parent companies are considered on journal items, so you end up in accounting to consider that the debt is only on the holding company although some invoices were for some children companies.
But I'm not sure what is the exact vision of Odoo SA on parent/child relations for companies.
This is particulaly important for the e-invoicing reform : when we used to send invoices by email or by post, the most important parameter was the destination email (or postal) address to which the invoice was sent ; but, with the e-invoicing reform, the most important parameter in SIREN or VAT number.
Adopt the new native datamodel: siret is now stored on the field 'company_registry' on res.partner
6228486 to
1b65517
Compare
Implementation proposal following #711 that adopt the new native datamodel : SIRET is now stored on the field "company_registry" of res.partner.