diff options
Diffstat (limited to 'indoteknik_custom/models')
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 8af34c75..aa4ece13 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -281,17 +281,10 @@ class SaleOrder(models.Model): } def hold_unhold_qty_outgoing_so(self): - pickings = self.env['stock.picking'].search([('sale_id', '=', self.id), ('state', 'not in', ['cancel','done']), ('name', 'ilike', 'BU/PICK/%')]) - products = self.order_line.mapped('product_id') - for picking in pickings: - for line in picking.move_ids_without_package: - if line.product_id in products: - if line.hold_outgoingg == True: - line.hold_outgoingg = False - self.hold_outgoing = False - else: - line.hold_outgoingg = True - self.hold_outgoing = True + if self.hold_outgoing == True: + self.hold_outgoing = False + else: + self.hold_outgoing = True def _validate_uniform_taxes(self): for order in self: |
