Pricelist Cache

pricelist_cache
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/18.0/pricelist_cache
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYHidden
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, Rafael Lima
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:11
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/partner-contact:
    - partner_pricelist_search
OCA/queue:
    - queue_job
odoo/odoo:
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - uom
    - sale
    - sales_team
    - account_payment
    - account
    - onboarding
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - payment
    - utm
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES requests
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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 IDNameModelTypeStatus
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 xpath Inherits product.product_pricelist_view
view_partner_property_form res.partner.form.inherit res.partner xpath Inherits product.view_partner_property_form
Models touched (6)

New fields (3)
  • is_pricelist_cache_available Boolean
    compute='_compute_is_pricelist_cache_available'
  • is_pricelist_cache_computed Boolean
  • parent_pricelist_ids Many2many → product.pricelist
    column1='pricelist_id' column2='parent_pricelist_id' compute='_compute_parent_pricelist_ids' relation='product_pricelist_cache__parent_pricelist_ids_rel' store=True args: 'product.pricelist'
Public methods (2)
  • button_open_pricelist_cache_tree(self)
  • create(self, vals_list)
    @api.model_create_multi

New fields (3)
  • price Float
  • pricelist_id Many2one → product.pricelist
    index=True ondelete='cascade' required=True string='Pricelist' args: 'product.pricelist'
  • product_id Many2one → product.product
    index=True string='Product Variant' args: 'product.product'
Public methods (5)
  • 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_ids Many2many → product.pricelist.cache
    string='Cached prices' args: 'product.pricelist.cache'
  • partner_id Many2one → res.partner
    args: 'res.partner'
  • pricelist_id Many2one → product.pricelist
    args: 'product.pricelist'
  • product_id Many2one → product.product
    args: 'product.product'
Public methods (1)
  • open_in_tree_view(self)

New fields (10)
  • applied_on Selection
    index=True
  • base_pricelist_id Many2one
    index=True
  • categ_id Many2one
    index=True
  • company_id Many2one
    index=True
  • date_end Datetime
    index=True
  • date_start Datetime
    index=True
  • min_quantity Float
    index=True
  • pricelist_cache_update_skipped Boolean
  • product_id Many2one
    index=True
  • product_tmpl_id Many2one
    index=True
Public methods (2)
  • 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_multi
    Create a cache record for each newly created product, for each global pricelist.

New fields (2)
  • is_pricelist_cache_available Boolean
    related='property_product_pricelist.is_pricelist_cache_available'
  • pricelist_cache_product_filter_id Many2one → ir.filters
    comodel_name='ir.filters' default=<expr> domain=[('model_id', '=', 'product.product')]
Public methods (1)
  • button_open_pricelist_cache_tree(self)
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/16.0/pricelist_cache
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYHidden
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSOCA-git-bot, oca-ci, Kevin Khao
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:45
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/partner-contact:
    - partner_pricelist_search
OCA/queue:
    - queue_job
odoo/odoo:
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - base_automation
    - resource
    - sale
    - sales_team
    - account_payment
    - account
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - payment
    - utm
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES requests
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
product_pricelist_cache_view_tree product.pricelist.cache.tree product.pricelist.cache tree 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 xpath Inherits product.product_pricelist_view
view_partner_property_form res.partner.form.inherit res.partner xpath Inherits product.view_partner_property_form
Models touched (6)

New fields (3)
  • is_pricelist_cache_available Boolean
    compute='_compute_is_pricelist_cache_available'
  • is_pricelist_cache_computed Boolean
  • parent_pricelist_ids Many2many → product.pricelist
    column1='pricelist_id' column2='parent_pricelist_id' compute='_compute_parent_pricelist_ids' relation='product_pricelist_cache__parent_pricelist_ids_rel' store=True args: 'product.pricelist'
Public methods (2)
  • button_open_pricelist_cache_tree(self)
  • create(self, vals_list)
    @api.model_create_multi

New fields (3)
  • price Float
  • pricelist_id Many2one → product.pricelist
    index=True ondelete='cascade' required=True string='Pricelist' args: 'product.pricelist'
  • product_id Many2one → product.product
    index=True string='Product Variant' args: 'product.product'
Public methods (5)
  • 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_ids Many2many → product.pricelist.cache
    string='Cached prices' args: 'product.pricelist.cache'
  • partner_id Many2one → res.partner
    args: 'res.partner'
  • pricelist_id Many2one → product.pricelist
    args: 'product.pricelist'
  • product_id Many2one → product.product
    args: 'product.product'
Public methods (1)
  • open_in_tree_view(self)

New fields (10)
  • applied_on Selection
    index=True
  • base_pricelist_id Many2one
    index=True
  • categ_id Many2one
    index=True
  • company_id Many2one
    index=True
  • date_end Datetime
    index=True
  • date_start Datetime
    index=True
  • min_quantity Float
    index=True
  • pricelist_cache_update_skipped Boolean
  • product_id Many2one
    index=True
  • product_tmpl_id Many2one
    index=True
Public methods (1)
  • 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_multi
    Create a cache record for each newly created product, for each global pricelist.

New fields (2)
  • is_pricelist_cache_available Boolean
    related='property_product_pricelist.is_pricelist_cache_available'
  • pricelist_cache_product_filter_id Many2one → ir.filters
    comodel_name='ir.filters' default=<expr> domain=[('model_id', '=', 'product.product')]
Public methods (1)
  • button_open_pricelist_cache_tree(self)
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/15.0/pricelist_cache
VERSION
VERSION 1.4.1
CATEGORY
CATEGORYHidden
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, Valentín Georgian Castravete
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:33
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/partner-contact:
    - partner_pricelist_search
