Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: Pricelist sale price on form

by
Francesco Ballerini
- 25/02/2023 23:47:31
Thank you very much ! Last question, in pricelist based on formula for example do we have a way to compute the discount price percentage by setting up the sales price ? I did not find anything but I might have missed it eheh.
Thanks for your help. Regards,

 Hi everyone, I have tried to make an implementation for this feature that I can share. 
In case someone is interested in it, I made a PR named [ADD] 14.0: product_form_pricelist_percent_change" in product-attribute repository.

Regards,
Francesco Ballerini
 

Privo di virus.www.avast.com

Il giorno mer 15 feb 2023 alle ore 12:40 Francesco Ballerini <francescobl.lavoro@gmail.com> ha scritto:
Thank you Pedro and Matthieu ^^

I anticipate to you that I am also developing a module that will extend https://github.com/OCA/product-attribute/tree/14.0/product_form_pricelist  and allows to open the whole pricelist rule form by product form, compute product sales price for that specific product-pricelist rule, and will also try to implement one of my previous request:

8 feb 2023, 20:41 Francesco Ballerini:Last question,  in pricelist based on formula do we have a way to compute the discount price percentage by setting up the sales price ?

 I can notify here when PR is ready in beta if someone is interested to help with this feature.

Regards,
Francesco


Il giorno mer 15 feb 2023 alle ore 11:37 Matthieu Mequignon <notifications@odoo-community.org> ha scritto:
On 2/15/23 11:27, Francesco Ballerini wrote:
Thank you for mentioning about  https://github.com/OCA/sale-workflow/pull/2372

It wasn't caching because of the with_delay function https://github.com/OCA/sale-workflow/blob/6c0549005b20e695173ab7b34901cf8493418960/pricelist_cache/models/product_pricelist_cache.py#L197, I removed it because I wasn't sure how to manage function parameters, not the best way to handle maybe but now it caches instantly.

I want to ask one more thing: does Odoo not allow by default to export pricelist for customer? In that case we definitely want to use your module  = )

Thanks for yor help,

Francesco

Il giorno mer 15 feb 2023 alle ore 09:52 Matthieu Mequignon <notifications@odoo-community.org> ha scritto:
On 2/15/23 09:42, Francesco Ballerini wrote:
Thank you very much for the feedback Matthieu,

can I run the creation of the cache manually for testing purposes ?  
I have found a cron "Reset pricelist cache" and an automation to update pricelists cache but I am not sure how to run the process from an empty cache.
Il giorno mar 14 feb 2023 alle ore 12:47 Matthieu Mequignon <notifications@odoo-community.org> ha scritto:
On 2/8/23 10:22, Francesco Ballerini wrote:




> Hello,




>




> I would like to be able to show sales price in pricelist items form.




>




> Very similar task to this module (only available for odoo13 at the 




> moment) 




> https://odoo-community.org/shop/product-list-pricelist-price-6617#attr=12054, 




> but this one does the job in the product template tree-view.




>




> We would need the same one in the product pricelist item form.




> I need it for odoo14 but I can consider modules for other version is 




> there is one available but not available for 14 (could try to perform 




> a migration in some cases).




>




> Thank you in advance. Regards,




>




> Francesco Ballerini




>




>




>




> _______________________________________________




> Mailing-List: https://odoo-community.org/groups/contributors-15




> Post to: mailto:contributors@odoo-community.org




> Unsubscribe: https://odoo-community.org/groups?unsubscribe




>
Hi, I wrote a module for that 
https://github.com/OCA/sale-workflow/tree/14.0/pricelist_cache

Prices are cached everyday, so the price you see is today's price.
With this module, you get a "display pricelist prices" button on the 
pricelist's form.
Also, you get a handy "display customer prices" action on the partner.
Those are popping up a tree view with all prices, which you can then 
filter and so on.





-- 
Matthieu Méquignon
Business Solutions Odoo Developer

Camptocamp France SA
Phone: +33 4 58 48 20 18
https://www.camptocamp.com/

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

Yes, you can run the scheduled action manually.
Please note that there's an ongoing bug (with the fix here https://github.com/OCA/sale-workflow/pull/2372).
It is possible to retrieve prices while caching is not done, which is wrong.

-- 
Matthieu Méquignon
Business Solutions Odoo Developer

Camptocamp France SA
Phone: +33 4 58 48 20 18
https://www.camptocamp.com/

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

Because it is very slow.
In the case of the customer I wrote this module for, it takes ~10 minutes to retrieve all prices for a given pricelist.
It is okay when you don't have much products, though.

-- 
Matthieu Méquignon
Business Solutions Odoo Developer

Camptocamp France SA
Phone: +33 4 58 48 20 18
https://www.camptocamp.com/

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

Reference