Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: Pricelist sale price on form

by
Camptocamp France SAS, Matthieu Méquignon
- 15/02/2023 11:32:28
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/

Reference