diff --git a/sale_partner_address_restrict/README.rst b/sale_partner_address_restrict/README.rst index 632cb7619f7..b3f461496e5 100644 --- a/sale_partner_address_restrict/README.rst +++ b/sale_partner_address_restrict/README.rst @@ -28,8 +28,8 @@ Sale Partner Address Restrict |badge1| |badge2| |badge3| |badge4| |badge5| -This module restricts the addresses to be used in the sales order form, -according to the partner selected. +This module restricts the addresses to be used in the sales order form +to only addresses of the selected customer. **Table of contents** diff --git a/sale_partner_address_restrict/__manifest__.py b/sale_partner_address_restrict/__manifest__.py index d4c08281214..9250fa2843d 100644 --- a/sale_partner_address_restrict/__manifest__.py +++ b/sale_partner_address_restrict/__manifest__.py @@ -5,7 +5,7 @@ "name": "Sale Partner Address Restrict", "summary": "Restrict addresses domain in the sales order form" " taking into account the partner selected", - "version": "16.0.1.0.0", + "version": "17.0.1.0.0", "category": "Sales", "website": "https://github.com/OCA/partner-contact", "author": "ForgeFlow, Odoo Community Association (OCA)", @@ -14,5 +14,5 @@ "depends": [ "sale", ], - "data": [], + "data": ["views/sale_order_view.xml"], } diff --git a/sale_partner_address_restrict/models/sale_order.py b/sale_partner_address_restrict/models/sale_order.py index ad8494c3a8e..1e77c7de028 100644 --- a/sale_partner_address_restrict/models/sale_order.py +++ b/sale_partner_address_restrict/models/sale_order.py @@ -18,22 +18,3 @@ def _check_partner_addresses(self): " of the selected partner or the selected partner itself." ) ) - - @api.onchange("partner_id") - def _onchange_partner_id_domain(self): - domain = [] - if self.partner_id: - domain = [ - ("commercial_partner_id", "=", self.partner_id.id), - "|", - ("company_id", "=", False), - ("company_id", "=", self.company_id.id), - ] - else: - domain = [ - "|", - ("company_id", "=", False), - ("company_id", "=", self.company_id.id), - ] - - return {"domain": {"partner_invoice_id": domain, "partner_shipping_id": domain}} diff --git a/sale_partner_address_restrict/readme/DESCRIPTION.md b/sale_partner_address_restrict/readme/DESCRIPTION.md index 654be2c653f..9b39e317378 100644 --- a/sale_partner_address_restrict/readme/DESCRIPTION.md +++ b/sale_partner_address_restrict/readme/DESCRIPTION.md @@ -1,2 +1,2 @@ -This module restricts the addresses to be used in the sales order form, -according to the partner selected. +This module restricts the addresses to be used in the sales order form to only +addresses of the selected customer. diff --git a/sale_partner_address_restrict/static/description/index.html b/sale_partner_address_restrict/static/description/index.html index 47c74a5ee68..277a93a6b7a 100644 --- a/sale_partner_address_restrict/static/description/index.html +++ b/sale_partner_address_restrict/static/description/index.html @@ -369,8 +369,8 @@

Sale Partner Address Restrict

!! source digest: sha256:026c9b3f140a8467f57aa94ea7d898de824516f18656d2d7e750a60246399e3b !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

-

This module restricts the addresses to be used in the sales order form, -according to the partner selected.

+

This module restricts the addresses to be used in the sales order form +to only addresses of the selected customer.

Table of contents