diff --git a/addons/stock/i18n/ja.po b/addons/stock/i18n/ja.po
index cd0cc1d2155..524432fd1ce 100644
--- a/addons/stock/i18n/ja.po
+++ b/addons/stock/i18n/ja.po
@@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2012-02-08 01:37+0100\n"
-"PO-Revision-Date: 2012-06-29 23:16+0000\n"
+"PO-Revision-Date: 2012-07-11 05:35+0000\n"
"Last-Translator: Akira Hiyama \n"
"Language-Team: Japanese \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-01 04:39+0000\n"
-"X-Generator: Launchpad (build 15520)\n"
+"X-Launchpad-Export-Date: 2012-07-12 04:40+0000\n"
+"X-Generator: Launchpad (build 15593)\n"
#. module: stock
#: field:product.product,track_outgoing:0
diff --git a/addons/stock/product.py b/addons/stock/product.py
index 62fdbb24ca2..e4164ef9e1f 100644
--- a/addons/stock/product.py
+++ b/addons/stock/product.py
@@ -243,13 +243,16 @@ class product_product(osv.osv):
child_location_ids = location_obj.search(cr, uid, [('location_id', 'child_of', location_ids)])
location_ids = child_location_ids or location_ids
- # this will be a dictionary of the UoM resources we need for conversion purposes, by UoM id
- uoms_o = {}
# this will be a dictionary of the product UoM by product id
product2uom = {}
- for product in self.browse(cr, uid, ids, context=context):
- product2uom[product.id] = product.uom_id.id
- uoms_o[product.uom_id.id] = product.uom_id
+ uom_ids = []
+ for product in self.read(cr, uid, ids, ['uom_id'], context=context):
+ product2uom[product['id']] = product['uom_id'][0]
+ uom_ids.append(product['uom_id'][0])
+ # this will be a dictionary of the UoM resources we need for conversion purposes, by UoM id
+ uoms_o = {}
+ for uom in self.pool.get('product.uom').browse(cr, uid, uom_ids, context=context):
+ uoms_o[uom.id] = uom
results = []
results2 = []
diff --git a/addons/stock/wizard/stock_change_product_qty.py b/addons/stock/wizard/stock_change_product_qty.py
index 9171cbc595e..9a00a6d62ce 100644
--- a/addons/stock/wizard/stock_change_product_qty.py
+++ b/addons/stock/wizard/stock_change_product_qty.py
@@ -103,20 +103,14 @@ class stock_change_product_qty(osv.osv_memory):
self.change_product_qty_send_note(cr, uid, [data.id], context)
return {}
- def change_product_qty_send_note (self, cr, uid, ids, context=None):
+ def change_product_qty_send_note(self, cr, uid, ids, context=None):
prod_obj = self.pool.get('product.product')
location_obj = self.pool.get('stock.location')
- prod_temp_obj = self.pool.get('product.template')
- uom_obj = self.pool.get('product.uom')
for data in self.browse(cr, uid, ids, context=context):
- for location in location_obj.browse(cr, uid, [data.location_id.id], context=context):
- location_name = location.name
- for prod in prod_obj.browse(cr, uid, [data.product_id.id], context=context):
- for prod_temp in prod_temp_obj.browse(cr, uid, [prod.product_tmpl_id.id], context=context):
- for uom in uom_obj.browse(cr, uid, [prod_temp.uom_id.id], context=context):
- message = _("Quantity has been changed to %s %s for %s location.") % (data.new_quantity,uom.name,location_name)
- prod_obj.message_append_note(cr, uid, [prod.id], body=message, context=context)
+ location_name = location_obj.browse(cr, uid, data.location_id.id, context=context).name
+ message = _("Quantity has been changed to %s %s for %s location.") % (data.new_quantity, data.product_id.uom_id.name, location_name)
+ prod_obj.message_append_note(cr, uid, [data.product_id.id], body=message, context=context)
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 dc00fdbe736..e360f5aa025 100644
--- a/addons/stock/wizard/stock_change_product_qty_view.xml
+++ b/addons/stock/wizard/stock_change_product_qty_view.xml
@@ -7,17 +7,17 @@
form
-
-
- or
-
-
+
diff --git a/addons/stock/wizard/stock_change_standard_price_view.xml b/addons/stock/wizard/stock_change_standard_price_view.xml
index 968a268a5ef..6062c946d07 100644
--- a/addons/stock/wizard/stock_change_standard_price_view.xml
+++ b/addons/stock/wizard/stock_change_standard_price_view.xml
@@ -7,15 +7,15 @@
form
-
-
- or
-
-
+
diff --git a/addons/stock/wizard/stock_fill_inventory_view.xml b/addons/stock/wizard/stock_fill_inventory_view.xml
index ea07955eff2..75a7b13233b 100644
--- a/addons/stock/wizard/stock_fill_inventory_view.xml
+++ b/addons/stock/wizard/stock_fill_inventory_view.xml
@@ -7,17 +7,17 @@
form
-
-
- or
-
-
+
diff --git a/addons/stock/wizard/stock_inventory_line_split_view.xml b/addons/stock/wizard/stock_inventory_line_split_view.xml
index d8a808ed5db..5072007f210 100644
--- a/addons/stock/wizard/stock_inventory_line_split_view.xml
+++ b/addons/stock/wizard/stock_inventory_line_split_view.xml
@@ -7,11 +7,6 @@
form
-
-
- or
-
-
@@ -45,6 +40,11 @@
+
diff --git a/addons/stock/wizard/stock_inventory_merge_view.xml b/addons/stock/wizard/stock_inventory_merge_view.xml
index 0dcca2de211..0386e429ee6 100644
--- a/addons/stock/wizard/stock_inventory_merge_view.xml
+++ b/addons/stock/wizard/stock_inventory_merge_view.xml
@@ -8,13 +8,13 @@
form
-
+
+
+
-
-
+
diff --git a/addons/stock/wizard/stock_invoice_onshipping.py b/addons/stock/wizard/stock_invoice_onshipping.py
index 46c55311045..ca294f8ec79 100644
--- a/addons/stock/wizard/stock_invoice_onshipping.py
+++ b/addons/stock/wizard/stock_invoice_onshipping.py
@@ -36,7 +36,7 @@ class stock_invoice_onshipping(osv.osv_memory):
context = {}
model = context.get('active_model')
- if not model or model != 'stock.picking':
+ if not model or 'stock.picking' not in model:
return []
model_pool = self.pool.get(model)
diff --git a/addons/stock/wizard/stock_invoice_onshipping_view.xml b/addons/stock/wizard/stock_invoice_onshipping_view.xml
index 088498292ae..20f05f394fd 100644
--- a/addons/stock/wizard/stock_invoice_onshipping_view.xml
+++ b/addons/stock/wizard/stock_invoice_onshipping_view.xml
@@ -7,16 +7,16 @@
form
-
-
- or
-
-
+
diff --git a/addons/stock/wizard/stock_location_product_view.xml b/addons/stock/wizard/stock_location_product_view.xml
index b1f77576392..f0a52933c8a 100644
--- a/addons/stock/wizard/stock_location_product_view.xml
+++ b/addons/stock/wizard/stock_location_product_view.xml
@@ -7,17 +7,17 @@
form
-
-
- or
-
-
+
diff --git a/addons/stock/wizard/stock_move_view.xml b/addons/stock/wizard/stock_move_view.xml
index 9655edf49b8..5ecfc9a85a1 100644
--- a/addons/stock/wizard/stock_move_view.xml
+++ b/addons/stock/wizard/stock_move_view.xml
@@ -9,11 +9,6 @@
form
-
-
- or
-
-
@@ -23,6 +18,11 @@
+
@@ -42,11 +42,6 @@
form
-
-
- or
-
-
@@ -57,6 +52,11 @@
+
@@ -76,9 +76,6 @@
form
-
-
-
@@ -113,6 +110,9 @@
+
diff --git a/addons/stock/wizard/stock_partial_move_view.xml b/addons/stock/wizard/stock_partial_move_view.xml
index 497467025b5..3e0699ec3d8 100644
--- a/addons/stock/wizard/stock_partial_move_view.xml
+++ b/addons/stock/wizard/stock_partial_move_view.xml
@@ -21,13 +21,13 @@
form
-
+
+
+
-
-
+
diff --git a/addons/stock/wizard/stock_partial_picking_view.xml b/addons/stock/wizard/stock_partial_picking_view.xml
index c8da4459efa..fdbcabb9ed7 100644
--- a/addons/stock/wizard/stock_partial_picking_view.xml
+++ b/addons/stock/wizard/stock_partial_picking_view.xml
@@ -16,11 +16,6 @@
form
-
-
- or
-
-
@@ -36,6 +31,11 @@
+
diff --git a/addons/stock/wizard/stock_return_picking_view.xml b/addons/stock/wizard/stock_return_picking_view.xml
index 06e318c295e..5cdad44f681 100644
--- a/addons/stock/wizard/stock_return_picking_view.xml
+++ b/addons/stock/wizard/stock_return_picking_view.xml
@@ -59,16 +59,16 @@
form
-
-
- or
-
-
+
diff --git a/addons/stock/wizard/stock_splitinto_view.xml b/addons/stock/wizard/stock_splitinto_view.xml
index 573014b7cac..52b182a3f27 100644
--- a/addons/stock/wizard/stock_splitinto_view.xml
+++ b/addons/stock/wizard/stock_splitinto_view.xml
@@ -7,15 +7,15 @@
form
-
-
- or
-
-
+
diff --git a/addons/stock_planning/wizard/stock_planning_create_periods_view.xml b/addons/stock_planning/wizard/stock_planning_create_periods_view.xml
index db78799f000..e65f378a638 100644
--- a/addons/stock_planning/wizard/stock_planning_create_periods_view.xml
+++ b/addons/stock_planning/wizard/stock_planning_create_periods_view.xml
@@ -9,7 +9,11 @@
form
-
+
+
+
+
+
-
-
-
-
+
diff --git a/addons/stock_planning/wizard/stock_planning_createlines.py b/addons/stock_planning/wizard/stock_planning_createlines.py
index a6e12ad4bc7..3d43241341d 100644
--- a/addons/stock_planning/wizard/stock_planning_createlines.py
+++ b/addons/stock_planning/wizard/stock_planning_createlines.py
@@ -56,7 +56,6 @@ class stock_planning_createlines(osv.osv_memory):
planning_obj = self.pool.get('stock.planning')
mod_obj = self.pool.get('ir.model.data')
prod_categ_obj = self.pool.get('product.category')
- template_obj = self.pool.get('product.template')
planning_lines = []
for f in self.browse(cr, uid, ids, context=context):
if f.forecasted_products:
@@ -67,8 +66,7 @@ class stock_planning_createlines(osv.osv_memory):
else:
categ_ids = f.product_categ_id.id and [f.product_categ_id.id] or []
prod_categ_ids = prod_categ_obj.search(cr,uid,[('parent_id','child_of',categ_ids)])
- templates_ids = template_obj.search(cr,uid,[('categ_id','in',prod_categ_ids)])
- products_id1 = product_obj.search(cr,uid,[('product_tmpl_id','in',templates_ids)])
+ products_id1 = product_obj.search(cr,uid,[('categ_id','in',prod_categ_ids)])
if len(products_id1)==0:
raise osv.except_osv(_('Error !'), _('No forecasts for selected period or no products in selected category !'))
diff --git a/addons/stock_planning/wizard/stock_planning_createlines_view.xml b/addons/stock_planning/wizard/stock_planning_createlines_view.xml
index e51ab4a3ba0..458994621c1 100644
--- a/addons/stock_planning/wizard/stock_planning_createlines_view.xml
+++ b/addons/stock_planning/wizard/stock_planning_createlines_view.xml
@@ -8,11 +8,6 @@
form
-
-
- or
-
-
@@ -20,6 +15,11 @@
+
diff --git a/addons/stock_planning/wizard/stock_planning_forecast.py b/addons/stock_planning/wizard/stock_planning_forecast.py
index 9f73cf257eb..c72ac0599ea 100644
--- a/addons/stock_planning/wizard/stock_planning_forecast.py
+++ b/addons/stock_planning/wizard/stock_planning_forecast.py
@@ -49,13 +49,11 @@ class stock_sale_forecast_createlines(osv.osv_memory):
forecast_obj = self.pool.get('stock.sale.forecast')
mod_obj = self.pool.get('ir.model.data')
prod_categ_obj = self.pool.get('product.category')
- template_obj = self.pool.get('product.template')
forecast_lines = []
for f in self.browse(cr, uid, ids, context=context):
categ_ids = f.product_categ_id.id and [f.product_categ_id.id] or []
prod_categ_ids = prod_categ_obj.search(cr, uid, [('parent_id','child_of', categ_ids)])
- templates_ids = template_obj.search(cr, uid, [('categ_id','in',prod_categ_ids)])
- products_ids = product_obj.search(cr, uid, [('product_tmpl_id','in',templates_ids)])
+ products_ids = product_obj.search(cr, uid, [('categ_id','in',prod_categ_ids)])
if len(products_ids) == 0:
raise osv.except_osv(_('Error !'), _('No products in selected category !'))
copy = f.copy_forecast
diff --git a/addons/stock_planning/wizard/stock_planning_forecast_view.xml b/addons/stock_planning/wizard/stock_planning_forecast_view.xml
index 3c31404a070..0f3018350c0 100644
--- a/addons/stock_planning/wizard/stock_planning_forecast_view.xml
+++ b/addons/stock_planning/wizard/stock_planning_forecast_view.xml
@@ -9,11 +9,6 @@
form