[18.0][ADD] l10n_br_cooperator - #185
Closed
marcos-mendez wants to merge 425 commits into
Closed
Conversation
Previously, these functions were only called on one record. The new configuration correctly searches all records. Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: cooperative-14.0/cooperative-14.0-cooperator Translate-URL: https://translation.odoo-community.org/projects/cooperative-14-0/cooperative-14-0-cooperator/
Currently translated at 18.6% (78 of 418 strings) Translation: cooperative-14.0/cooperative-14.0-cooperator Translate-URL: https://translation.odoo-community.org/projects/cooperative-14-0/cooperative-14-0-cooperator/it/
Currently translated at 42.5% (178 of 418 strings) Translation: cooperative-14.0/cooperative-14.0-cooperator Translate-URL: https://translation.odoo-community.org/projects/cooperative-14-0/cooperative-14-0-cooperator/it/
Currently translated at 100.0% (418 of 418 strings) Translation: cooperative-14.0/cooperative-14.0-cooperator Translate-URL: https://translation.odoo-community.org/projects/cooperative-14-0/cooperative-14-0-cooperator/it/
* fix xml declarations. * pad the contents of <odoo> tags with an empty line.
* update email templates to the default odoo layout (what also makes them shorter). * fix the company name in confirmation email template: display the name of the company that made the subscription request instead of the name of the cooperative. * add a description to email templates. * merge the confirmation email template for individuals and companies into one. * update translations.
* refactor subscription.request.create() and use model_create_multi decorator on it and on res.company.create(). * remove subscription.request.create_comp_sub_req() and subscription.request.check_empty_string().
only display shares for the current company on the cooperator certificate.
* fix the layout of all reports by rewriting them from the default invoice layout. * make the capital release request report inherit from the invoice report instead of copying and modifying it. * rename xml ids to improve consistency.
ensure reversals of capital release requests use a name prefix to not
clash with normal entries ("RSUBJ" instead of "SUBJ").
fix copyright statements: add missing ones and use the same format everywhere.
fix the display of the first name in email templates and add tests to cover this.
* add operation requests tests. * fix small issues. * remove the useless "subscription" operation request type.
* fix the display of the first name in share transfer email for companies. * improve the code to get the first name in mail templates for companies. * refactor subscription.request.validate_subscription_request().
fix subscription requests created by transfer operations: ensure that no confirmation email is sent, that they don't appear in the list of subscription requests and cannot be erroneously validated.
fix required company fields on subscription request form.
rename internal string value of "blocked" subscription request state from "block" to "blocked".
prevent to create a subscription request where email and company email have the same value, to avoid trying to create a recursive partner hierarchy when validating the subscription request (the partner being the parent of itself).
Currently translated at 100.0% (56 of 56 strings) Translation: cooperative-16.0/cooperative-16.0-cooperator_website Translate-URL: https://translation.odoo-community.org/projects/cooperative-16-0/cooperative-16-0-cooperator_website/es/
Currently translated at 100.0% (56 of 56 strings) Translation: cooperative-16.0/cooperative-16.0-cooperator_website Translate-URL: https://translation.odoo-community.org/projects/cooperative-16-0/cooperative-16-0-cooperator_website/it/
Currently translated at 1.7% (1 of 56 strings) Translation: cooperative-16.0/cooperative-16.0-cooperator_website Translate-URL: https://translation.odoo-community.org/projects/cooperative-16-0/cooperative-16-0-cooperator_website/ca/
Currently translated at 8.9% (5 of 56 strings) Translation: cooperative-16.0/cooperative-16.0-cooperator_website Translate-URL: https://translation.odoo-community.org/projects/cooperative-16-0/cooperative-16-0-cooperator_website/ca/
co-authored-by: hugues de keyzer <odoo@hugues.info>
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: cooperative-16.0/cooperative-16.0-cooperator_website Translate-URL: https://translation.odoo-community.org/projects/cooperative-16-0/cooperative-16-0-cooperator_website/
Currently translated at 100.0% (57 of 57 strings) Translation: cooperative-16.0/cooperative-16.0-cooperator_website Translate-URL: https://translation.odoo-community.org/projects/cooperative-16-0/cooperative-16-0-cooperator_website/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: cooperative-16.0/cooperative-16.0-cooperator_website Translate-URL: https://translation.odoo-community.org/projects/cooperative-16-0/cooperative-16-0-cooperator_website/
remove useless if statement and pass created subscription request to .get_subscription_response()
ensure that the ordered_parts field can correctly be passed as an argument to the subscription form and that its value is kept in case of errors when submitting the form.
Currently translated at 100.0% (58 of 58 strings) Translation: cooperative-16.0/cooperative-16.0-cooperator_website Translate-URL: https://translation.odoo-community.org/projects/cooperative-16-0/cooperative-16-0-cooperator_website/it/
- the thanks page was redesigned in 18.0: the positional xpath into the old markup was replaced by an anchor on p.lead - the form javascript ported from odoo.define/web.ajax (removed API) to an ES module with publicWidget and rpc, renamed to .esm.js per the repository eslint convention; behavior preserved: share price, minimum quantity and total recomputed on the form - end-to-end HttpCase suite: public and logged-in subscription flows for individuals and companies (share increase, unmix share types, identity document upload with attachment), every error path (missing required fields, mismatched emails, existing user, IBAN, maximum amount), localization-aware payloads through get_required_field() Tests: 20 HTTP cases; coverage 98.9%. Pre-commit green.
CPF/CNPJ on the subscription request, validated through the official l10n_br_base checker (country-aware and honoring the kill-switch parameter, so foreign cooperators keep working), with automatic formatting on change. The document becomes the cooperator identity: partner matching by vat instead of email, avoiding duplicate members. company_register_number is filled from the CNPJ instead of hidden (the cooperator flow uses it to match company partners), and iban is removed from the required fields: Brazil does not use IBAN and the base website form only ships an empty iban container for localizations, which made the public form impossible to submit. Tests: 24 cases, 100% coverage. Pre-commit green.
marcos-mendez
force-pushed
the
18.0-add-l10n_br_cooperator
branch
from
August 12, 2026 20:05
cb54266 to
1914eb0
Compare
Author
|
Will submit after #182 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New module: Brazilian localization for the cooperator flow, following the pattern of
l10n_es_cooperator.Stacked on #182 (includes its commits — please review only the last commit here). Depends on
cooperatorbeing merged first.l10n_br_basechecker (country-aware and honoring the kill-switch parameter, so foreign cooperators keep working), with automatic formatting on changevatinstead of email, avoiding duplicate memberscompany_register_numberfilled from the CNPJ instead of hidden — the cooperator flow uses it to match company partners, and hiding it (as the Spanish localization does) breaks that pathibanremoved from the required fields: Brazil does not use IBAN and the base website form only ships an empty iban container for localizations, which made the public form impossible to submitTests: 24 cases, 100% coverage. Pre-commit green.