Skip to content
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

[17.0][MIG] sale_partner_address_restrict #1925

Open
wants to merge 7 commits into
base: 17.0
Choose a base branch
from

Conversation

JordiMForgeFlow
Copy link
Contributor

No description provided.

@rousseldenis
Copy link
Contributor

/ocabot migration sale_partner_address_restrict

@api.constrains("partner_id", "partner_invoice_id", "partner_shipping_id")
def _check_partner_addresses(self):
for order in self:
if order.partner_id and (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, as this changes the standard behavior, a configuration parameter should be set to activate the restriction.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But you would not install the module if you don't want to have the restriction, don't you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That has always be a debate 😄

But you maybe want to decouple deployment flows and activation. Not changing standard behavior by installing a module is always a good practice.

This allows also better flexibility.

And for our tests flows, that allows to avoid separate job flows for conflicting modules.

@@ -0,0 +1 @@
This module restricts the addresses to be used in the sales order form, according to the partner selected.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In which manner?

This should be improved as from module name, we don't understand how the restriction is applied.

@JordiMForgeFlow JordiMForgeFlow force-pushed the 17.0-mig-sale_partner_address_restrict branch from 4b72080 to 73342b9 Compare December 10, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants