Search code examples
python-2.7odooodoo-10

what is _origin in odoo


in odoo sale order line there is an onchange method _onchange_product_uom_qty() where they used a condition self.product_uom_qty < self._origin.product_uom_qty Now my question is what does self._orgin is used for what does it return?

Note: 1. you can also find the origin in hr_appraisal module inside the onchange_colleagues method and somewhere in purchase 2. I does not mean this origin- "source document"`


Solution

  • In an onchange context it is the old value/record which was used before the change.