TIP: You can type at any time to perform a new search.
Pricelist Cache
pricelist_cache · OCA/sale-workflow
- Repository
- OCA/sale-workflow · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Hidden
- Folder size
- 0.13 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/sale-workflow
- Last tracking update
- 2026-08-07 08:42:48
- Authors
- Camptocamp, Odoo Community Association (OCA)
- Maintainers
- Camptocamp, Odoo Community Association (OCA)
- Committers
- Weblate, OCA-git-bot, oca-ci, Rafael Lima
- Odoo dependencies
- Python dependencies
- requests
- System dependencies
- None
- Required by
- pricelist_cache_rest
- Description
Provides a cron task who caches prices for all products and all pricelists. The goal is to be able to generate a whole catalog of prices and products for a given customer in a decent time. Everyday, the cron task will trash the previous day's cache, and rebuild it from scratch. It means that at any moment, the prices stored in the cache are those of the current day, and will not be recomputed before the next day. However, new prices will be cached in the following cases: - new product is created - new pricelist is created - new pricelist item is created
Code Analysis ⓘ
Views touched (4)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
product_pricelist_cache_view_tree |
product.pricelist.cache.tree | product.pricelist.cache | list | New |
product_pricelist_cache_wizard_view_form |
product.pricelist.cache.wizard.form | product.pricelist.cache.wizard | form | New |
product_pricelist_view |
product.pricelist.form.inherit | product.pricelist | form | Inherits product.product_pricelist_view |
view_partner_property_form |
res.partner.form.inherit | res.partner | form | Inherits product.view_partner_property_form |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (6)
New fields (3)
-
is_pricelist_cache_availableBooleancompute='_compute_is_pricelist_cache_available' -
is_pricelist_cache_computedBoolean -
parent_pricelist_idsMany2many → product.pricelistcolumn1='pricelist_id'column2='parent_pricelist_id'compute='_compute_parent_pricelist_ids'relation='product_pricelist_cache__parent_pricelist_ids_rel'store=True args: 'product.pricelist'
-
button_open_pricelist_cache_tree(self) -
create(self, vals_list)@api.model_create_multi
New fields (3)
-
priceFloat -
pricelist_idMany2one → product.pricelistindex=Trueondelete='cascade'required=Truestring='Pricelist' args: 'product.pricelist' -
product_idMany2one → product.productindex=Truestring='Product Variant' args: 'product.product'
-
create_full_cache(self)Creates cache for all prices applied to all pricelists. -
cron_reset_pricelist_cache(self)Recreates the whole price list cache. -
flush_pricelist_cache(self) -
get_cached_prices_for_pricelist(self, pricelist, products)Retrieves product prices for a given pricelist. -
update_product_pricelist_cache(self, product_ids=None, pricelist_ids=None)Updates price list cache given a product.product recordset and a pricelist, if specified.
New fields (4)
-
display_cache_line_idsMany2many → product.pricelist.cachestring='Cached prices' args: 'product.pricelist.cache' -
partner_idMany2one → res.partnerargs: 'res.partner' -
pricelist_idMany2one → product.pricelistargs: 'product.pricelist' -
product_idMany2one → product.productargs: 'product.product'
-
open_in_tree_view(self)
New fields (10)
-
applied_onSelectionindex=True -
base_pricelist_idMany2oneindex=True -
categ_idMany2oneindex=True -
company_idMany2oneindex=True -
date_endDatetimeindex=True -
date_startDatetimeindex=True -
min_quantityFloatindex=True -
pricelist_cache_update_skippedBoolean -
product_idMany2oneindex=True -
product_tmpl_idMany2oneindex=True
-
create(self, vals_list)@api.model_create_multi -
update_product_pricelist_cache(self)Executed when a product item is modified. Filters items not based on variants or based on dates, then updates the cache.
New fields (0)
No new fields.
Public methods (1)-
create(self, vals)@api.model_create_multiCreate a cache record for each newly created product, for each global pricelist.
New fields (2)
-
is_pricelist_cache_availableBooleanrelated='property_product_pricelist.is_pricelist_cache_available' -
pricelist_cache_product_filter_idMany2one → ir.filterscomodel_name='ir.filters'default=<expr>domain=[('model_id', '=', 'product.product')]
-
button_open_pricelist_cache_tree(self)
Loading…
Loading…
Loading…