Contributors mailing list archives


Stock valuation and property propagation on Odoo 12

DEC, Yann Papouin
- 11/02/2021 00:37:31
Hi everyone,

I need some technical help to understand if the problem comes from my production environment or if it's an Odoo bug.

Starting working with stock valuation, I found that the product's `property_valuation` were not updated after changing it from the category.
Technically `_compute_valuation_type` is never called when saving the category form whereas the `api.depends` decorator clearly sets `categ_id.property_valuation` as a dependency.
That's a big issue because all my products stay in `manual_periodic` even if their category is set to `real_time`.
    def _compute_valuation_type(self):
        self.valuation = self.property_valuation or self.categ_id.property_valuation

Can someone try to set a breakpoint here to see if this computation function is called in its environment ?

Thank you for your time.

Yann PAPOUIN, Ingénieur R&D | DEC