Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: DDMRP

Entity: stock.buffer

Compute Method: _compute_ddmrp_chart_execution

View 18.0 View 19.0
Inputs Method Outputs
  • product_id
+ for rec in self:
+             # On new records in v19, onchange triggers this before product_id is set,
+             # leaving product_uom empty (rounding=0.0).
+             if not rec.product_id:
+                 rec.ddmrp_chart_execution = json.dumps({"div": "", "script": ""})
+                 continue
+             div, script = rec.get_ddmrp_chart_execution()
+             json_data = json.dumps(
+                 {
+                     "div": div,
+                     "script": script,
+                 }
+             )
+             rec.ddmrp_chart_execution = json_data
  • ddmrp_chart_execution

Back to entity