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

[16.0][ADD] product_list_price_from_pricelist: Automatically compute product list prices based on a pricelist. #1852

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

carlos-lopez-tecnativa
Copy link

TT54561

@Tecnativa @pedrobaeza @pilarvargas-tecnativa @chienandalu could you please review this, thanks!

Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

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

Tested and working as expected.

Maybe a little bit dangerous when the priceslist is based on the list price itself... but I guess that's not the purpose of it.

@pedrobaeza pedrobaeza added this to the 16.0 milestone Jan 22, 2025
product_list_price_from_pricelist/__manifest__.py Outdated Show resolved Hide resolved
product_list_price_from_pricelist/readme/CONFIGURE.rst Outdated Show resolved Hide resolved
product_list_price_from_pricelist/readme/CONFIGURE.rst Outdated Show resolved Hide resolved
product_list_price_from_pricelist/readme/USAGE.rst Outdated Show resolved Hide resolved
product_list_price_from_pricelist/tests/test_pricelist.py Outdated Show resolved Hide resolved
@carlos-lopez-tecnativa carlos-lopez-tecnativa force-pushed the 16.0-add-product_list_price_from_pricelist branch 2 times, most recently from d4ef689 to aefa06b Compare January 22, 2025 14:48
product_list_price_from_pricelist/models/res_company.py Outdated Show resolved Hide resolved

- Go to `Sales` -> `Configuration` -> `Settings`.
- In the `Pricing` section, select the `Pricelist to compute sale price` created in the previous step.
- Save the configuration
Copy link
Member

Choose a reason for hiding this comment

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

I think you should mention here also the main company thing.

Choose a reason for hiding this comment

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

Updated, please let me know if now is ok for you

template.write({"list_price": new_price})
return True

def _can_update_product_price(self):
Copy link
Member

Choose a reason for hiding this comment

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

Instead of having a method that gets the domain and then do a bool operation, do a method that returns the domain, and apply it directly on _get_all_templates_from_pricelist_item for getting the applied items, returning empty if not applicable. This way, the logic is more direct.

Choose a reason for hiding this comment

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

Updated, please let me know if now is ok for you

@carlos-lopez-tecnativa carlos-lopez-tecnativa force-pushed the 16.0-add-product_list_price_from_pricelist branch from aefa06b to 8530bcc Compare January 23, 2025 11:57
@carlos-lopez-tecnativa carlos-lopez-tecnativa force-pushed the 16.0-add-product_list_price_from_pricelist branch from 8530bcc to b8b0ede Compare January 23, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants