Skip to content

Commit

Permalink
Merge c0d0281 into 459e241
Browse files Browse the repository at this point in the history
  • Loading branch information
osi-scampbell committed Jan 17, 2020
2 parents 459e241 + c0d0281 commit f956334
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions purchase_operating_unit/models/purchase_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ def _check_company_operating_unit(self):
def _onchange_operating_unit_id(self):
type_obj = self.env['stock.picking.type']
if self.operating_unit_id:
types = type_obj.search([('code', '=', 'incoming'),
('warehouse_id.operating_unit_id', '=',
self.operating_unit_id.id)])
types = type_obj.\
search([('code', '=', 'incoming'),
('warehouse_id.operating_unit_id', 'in',
(self.operating_unit_id.id, False))])
if types:
self.picking_type_id = types[:1]
else:
Expand Down

0 comments on commit f956334

Please sign in to comment.