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

Module: Sales

Entity: product.template

Compute Method: _compute_invoice_policy

View 18.0 View 20.0
Inputs Method Outputs
  • invoice_policy
  • type
- self.filtered(lambda t: t.type == 'consu' or not t.invoice_policy).invoice_policy = 'order'
+ for template in self:
+             if not template.invoice_policy:
+                 template.invoice_policy = self.env.company.sale_invoice_policy
+             elif template.type == "consu":
+                 template.invoice_policy = "order"
  • invoice_policy

Back to entity