diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index b8d693d9e70..4f5b8f24e14 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -53,22 +53,11 @@ class mrp_workcenter(osv.osv):
'costs_journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal'),
'costs_general_account_id': fields.many2one('account.account', 'General Account', domain=[('type','<>','view')]),
'resource_id': fields.many2one('resource.resource','Resource', ondelete='cascade', required=True),
- 'product_id': fields.many2one('product.product','Product'),
}
_defaults = {
'capacity_per_cycle': 1.0,
'resource_type': 'material',
}
-
- def on_change_product_cost(self, cr, uid, ids, product_id, context=None):
- if context is None:
- context = {}
- res = {'value':{}}
-
- if product_id:
- cost = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
- res = {'value' : {'costs_hour' :cost.standard_price }}
- return res
mrp_workcenter()
@@ -748,10 +737,7 @@ class mrp_production(osv.osv):
'account_id': account,
'general_account_id': wc.costs_general_account_id.id,
'journal_id': wc.costs_journal_id.id,
- 'ref': wc.code,
- 'product_id': wc.product_id.id,
- 'unit_amount': wc.costs_hour * wc.time_cycle,
- 'product_uom_id': wc.product_id.uom_id.id
+ 'code': wc.code
} )
if wc.costs_journal_id and wc.costs_general_account_id:
value = wc_line.cycle * wc.costs_cycle
@@ -764,10 +750,7 @@ class mrp_production(osv.osv):
'account_id': account,
'general_account_id': wc.costs_general_account_id.id,
'journal_id': wc.costs_journal_id.id,
- 'ref': wc.code,
- 'product_id': wc.product_id.id,
- 'unit_amount': wc.costs_hour * wc.time_cycle,
- 'product_uom_id': wc.product_id.uom_id.id
+ 'code': wc.code,
} )
return amount
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index 22dd1f2d359..4f6f0c88d54 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -160,13 +160,12 @@
-
-
-
+
+
@@ -584,8 +583,8 @@
-
-
+
+
-
+
-
+
@@ -648,11 +647,11 @@
-
+
-
-
+
-
+
diff --git a/addons/mrp/wizard/mrp_price.py b/addons/mrp/wizard/mrp_price.py
index c392ee22131..b136326a2dc 100644
--- a/addons/mrp/wizard/mrp_price.py
+++ b/addons/mrp/wizard/mrp_price.py
@@ -25,7 +25,7 @@ class mrp_price(osv.osv_memory):
_name = 'mrp.product_price'
_description = 'Product Price'
_columns = {
- 'number': fields.integer('Quantity', required=True, help="Specify quantity of products to produce or buy. Report of Cost structure will be displayed base on this quantity."),
+ 'number': fields.integer('Quantity', required=True, help="Specify quantity of products to produce or buy. Report of Cost structure will be displayed base on this qunatity."),
}
_defaults = {
'number': 1,
diff --git a/addons/product/product.py b/addons/product/product.py
index 10c3e979bd7..b3fa3c594f4 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -327,8 +327,7 @@ class product_template(osv.osv):
return True
_constraints = [
- # As Per do changes given by lp bug : 543979
-# (_check_uos, 'Error: UOS must be in a different category than the UOM', ['uos_id']),
+ (_check_uos, 'Error: UOS must be in a different category than the UOM', ['uos_id']),
(_check_uom, 'Error: The default UOM and the purchase UOM must be in the same category.', ['uom_id']),
]
diff --git a/addons/sale/i18n/de.po b/addons/sale/i18n/de.po
index 20cc896a11d..03e78ef30b6 100644
--- a/addons/sale/i18n/de.po
+++ b/addons/sale/i18n/de.po
@@ -1551,7 +1551,7 @@ msgstr "Verkäufe je Verkäufer"
#. module: sale
#: view:sale.order:0
-msgid "Logistic"
+msgid "Logistics"
msgstr "Logistik"
#. module: sale
diff --git a/addons/sale/stock.py b/addons/sale/stock.py
index c020389ba19..622c4917d7d 100644
--- a/addons/sale/stock.py
+++ b/addons/sale/stock.py
@@ -70,7 +70,7 @@ class stock_picking(osv.osv):
def _get_price_unit_invoice(self, cursor, user, move_line, type):
if move_line.sale_line_id and move_line.sale_line_id.product_id.id == move_line.product_id.id:
from_uom_id = move_line.product_id.uom_id.id
- to_uom_id = move_line.product_id.uos_id.id
+ to_uom_id = move_line.product_id.uos_id and move_line.product_id.uos_id.id or False
price = move_line.sale_line_id.price_unit
coeff = move_line.product_id.uos_coeff
if from_uom_id != to_uom_id and coeff != 0:
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 117a5790573..213873a0480 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -1904,12 +1904,6 @@ class stock_move(osv.osv):
acc_variation = accounts.get('property_stock_variation', False)
journal_id = accounts['stock_journal']
- if acc_dest == acc_variation:
- raise osv.except_osv(_('Error!'), _('Can not create Journal Entry, Output Account on defined on this product and Variant account on category of this product is same.'))
-
- if acc_src == acc_variation:
- raise osv.except_osv(_('Error!'), _('Can not create Journal Entry, Input Account on defined on this product and Variant account on category of this product is same.'))
-
if not acc_src:
raise osv.except_osv(_('Error!'), _('There is no stock input account defined for this product or its category: "%s" (id: %d)') % \
(move.product_id.name, move.product_id.id,))
@@ -2422,11 +2416,6 @@ class stock_inventory(osv.osv):
return self.pool.get('stock.move').create(cr, uid, move_vals)
def action_done(self, cr, uid, ids, context=None):
- """ Finished the inventory
- @return: True
- """
- if context is None:
- context = {}
move_obj = self.pool.get('stock.move')
for inv in self.browse(cr, uid, ids, context=context):
move_obj.action_done(cr, uid, [x.id for x in inv.move_ids], context=context)
@@ -2434,7 +2423,7 @@ class stock_inventory(osv.osv):
return True
def action_confirm(self, cr, uid, ids, context=None):
- """ Confirm the inventory and writes its finished date
+ """ Finishes the inventory and writes its finished date
@return: True
"""
if context is None:
@@ -2445,7 +2434,7 @@ class stock_inventory(osv.osv):
product_context = dict(context, compute_child=False)
location_obj = self.pool.get('stock.location')
- for inv in self.browse(cr, uid, ids, context=context):
+ for inv in self.browse(cr, uid, ids):
move_ids = []
for line in inv.inventory_line_id:
pid = line.product_id.id
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index 5a0366cccc0..6fa7a7950bc 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -100,7 +100,7 @@
+ type="action" icon="terp-stock_effects-object-colorize" states="draft,confirm"/>