Skip to content

Commit

Permalink
[IMP] stock_quant_manual_assign_without_lock_lot: new feature allo_lo…
Browse files Browse the repository at this point in the history
…cked in locations
  • Loading branch information
agaldona authored and Dimitrios T. Tanis committed Jun 16, 2017
1 parent 54a5342 commit 2057fe6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion stock_quant_manual_assign_without_lock_lot/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
##############################################################################
{
"name": "Stock Quant Manual Assign Without Lock Lot",
"version": "1.0",
"version": "8.0.2.0.0",
"license": "AGPL-3",
"author": "OdooMRP team,"
"AvanzOSC,"
"Serv. Tecnol. Avanzados - Pedro M. Baeza",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ def default_get(self, var_fields):
quant_obj = self.env['stock.quant']
res = super(AssignManualQuants, self).default_get(
var_fields=var_fields)
move = self.env['stock.move'].browse(self.env.context['active_id'])
quants_lines = []
for line in res['quants_lines']:
quant = quant_obj.browse(line['quant'])
if not quant.locked:
if not quant.locked or move.location_dest_id.allow_locked:
quants_lines.append(line)
res['quants_lines'] = quants_lines
return res

0 comments on commit 2057fe6

Please sign in to comment.