diff --git a/l10n_be_cooperator_national_number/README.rst b/l10n_be_cooperator_national_number/README.rst index 2bb50259b..012a5f299 100644 --- a/l10n_be_cooperator_national_number/README.rst +++ b/l10n_be_cooperator_national_number/README.rst @@ -7,7 +7,7 @@ Belgium: Cooperator National Number !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:4817dca14c3cc8404899cdbf97cc13424825d59b2db7c559ed670c3b0b21a0cd + !! source digest: sha256:630e1017f61be213540b60239befca6d9dc713c41118f2a603254d70f4b9ec7f !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/l10n_be_cooperator_national_number/__manifest__.py b/l10n_be_cooperator_national_number/__manifest__.py index 6f9ab0ad2..a0becdf0b 100644 --- a/l10n_be_cooperator_national_number/__manifest__.py +++ b/l10n_be_cooperator_national_number/__manifest__.py @@ -4,7 +4,7 @@ "name": "Belgium: Cooperator National Number", "summary": "Ask for Belgian National Number in Cooperative Subscription Request.", "version": "16.0.1.0.0", - "depends": ["cooperator", "l10n_be_national_number"], + "depends": ["cooperator", "l10n_be_partner_identification"], "author": "Coop IT Easy SC, Odoo Community Association (OCA)", "category": "Cooperative management", "website": "https://github.com/OCA/cooperative", diff --git a/l10n_be_cooperator_national_number/models/res_partner.py b/l10n_be_cooperator_national_number/models/res_partner.py index c091fc891..fda7f1225 100644 --- a/l10n_be_cooperator_national_number/models/res_partner.py +++ b/l10n_be_cooperator_national_number/models/res_partner.py @@ -13,7 +13,7 @@ def update_belgian_national_number(self, national_number): result = None if national_number: belgian_cat = self.env.ref( - "l10n_be_national_number.l10n_be_national_number_category" + "l10n_be_partner_identification.l10n_be_national_registry_number_category" ) existing = self.env["res.partner.id_number"].search( [ diff --git a/l10n_be_cooperator_national_number/models/subscription_request.py b/l10n_be_cooperator_national_number/models/subscription_request.py index 31d9c4c11..6db07d7ef 100644 --- a/l10n_be_cooperator_national_number/models/subscription_request.py +++ b/l10n_be_cooperator_national_number/models/subscription_request.py @@ -5,7 +5,7 @@ class SubscriptionRequest(models.Model): _inherit = "subscription.request" - national_number = fields.Char(string="National Number") + national_number = fields.Char() display_national_number = fields.Boolean( compute="_compute_display_national_number", ) @@ -27,7 +27,7 @@ def _compute_require_national_number(self): def get_national_number_from_partner(self, partner): national_number_id_category = self.env.ref( - "l10n_be_national_number.l10n_be_national_number_category" + "l10n_be_partner_identification.l10n_be_national_registry_number_category" ).id national_number = partner.id_numbers.filtered( lambda rec: rec.category_id.id == national_number_id_category @@ -47,3 +47,4 @@ def validate_subscription_request(self): def get_person_info(self, partner): super().get_person_info(partner) self.national_number = self.get_national_number_from_partner(partner) + return True diff --git a/l10n_be_cooperator_national_number/static/description/index.html b/l10n_be_cooperator_national_number/static/description/index.html index def619188..ca0b9e96b 100644 --- a/l10n_be_cooperator_national_number/static/description/index.html +++ b/l10n_be_cooperator_national_number/static/description/index.html @@ -367,7 +367,7 @@

Belgium: Cooperator National Number

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:4817dca14c3cc8404899cdbf97cc13424825d59b2db7c559ed670c3b0b21a0cd +!! source digest: sha256:630e1017f61be213540b60239befca6d9dc713c41118f2a603254d70f4b9ec7f !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/cooperative Translate me on Weblate Try me on Runboat

Ask for Belgian National Number in Subscription Request.