Skip to content

Commit

Permalink
[REF] depends on l10n_be_partner_identification
Browse files Browse the repository at this point in the history
rather than on l10n_be_national_number (in v14)
  • Loading branch information
victor-champonnois committed Mar 15, 2024
1 parent 56f29ab commit 4c347c2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion l10n_be_cooperator_national_number/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion l10n_be_cooperator_national_number/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion l10n_be_cooperator_national_number/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
Expand All @@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Belgium: Cooperator National Number</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:4817dca14c3cc8404899cdbf97cc13424825d59b2db7c559ed670c3b0b21a0cd
!! source digest: sha256:630e1017f61be213540b60239befca6d9dc713c41118f2a603254d70f4b9ec7f
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/cooperative/tree/16.0/l10n_be_cooperator_national_number"><img alt="OCA/cooperative" src="https://img.shields.io/badge/github-OCA%2Fcooperative-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/cooperative-16-0/cooperative-16-0-l10n_be_cooperator_national_number"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/cooperative&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Ask for Belgian National Number in Subscription Request.</p>
Expand Down

0 comments on commit 4c347c2

Please sign in to comment.