From 521fdb0fb2f1f7930956e594b351bcd1c3aa0ab4 Mon Sep 17 00:00:00 2001
From: "ron@tinyerp.com" <>
Date: Tue, 14 Dec 2010 17:52:13 +0530
Subject: [PATCH 01/11] [IMP]Improvement in purchase_double_validation Module
Taskid-1774
bzr revid: ron@tinyerp.com-20101214122213-3bcu7lhvvnwt3uoa
---
addons/purchase/purchase_view.xml | 2 +-
addons/purchase_double_validation/__init__.py | 26 +++++++++
.../purchase_double_validation/__openerp__.py | 45 +++++++++++++++
.../purchase_double_validation_installer.py | 55 +++++++++++++++++++
.../purchase_double_validation_installer.xml | 52 ++++++++++++++++++
.../purchase_double_validation_view.xml | 22 ++++++++
.../purchase_double_validation_workflow.xml | 46 ++++++++++++++++
7 files changed, 247 insertions(+), 1 deletion(-)
create mode 100644 addons/purchase_double_validation/__init__.py
create mode 100644 addons/purchase_double_validation/__openerp__.py
create mode 100644 addons/purchase_double_validation/purchase_double_validation_installer.py
create mode 100644 addons/purchase_double_validation/purchase_double_validation_installer.xml
create mode 100644 addons/purchase_double_validation/purchase_double_validation_view.xml
create mode 100644 addons/purchase_double_validation/purchase_double_validation_workflow.xml
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index b0463957e9a..2cfa8a01726 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -155,7 +155,7 @@
-
+
diff --git a/addons/purchase_double_validation/__init__.py b/addons/purchase_double_validation/__init__.py
new file mode 100644
index 00000000000..f3c3af5ba22
--- /dev/null
+++ b/addons/purchase_double_validation/__init__.py
@@ -0,0 +1,26 @@
+#!/usr/bin/python
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved
+# $Id$
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+import purchase_double_validation_installer
+
+
diff --git a/addons/purchase_double_validation/__openerp__.py b/addons/purchase_double_validation/__openerp__.py
new file mode 100644
index 00000000000..6a02ad2f9b5
--- /dev/null
+++ b/addons/purchase_double_validation/__openerp__.py
@@ -0,0 +1,45 @@
+#!/usr/bin/python
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved
+# $Id$
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+{
+ "name" : "purchase_double_validation",
+ "version" : "1.1",
+ "category": 'Generic Modules/Sales & Purchases',
+ "depends" : ["base","purchase"],
+ "author" : "Tiny",
+ "description": """
+ This module modifies purchase workflow in order to validate purchases that exceeds minimum amount set by wizard
+ """,
+ 'author': 'OpenERP SA',
+ 'website': 'http://www.openerp.com',
+
+ 'init_xml': [],
+ 'update_xml': [
+ 'purchase_double_validation_view.xml',
+ 'purchase_double_validation_workflow.xml',
+ 'purchase_double_validation_installer.xml', ],
+ 'demo_xml': [],
+ 'installable': True,
+ 'active': False,
+
+}
diff --git a/addons/purchase_double_validation/purchase_double_validation_installer.py b/addons/purchase_double_validation/purchase_double_validation_installer.py
new file mode 100644
index 00000000000..7ec602b10a2
--- /dev/null
+++ b/addons/purchase_double_validation/purchase_double_validation_installer.py
@@ -0,0 +1,55 @@
+#!/usr/bin/python
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved
+# $Id$
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+import time
+from osv import fields, osv
+
+class purchase_double_validation_installer(osv.osv_memory):
+ _name = 'purchase.double.validation.installer'
+ _inherit = 'res.config'
+
+ _columns = {
+ 'limit_amount': fields.integer('Limit Amount', required=True, help="Minimum amount after which validation of purchase is required"),
+ }
+
+ _defaults = {
+ 'limit_amount': 1000,
+ }
+
+ def execute(self, cr, uid, ids, context=None):
+ data = self.read(cr, uid, ids, context=context)
+ amt = data[0]['limit_amount']
+ data_pool = self.pool.get('ir.model.data')
+ transition_obj = self.pool.get('workflow.transition')
+ waiting = data_pool._get_id(cr, uid, 'purchase_double_validation', 'trans_router1_waiting')
+ waiting_id = data_pool.browse(cr, uid, waiting, context=context).res_id
+ confirm = data_pool._get_id(cr, uid, 'purchase', 'trans_draft_confirmed')
+ confirm_id = data_pool.browse(cr, uid, confirm, context=context).res_id
+ transition_obj.write(cr, uid, waiting_id, {'condition': 'amount_total>%s' % (amt), 'signal': False})
+ transition_obj.write(cr, uid, confirm_id, {'condition': 'amount_total<=%s' % (amt), 'signal': False})
+ return {}
+
+purchase_double_validation_installer()
+
+
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/purchase_double_validation/purchase_double_validation_installer.xml b/addons/purchase_double_validation/purchase_double_validation_installer.xml
new file mode 100644
index 00000000000..1ee4420bc13
--- /dev/null
+++ b/addons/purchase_double_validation/purchase_double_validation_installer.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+ Configure Limit Amount for Purchase
+ purchase.double.validation.installer
+ form
+
+
+
+
+
+ Configure Limit Amount for Purchase
+
+
+ Define minimum amount after which puchase is needed to be validated.
+
+
+ 15
+
+
+
+
+
+
+
+
+
+
+
+ Configure Limit Amount for Purchase
+ ir.actions.act_window
+ purchase.double.validation.installer
+
+ form
+ form
+ new
+
+
+
+
+
+ onskip
+
+
+
+
+
diff --git a/addons/purchase_double_validation/purchase_double_validation_view.xml b/addons/purchase_double_validation/purchase_double_validation_view.xml
new file mode 100644
index 00000000000..5136ffef0e3
--- /dev/null
+++ b/addons/purchase_double_validation/purchase_double_validation_view.xml
@@ -0,0 +1,22 @@
+
+
+
+
+ purchase.order.form.inherit
+ purchase.order
+
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/purchase_double_validation/purchase_double_validation_workflow.xml b/addons/purchase_double_validation/purchase_double_validation_workflow.xml
new file mode 100644
index 00000000000..8e23f252a87
--- /dev/null
+++ b/addons/purchase_double_validation/purchase_double_validation_workflow.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+ waiting
+ function
+ write({'state':'wait'})
+
+
+
+
+ router1
+ OR
+ dummy
+
+
+
+
+
+ True
+ draft_router1
+
+
+
+
+
+ True
+
+
+
+
+
+
+ True
+
+
+
+
+
+ True
+ waiting_confirmed
+
+
+
+
\ No newline at end of file
From d7496a8ea44df329960c6572b94ef3ec72902b69 Mon Sep 17 00:00:00 2001
From: "ron@tinyerp.com" <>
Date: Wed, 15 Dec 2010 11:56:29 +0530
Subject: [PATCH 02/11] [FIX]Warehouse:-shouldnt be able to change the company
after have validated an inventory
lp bug: https://launchpad.net/bugs/690228 fixed
bzr revid: ron@tinyerp.com-20101215062629-dl40cw2g1kyacgpw
---
addons/stock/stock.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 4d6b2643743..5b4c87c26ef 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -1671,7 +1671,7 @@ class stock_move(osv.osv):
result['product_qty'] = product_uos_qty
return {'value': result}
-
+
def onchange_product_id(self, cr, uid, ids, prod_id=False, loc_id=False,
loc_dest_id=False, address_id=False):
""" On change of product id, if finds UoM, UoS, quantity and UoS quantity.
@@ -2440,7 +2440,8 @@ class stock_inventory(osv.osv):
'inventory_line_id': fields.one2many('stock.inventory.line', 'inventory_id', 'Inventories', states={'done': [('readonly', True)]}),
'move_ids': fields.many2many('stock.move', 'stock_inventory_move_rel', 'inventory_id', 'move_id', 'Created Moves'),
'state': fields.selection( (('draft', 'Draft'), ('done', 'Done'), ('confirm','Confirmed'),('cancel','Cancelled')), 'State', readonly=True, select=True),
- 'company_id': fields.many2one('res.company','Company',required=True,select=True),
+ 'company_id': fields.many2one('res.company', 'Company', required=True, select=True, readonly=True, states={'draft':[('readonly',False)]}),
+
}
_defaults = {
'date': time.strftime('%Y-%m-%d %H:%M:%S'),
From c332aab56355c243577b3c583674ff0e428498b0 Mon Sep 17 00:00:00 2001
From: "ron@tinyerp.com" <>
Date: Wed, 15 Dec 2010 16:44:20 +0530
Subject: [PATCH 03/11] [IMP]Master Procurement Schedule: Solved Group By
company
bzr revid: ron@tinyerp.com-20101215111420-f61717tjgjardjwk
---
addons/stock_planning/stock_planning_view.xml | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/addons/stock_planning/stock_planning_view.xml b/addons/stock_planning/stock_planning_view.xml
index aaf7e77c0b2..9995752cb03 100644
--- a/addons/stock_planning/stock_planning_view.xml
+++ b/addons/stock_planning/stock_planning_view.xml
@@ -40,7 +40,7 @@
-
+
stock.period.search
stock.period
@@ -178,10 +178,10 @@
-
+
-
-
@@ -224,7 +224,7 @@
action="action_view_stock_sale_forecast_form"/>
-
+
@@ -319,6 +319,7 @@
+
From 754c921bd02858cd0a09ecc9a5cfbcf1146071ab Mon Sep 17 00:00:00 2001
From: "ron@tinyerp.com" <>
Date: Thu, 16 Dec 2010 17:34:02 +0530
Subject: [PATCH 04/11] [FIX]Stock_planning:Unable to create Forecasting
periods from Create Stock and Sales Periods Menu
lp bug: https://launchpad.net/bugs/690581 fixed
bzr revid: ron@tinyerp.com-20101216120402-h832bva5c7t30296
---
.../wizard/stock_planning_create_periods.py | 43 ++++++++++++++-----
1 file changed, 33 insertions(+), 10 deletions(-)
diff --git a/addons/stock_planning/wizard/stock_planning_create_periods.py b/addons/stock_planning/wizard/stock_planning_create_periods.py
index 12e0d56e755..72acc603ff8 100644
--- a/addons/stock_planning/wizard/stock_planning_create_periods.py
+++ b/addons/stock_planning/wizard/stock_planning_create_periods.py
@@ -21,7 +21,7 @@
import time
from datetime import datetime
-from dateutil.relativedelta import relativedelta
+from dateutil.relativedelta import relativedelta
from osv import osv, fields
@@ -35,7 +35,7 @@ class stock_period_createlines(osv.osv_memory):
result = cr.fetchone()
last_date = result and result[0] or False
if last_date:
- period_start = datetime(last_date,"%Y-%m-%d %H:%M:%S")+ relativedelta(days=1)
+ period_start = datetime.strptime(last_date,"%Y-%m-%d %H:%M:%S")+ relativedelta(days=1)
period_start = period_start - relativedelta(hours=period_start.hour, minutes=period_start.minute, seconds=period_start.second)
else:
period_start = datetime.today()
@@ -51,7 +51,7 @@ class stock_period_createlines(osv.osv_memory):
_defaults={
'date_start': _get_new_period_start,
}
-
+
def create_stock_periods(self, cr, uid, ids, context=None):
interval = context.get('interval',0)
name = context.get('name','Daily')
@@ -59,28 +59,51 @@ class stock_period_createlines(osv.osv_memory):
lines = []
for p in self.browse(cr, uid, ids, context=context):
dt = p.date_start
+ dt_s = p.date_stop
+ dt_stp = datetime.strptime(p.date_stop, '%Y-%m-%d')
ds = datetime.strptime(p.date_start, '%Y-%m-%d')
- while ds.strftime('%Y-%m-%d') < p.date_stop:
+ while ds.strftime('%Y-%m-%d') <= p.date_stop:
if name =='Daily':
- de = ds + relativedelta(days=interval, minutes =-1)
+ de = ds + relativedelta(days=(interval + 1), seconds =-1)
new_name = de.strftime('%Y-%m-%d')
new_id = period_obj.create(cr, uid, {
'name': new_name,
'date_start': ds.strftime('%Y-%m-%d'),
'date_stop': de.strftime('%Y-%m-%d %H:%M:%S'),
})
- ds = ds + relativedelta(days=interval) + 1
+ ds = ds + relativedelta(days=(interval + 1))
if name =="Weekly":
- de = ds + relativedelta(days=interval, minutes =-1)
- new_name = de.strftime('%Y, week %W')
+ de = ds + relativedelta(days=(interval + 1), seconds =-1)
+ if dt_stp < de:
+ de = dt_stp + relativedelta(days=1,seconds =-1)
+ else:
+ de = ds + relativedelta(days=(interval + 1), seconds =-1)
+ start_week = ds.strftime('%W')
+ start_year = ds.strftime('%Y')
+ end_week = de.strftime('%W')
+ end_year = de.strftime('%Y')
+ if start_year <> end_year:
+ if end_week == '00':
+ new_name = "Week " + start_week +"-" + start_year
+ else:
+ new_name = "Week " + start_week +", " + start_year +" - Week " +end_week +", " + end_year
+ elif start_week == end_week:
+ new_name = "Week " + start_week +"-" +start_year
+
+ else:
+ new_name = "Week " + start_week +"-" + end_week+", " + start_year
new_id = period_obj.create(cr, uid, {
'name': new_name,
'date_start': ds.strftime('%Y-%m-%d'),
'date_stop': de.strftime('%Y-%m-%d %H:%M:%S'),
})
- ds = ds + relativedelta(days=interval) + 1
+ ds = ds + relativedelta(days=(interval + 1))
if name == "Monthly":
- de = ds + relativedelta(months=interval, minutes=-1)
+ de = ds + relativedelta(months=interval, seconds=-1)
+ if dt_stp < de:
+ de = dt_stp + relativedelta(days=1,seconds =-1)
+ else:
+ de = ds + relativedelta(months=interval, seconds=-1)
new_name = ds.strftime('%Y/%m')
new_id =period_obj.create(cr, uid, {
'name': new_name,
From 2646ac2706cd3dbd62968c52b7fb933978a786a4 Mon Sep 17 00:00:00 2001
From: "ron@tinyerp.com" <>
Date: Thu, 16 Dec 2010 18:10:52 +0530
Subject: [PATCH 05/11] [FIX]PRODUCT: the ean13 check is incorrect for check
digit 0
lp bug: https://launchpad.net/bugs/690763 fixed
bzr revid: ron@tinyerp.com-20101216124052-pqkbymrrlm0yr8ia
---
addons/product/product.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/addons/product/product.py b/addons/product/product.py
index b51a0df9c5f..ef9d9965a84 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -53,7 +53,7 @@ def check_ean(eancode):
evensum += int(finalean[i])
total=(oddsum * 3) + evensum
- check = int(10 - math.ceil(total % 10.0))
+ check = int(10 - math.ceil(total % 10.0)) %10
if check != int(eancode[-1]):
return False
@@ -503,9 +503,9 @@ class product_product(osv.osv):
if sellers:
for s in sellers:
mydict = {
- 'id': product.id,
- 'name': s.product_name or product.name,
- 'default_code': s.product_code or product.default_code,
+ 'id': product.id,
+ 'name': s.product_name or product.name,
+ 'default_code': s.product_code or product.default_code,
'variants': product.variants
}
result.append(_name_get(mydict))
From bcdfc08fb79a3005f6a98430318d7bfcd41ad6fc Mon Sep 17 00:00:00 2001
From: "ron@tinyerp.com" <>
Date: Tue, 21 Dec 2010 12:42:38 +0530
Subject: [PATCH 06/11] [FIX]mrp: in MO consuming product not taking Exiting
Lot
lp bug: https://launchpad.net/bugs/691012 fixed
bzr revid: ron@tinyerp.com-20101221071238-3zyspxlqmow7nmh0
---
addons/mrp/mrp_view.xml | 12 ++++++------
addons/stock/stock.py | 6 ++----
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index 0720aa3e829..2bf8a9fd5a5 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -600,8 +600,13 @@
+
-
From d1736e906a3a6969084a26ed3b699a050029c274 Mon Sep 17 00:00:00 2001
From: "ron@tinyerp.com" <>
Date: Tue, 21 Dec 2010 16:38:52 +0530
Subject: [PATCH 09/11] [FIX]PO- Filter Button Approved shows approved and
done on Domain
lp bug: https://launchpad.net/bugs/692913 fixed
bzr revid: ron@tinyerp.com-20101221110852-v8xtn0sypuf5oclx
---
addons/purchase/purchase_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index 2cfa8a01726..406125e9d4f 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -199,7 +199,7 @@
-
+
From c4d5104dd6f25a9a9b33c66663d027e6f6640d2a Mon Sep 17 00:00:00 2001
From: "ron@tinyerp.com" <>
Date: Wed, 22 Dec 2010 10:20:21 +0530
Subject: [PATCH 10/11] [IMP]MRP:-Improvement Code BUG :-691012
bzr revid: ron@tinyerp.com-20101222045021-hmyte79qnqneo1xe
---
addons/mrp/mrp_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index 500366d6b0a..52142fe2e64 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -606,7 +606,7 @@
name="%(stock.track_line)d"
string="Split in production lots"
type="action" icon="gtk-justify-fill"
- states="raft,waiting,confirmed,assigned" />
+ states="draft,waiting,confirmed,assigned" />
Date: Wed, 22 Dec 2010 14:22:18 +0530
Subject: [PATCH 11/11] [ADD] ADD Field Lot id in wizard to change Product
Quantity from Product form View
bzr revid: ron@tinyerp.com-20101222085218-dukwbse1bt5yu2z5
---
.../stock/wizard/stock_change_product_qty.py | 35 +++++++++++++------
.../wizard/stock_change_product_qty_view.xml | 4 +++
2 files changed, 29 insertions(+), 10 deletions(-)
diff --git a/addons/stock/wizard/stock_change_product_qty.py b/addons/stock/wizard/stock_change_product_qty.py
index 4e437eef815..1d97f9f2072 100644
--- a/addons/stock/wizard/stock_change_product_qty.py
+++ b/addons/stock/wizard/stock_change_product_qty.py
@@ -27,8 +27,10 @@ class stock_change_product_qty(osv.osv_memory):
_name = "stock.change.product.qty"
_description = "Change Product Quantity"
_columns = {
- 'new_quantity': fields.float('Quantity', required=True, help='This quantity is expressed in the Default UoM of the product.'),
- 'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete="cascade", domain="[('usage', '=', 'internal')]"),
+ 'product_id' : fields.many2one('product.product', 'Product'),
+ 'new_quantity': fields.float('Quantity', required=True, help='This quantity is expressed in the Default UoM of the product.'),
+ 'prodlot_id': fields.many2one('stock.production.lot', 'Lot Number',domain="[('product_id','=',product_id)]"),
+ 'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete="cascade", domain="[('usage', '=', 'internal')]"),
}
def default_get(self, cr, uid, fields, context):
@@ -40,10 +42,14 @@ class stock_change_product_qty(osv.osv_memory):
@param context: A standard dictionary
@return: A dictionary which of fields with values.
"""
+ product_id = context and context.get('active_id', False) or False
+ prod_obj =self.pool.get('product.product')
res = super(stock_change_product_qty, self).default_get(cr, uid, fields, context=context)
if 'new_quantity' in fields:
res.update({'new_quantity': 1})
+ if 'product_id' in fields:
+ res.update({'product_id': product_id})
return res
def change_product_qty(self, cr, uid, ids, context=None):
@@ -70,18 +76,27 @@ class stock_change_product_qty(osv.osv_memory):
for data in self.browse(cr, uid, ids, context=context):
inventory_id = inventry_obj.create(cr , uid, {'name': _('INV: ') + str(res_original.name)}, context=context)
line_data ={
- 'inventory_id' : inventory_id,
- 'product_qty' : data.new_quantity,
- 'location_id' : data.location_id.id,
- 'product_id' : rec_id,
- 'product_uom' : res_original.uom_id.id,
+ 'inventory_id' : inventory_id,
+ 'product_qty' : data.new_quantity,
+ 'location_id' : data.location_id.id,
+ 'product_id' : rec_id,
+ 'product_uom' : res_original.uom_id.id,
+ 'prod_lot_id' : data.prodlot_id.id
}
line_id = inventry_line_obj.create(cr , uid, line_data, context=context)
-
+
inventry_obj.action_confirm(cr, uid, [inventory_id], context=context)
inventry_obj.action_done(cr, uid, [inventory_id], context=context)
-
- return {}
+
+ return {
+ 'domain': "[('id','=',inventory_id])]",
+ 'name' : _('Physical Inventories'),
+ 'view_type': 'form',
+ 'view_mode': 'tree,form',
+ 'res_model': 'stock.inventory',
+ 'context': context,
+ 'type': 'ir.actions.act_window',
+ }
stock_change_product_qty()
diff --git a/addons/stock/wizard/stock_change_product_qty_view.xml b/addons/stock/wizard/stock_change_product_qty_view.xml
index 927f3e91f80..01d46ff5780 100644
--- a/addons/stock/wizard/stock_change_product_qty_view.xml
+++ b/addons/stock/wizard/stock_change_product_qty_view.xml
@@ -10,6 +10,9 @@
+
+
+
@@ -27,6 +30,7 @@
stock.change.product.qty
form
form
+ {'default_product_id': active_id}
new