-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[16][ADD][sale_partner_pricelist] New field allowed pricelist in sale/customer to as… #2620
[16][ADD][sale_partner_pricelist] New field allowed pricelist in sale/customer to as… #2620
Conversation
de6ecc0
to
dd8776d
Compare
5ed09d9
to
24bd5d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technical & Functional review 👍
24bd5d0
to
6ee975c
Compare
Funtional review, everything looks working. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍🏼
|
||
{ | ||
"name": "Sale Partner Pricelist", | ||
"version": "16.0.1.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review
class ResPartnerr(models.Model): | ||
_inherit = "res.partner" | ||
|
||
allowed_pricelist_ids = fields.Many2many( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if default values could come from a configuration on partner category to ease user day-to-day job ? Maybe in a ROADMAP ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the behavior of the constraint, if the field is empty, it will allow all the pricelist.
With this change, we don't need to define a default value for this field
|
||
@api.constrains("property_product_pricelist") | ||
def _check_allowed_pricelist(self): | ||
test_mode = self.env.registry.in_test_mode() or getattr( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really like this kind of code. I'd prefer adding a configuration setting to enable the feature.
1696f8e
to
ede8b34
Compare
c55b093
to
6dbfdeb
Compare
@rafaelbn @rousseldenis I take in consideration your comments. I make some changes in the module and I think is ready to merge. Could you help me to review 🙏 |
…ricelist to customers and show only that pricelists in the sale order
6dbfdeb
to
c96ae1b
Compare
/ocabot merge nobump |
On my way to merge this fine PR! |
It looks like something changed on |
It looks like something changed on |
It looks like something changed on |
Congratulations, your PR was merged at c7a813f. Thanks a lot for contributing to OCA. ❤️ |
…sign multiple rates a client