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

Module: Purchase Work Acceptance

Entity: stock.picking

Compute Method: _compute_require_wa

Inputs Method Outputs
  • picking_type_id
  • picking_type_id.bypass_wa
  • picking_type_code
for rec in self:
            rec.require_wa = False
            if (
                not rec.picking_type_id.bypass_wa
                and rec.picking_type_code == "incoming"
            ):
                rec.require_wa = self.env.user.has_group(
                    "purchase_work_acceptance.group_enforce_wa_on_in"
                )

Back to entity