mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[FIX] stock_quant_manual_assign: Search in all child locations
This commit is contained in:
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: stock-logistics-warehouse (8.0)\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-10-24 09:07+0000\n"
|
||||
"POT-Creation-Date: 2016-03-04 07:59+0000\n"
|
||||
"PO-Revision-Date: 2015-10-24 09:08+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: Finnish (http://www.transifex.com/oca/OCA-stock-logistics-warehouse-8-0/language/fi/)\n"
|
||||
@@ -102,7 +102,7 @@ msgstr ""
|
||||
#. module: stock_quant_manual_assign
|
||||
#: field:assign.manual.quants,quants_lines:0
|
||||
msgid "Quants"
|
||||
msgstr ""
|
||||
msgstr "Määrät"
|
||||
|
||||
#. module: stock_quant_manual_assign
|
||||
#: field:assign.manual.quants.lines,selected:0
|
||||
@@ -122,7 +122,7 @@ msgstr ""
|
||||
#. module: stock_quant_manual_assign
|
||||
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
|
||||
msgid "or"
|
||||
msgstr ""
|
||||
msgstr "tai"
|
||||
|
||||
#. module: stock_quant_manual_assign
|
||||
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
|
||||
|
||||
@@ -55,13 +55,14 @@ class AssignManualQuants(models.TransientModel):
|
||||
def default_get(self, var_fields):
|
||||
super(AssignManualQuants, self).default_get(var_fields)
|
||||
move = self.env['stock.move'].browse(self.env.context['active_id'])
|
||||
available_quants = self.env['stock.quant'].search(
|
||||
['|', ('location_id', '=', move.location_id.id),
|
||||
('location_id', 'in', move.location_id.child_ids.ids),
|
||||
('product_id', '=', move.product_id.id),
|
||||
('qty', '>', 0),
|
||||
'|', ('reservation_id', '=', False),
|
||||
('reservation_id', '=', move.id)])
|
||||
available_quants = self.env['stock.quant'].search([
|
||||
('location_id', 'child_of', move.location_id.id),
|
||||
('product_id', '=', move.product_id.id),
|
||||
('qty', '>', 0),
|
||||
'|',
|
||||
('reservation_id', '=', False),
|
||||
('reservation_id', '=', move.id)
|
||||
])
|
||||
quants_lines = [{
|
||||
'quant': x.id,
|
||||
'lot_id': x.lot_id.id,
|
||||
|
||||
Reference in New Issue
Block a user