diff --git a/addons/product/product.py b/addons/product/product.py
index 1333c9581a7..1c45ee7f24b 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -784,6 +784,9 @@ class product_packaging(osv.osv):
'height': fields.float('Height', help='The height of the package'),
'width': fields.float('Width', help='The width of the package'),
'length': fields.float('Length', help='The length of the package'),
+ 'uom_id': fields.related('uom_id', 'product_id', type='many2one', relation='product.uom', string='UoM', readonly=True),
+ 'uom_id1': fields.related('uom_id', 'product_id', type='many2one', relation='product.uom', string='UoM', readonly=True),
+ 'uom_id2': fields.related('uom_id', 'product_id', type='many2one', relation='product.uom', string='UoM', readonly=True),
}
@@ -809,10 +812,21 @@ class product_packaging(osv.osv):
res = cr.fetchone()
return (res and res[0]) or False
+ def _get_uom(self, cr, uid, context=None):
+ try:
+ product = self.pool.get('ir.model.data').get_object(cr, uid, 'product', 'product_uom_cm')
+ except ValueError:
+ # a ValueError is returned if the xml id given is not found in the table ir_model_data
+ return False
+ return product.id
+
_defaults = {
'rows' : lambda *a : 3,
'sequence' : lambda *a : 1,
'ul' : _get_1st_ul,
+ 'uom_id': _get_uom,
+ 'uom_id1': _get_uom,
+ 'uom_id2': _get_uom,
}
def checksum(ean):
diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml
index 7b4197305d4..e92331d77a0 100644
--- a/addons/product/product_view.xml
+++ b/addons/product/product_view.xml
@@ -547,26 +547,32 @@
product.packaging
diff --git a/addons/stock/product.py b/addons/stock/product.py
index 4d955495c28..d535f85bc64 100644
--- a/addons/stock/product.py
+++ b/addons/stock/product.py
@@ -530,7 +530,7 @@ class product_category(osv.osv):
_columns = {
'property_stock_journal': fields.property('account.journal',
relation='account.journal', type='many2one',
- string='Stock journal', view_load=True,
+ string='Stock Journal', view_load=True,
help="When doing real-time inventory valuation, this is the Accounting Journal in which entries will be automatically posted when stock moves are processed."),
'property_stock_account_input_categ': fields.property('account.account',
type='many2one', relation='account.account',
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 03a9ede7221..a3dfcd079ff 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -655,7 +655,7 @@ class stock_picking(osv.osv):
'min_date': fields.function(get_min_max_date, fnct_inv=_set_minimum_date, multi="min_max_date",
store=True, type='datetime', string='Scheduled Time', select=1, help="Scheduled time for the shipment to be processed"),
'date': fields.datetime('Time', help="Creation time, usually the time of the order.", select=True, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
- 'date_done': fields.datetime('Date Done', help="Date of Completion", states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
+ 'date_done': fields.datetime('Date of Transfer', help="Date of Completion", states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
'max_date': fields.function(get_min_max_date, fnct_inv=_set_maximum_date, multi="min_max_date",
store=True, type='datetime', string='Max. Expected Date', select=2),
'move_lines': fields.one2many('stock.move', 'picking_id', 'Internal Moves', states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}),
@@ -3035,6 +3035,7 @@ class stock_picking_in(osv.osv):
_columns = {
'backorder_id': fields.many2one('stock.picking.in', 'Back Order of', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="If this shipment was split, then this field links to the shipment which contains the already processed part.", select=True),
+ 'date_done': fields.datetime('Date of Reception', help="Date of Completion", states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
'state': fields.selection(
[('draft', 'Draft'),
('auto', 'Waiting Another Operation'),
@@ -3080,6 +3081,7 @@ class stock_picking_out(osv.osv):
_columns = {
'backorder_id': fields.many2one('stock.picking.out', 'Back Order of', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="If this shipment was split, then this field links to the shipment which contains the already processed part.", select=True),
+ 'date_done': fields.datetime('Date of Delivery ', help="Date of Completion", states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
'state': fields.selection(
[('draft', 'Draft'),
('auto', 'Waiting Another Operation'),