Skip to content

Commit

Permalink
[16.0][UPD] osi_partner_credit_limit: allow button validate to work w…
Browse files Browse the repository at this point in the history
…ith batch out transfers
  • Loading branch information
cbeddies committed Apr 9, 2024
1 parent 6089d1e commit 666026d
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions osi_partner_credit_limit/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,12 @@ def _compute_allow_transfer(self):

def button_validate(self):
# Only outgoing picking
if self.picking_type_code == "outgoing":
if self.dont_allow_transfer:
raise UserError(
_(
"""Customer has a delivery hold. Please contact Accounting."""
for rec in self:
if rec.picking_type_code == "outgoing":
if rec.dont_allow_transfer:
raise UserError(
_(
"""Customer has a delivery hold. Please contact Accounting."""
)
)
)
else:
return super(StockPicking, self).button_validate()

# Incoming shipments / internal transfers
else:
return super(StockPicking, self).button_validate()
return super(StockPicking, self).button_validate()

0 comments on commit 666026d

Please sign in to comment.