OCA/queue:
    - queue_job
odoo/odoo:
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - base_automation
    - resource
    - sale
    - sales_team
    - payment
    - account
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - utm
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES requests
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
product_pricelist_cache_view_tree product.pricelist.cache.tree product.pricelist.cache tree 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 xpath Inherits product.product_pricelist_view
view_partner_property_form res.partner.form.inherit res.partner xpath Inherits product.view_partner_property_form
Models touched (6)

New fields (3)
  • is_pricelist_cache_available Boolean
    compute='_compute_is_pricelist_cache_available'
  • is_pricelist_cache_computed Boolean
  • parent_pricelist_ids Many2many → product.pricelist
    column1='pricelist_id' column2='parent_pricelist_id' compute='_compute_parent_pricelist_ids' relation='product_pricelist_cache__parent_pricelist_ids_rel' store=True args: 'product.pricelist'
Public methods (2)
  • button_open_pricelist_cache_tree(self)
  • create(self, vals_list)
    @api.model_create_multi

New fields (3)
  • price Float
  • pricelist_id Many2one → product.pricelist
    index=True ondelete='cascade' required=True string='Pricelist' args: 'product.pricelist'
  • product_id Many2one → product.product
    index=True string='Product Variant' args: 'product.product'
Public methods (5)
  • 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_ids Many2many → product.pricelist.cache
    string='Cached prices' args: 'product.pricelist.cache'
  • partner_id Many2one → res.partner
    args: 'res.partner'
  • pricelist_id Many2one → product.pricelist
    args: 'product.pricelist'
  • product_id Many2one → product.product
    args: 'product.product'
Public methods (1)
  • open_in_tree_view(self)

New fields (10)
  • applied_on Selection
    index=True
  • base_pricelist_id Many2one
    index=True
  • categ_id Many2one
    index=True
  • company_id Many2one
    index=True
  • date_end Datetime
    index=True
  • date_start Datetime
    index=True
  • min_quantity Float
    index=True
  • pricelist_cache_update_skipped Boolean
  • product_id Many2one
    index=True
  • product_tmpl_id Many2one
    index=True
Public methods (1)
  • 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_multi
    Create a cache record for each newly created product, for each global pricelist.

New fields (2)
  • is_pricelist_cache_available Boolean
    related='property_product_pricelist.is_pricelist_cache_available'
  • pricelist_cache_product_filter_id Many2one → ir.filters
    comodel_name='ir.filters' default=<expr> domain=[('model_id', '=', 'product.product')]
Public methods (1)
  • button_open_pricelist_cache_tree(self)
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/14.0/pricelist_cache
VERSION
VERSION 1.6.0
CATEGORY
CATEGORYHidden
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSSébastien Alix, Thierry Ducrest, oca-travis, Weblate, OCA-git-bot, oca-ci, Alessandro Uffreduzzi, Hai Lang, Henry Backman, Mmequignon, MmeQuignon
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:40:57
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/partner-contact:
    - partner_pricelist_search
OCA/queue:
    - queue_job
odoo/odoo:
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - base_automation
    - resource
    - sale
    - sales_team
    - payment
    - account
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - utm
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES requests
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
product_pricelist_cache_view_tree product.pricelist.cache.tree product.pricelist.cache tree 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 xpath Inherits product.product_pricelist_view
view_partner_property_form res.partner.form.inherit res.partner xpath Inherits product.view_partner_property_form
Models touched (6)

New fields (3)
  • is_pricelist_cache_available Boolean
    compute='_compute_is_pricelist_cache_available'
  • is_pricelist_cache_computed Boolean
  • parent_pricelist_ids Many2many → product.pricelist
    column1='pricelist_id' column2='parent_pricelist_id' compute='_compute_parent_pricelist_ids' relation='product_pricelist_cache__parent_pricelist_ids_rel' store=True args: 'product.pricelist'
Public methods (2)
  • button_open_pricelist_cache_tree(self)
  • create(self, vals_list)
    @api.model_create_multi

New fields (3)
  • price Float
  • pricelist_id Many2one → product.pricelist
    index=True ondelete='cascade' required=True string='Pricelist' args: 'product.pricelist'
  • product_id Many2one → product.product
    index=True string='Product Variant' args: 'product.product'
Public methods (5)
  • 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_ids Many2many → product.pricelist.cache
    string='Cached prices' args: 'product.pricelist.cache'
  • partner_id Many2one → res.partner
    args: 'res.partner'
  • pricelist_id Many2one → product.pricelist
    args: 'product.pricelist'
  • product_id Many2one → product.product
    args: 'product.product'
Public methods (1)
  • open_in_tree_view(self)

New fields (10)
  • applied_on Selection
    index=True
  • base_pricelist_id Many2one
    index=True
  • categ_id Many2one
    index=True
  • company_id Many2one
    index=True
  • date_end Datetime
    index=True
  • date_start Datetime
    index=True
  • min_quantity Float
    index=True
  • pricelist_cache_update_skipped Boolean
  • product_id Many2one
    index=True
  • product_tmpl_id Many2one
    index=True
Public methods (2)
  • create(self, vals)
  • 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_multi
    Create a cache record for each newly created product, for each global pricelist.

New fields (2)
  • is_pricelist_cache_available Boolean
    related='property_product_pricelist.is_pricelist_cache_available'
  • pricelist_cache_product_filter_id Many2one → ir.filters
    comodel_name='ir.filters' default=<expr> domain=[('model_id', '=', 'product.product')]
Public methods (1)
  • button_open_pricelist_cache_tree(self)