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

Module: Lunch

Entity: lunch.order

Compute Method: _compute_order_deadline_passed

View 17.0 View 19.0
Inputs Method Outputs
  • date
  • supplier_id
  • supplier_id.order_deadline_passed
+ today = fields.Date.context_today(self)
+ for order in self:
+             if order.date < today:
+                 order.order_deadline_passed = True
+             elif order.date == today:
+                 order.order_deadline_passed = order.supplier_id.order_deadline_passed
+             else:
+                 order.order_deadline_passed = False
  • order_deadline_passed

Back to entity