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

Module: Purchase

Entity: purchase.order

Compute Method: _compute_receipt_status

View 20.0
Inputs Method Outputs
  • state
  • order_line
+ for order in self:
+             if order.state != 'purchase' or not order.order_line:
+                 order.receipt_status = False
+             elif all(line.qty_received >= line.product_qty for line in order.order_line):
+                 order.receipt_status = 'full'
+             elif any(line.qty_received for line in order.order_line):
+                 order.receipt_status = 'partial'
+             else:
+                 order.receipt_status = 'pending'
  • receipt_status

Back to entity