From 9cb1b65cc73c815cb3e1668219e00d789882fd8d Mon Sep 17 00:00:00 2001 From: Saurang Suthar Date: Mon, 12 Nov 2012 17:37:29 +0530 Subject: [PATCH 001/133] [IMP]stock:displayed most recent stock moves on the top in list view of Stock Moves bzr revid: ssu@tinyerp.com-20121112120729-wb57o4mmdug6exlg --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 606cb9247d5..12b56eb6289 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1606,7 +1606,7 @@ class stock_move(osv.osv): _name = "stock.move" _description = "Stock Move" - _order = 'date_expected desc, id' + _order = 'id desc, picking_id' _log_create = False def action_partial_move(self, cr, uid, ids, context=None): From 50fa72389b9348ec330b6b4a1f5ecf1f226508b1 Mon Sep 17 00:00:00 2001 From: Saurang Suthar Date: Mon, 12 Nov 2012 19:03:21 +0530 Subject: [PATCH 002/133] [IMP]delivery:set kg as UoM with weight field in Internal Moves bzr revid: ssu@tinyerp.com-20121112133321-qkksfl7lg7423d1j --- addons/delivery/delivery_view.xml | 9 +++++++-- addons/delivery/stock.py | 13 +++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml index 9b67d6b01b9..a8a2478f339 100644 --- a/addons/delivery/delivery_view.xml +++ b/addons/delivery/delivery_view.xml @@ -243,8 +243,13 @@ - - + + + + + + + diff --git a/addons/delivery/stock.py b/addons/delivery/stock.py index c3ce236dc2e..a975314d2ab 100644 --- a/addons/delivery/stock.py +++ b/addons/delivery/stock.py @@ -66,6 +66,7 @@ class stock_picking(osv.osv): }), 'carrier_tracking_ref': fields.char('Carrier Tracking Ref', size=32), 'number_of_packages': fields.integer('Number of Packages'), + 'uom_id': fields.related('uom_id', 'product_id', type='many2one', relation='product.uom', string='UoM', readonly=True), } def _prepare_shipping_invoice_line(self, cr, uid, picking, invoice, context=None): @@ -133,6 +134,18 @@ class stock_picking(osv.osv): invoice_obj.button_compute(cr, uid, [invoice.id], context=context) return result + def _get_uom(self, cr, uid, context=None): + try: + product = self.pool.get('ir.model.data').get_object(cr, uid, 'product', 'product_uom_kgm') + 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 = { + 'uom_id': _get_uom, + } + stock_picking() class stock_move(osv.osv): From a232b8559002ecae2ea10f863a1d02c32bc72ddb Mon Sep 17 00:00:00 2001 From: "pankita shah (Open ERP)" Date: Wed, 21 Nov 2012 12:47:18 +0530 Subject: [PATCH 003/133] [IMP] in height,width,length add cm and imrove stock Journal, and imrove date_done field in incomming_shippment,internal moves and delivery order bzr revid: shp@tinyerp.com-20121121071718-cl9dbck5nd37i9ei --- addons/product/product.py | 14 ++++++++++ addons/product/product_view.xml | 46 +++++++++++++++++++-------------- addons/stock/product.py | 2 +- addons/stock/stock.py | 4 ++- 4 files changed, 44 insertions(+), 22 deletions(-) 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'), From 991f538fb1797292920ca5272f2cf886a2685449 Mon Sep 17 00:00:00 2001 From: "pankita shah (Open ERP)" Date: Thu, 22 Nov 2012 14:37:31 +0530 Subject: [PATCH 004/133] [IMP] cm,kg with height,length,widthand wigth bzr revid: shp@tinyerp.com-20121122090731-ozrp4wudie5e2row --- addons/delivery/delivery_view.xml | 2 +- addons/delivery/stock.py | 12 ++---------- addons/product/product.py | 21 +++++++-------------- addons/product/product_view.xml | 6 +++--- 4 files changed, 13 insertions(+), 28 deletions(-) diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml index a8a2478f339..006e70a0324 100644 --- a/addons/delivery/delivery_view.xml +++ b/addons/delivery/delivery_view.xml @@ -248,7 +248,7 @@ - +
diff --git a/addons/delivery/stock.py b/addons/delivery/stock.py index a975314d2ab..a84a22654b2 100644 --- a/addons/delivery/stock.py +++ b/addons/delivery/stock.py @@ -66,7 +66,7 @@ class stock_picking(osv.osv): }), 'carrier_tracking_ref': fields.char('Carrier Tracking Ref', size=32), 'number_of_packages': fields.integer('Number of Packages'), - 'uom_id': fields.related('uom_id', 'product_id', type='many2one', relation='product.uom', string='UoM', readonly=True), + 'product_uom_weight': fields.many2one('product.uom', 'Unit of Measure', required=True,readonly="1",help="Unit of Measure (Unit of Measure) is the unit of measurement for Duration",), } def _prepare_shipping_invoice_line(self, cr, uid, picking, invoice, context=None): @@ -134,16 +134,8 @@ class stock_picking(osv.osv): invoice_obj.button_compute(cr, uid, [invoice.id], context=context) return result - def _get_uom(self, cr, uid, context=None): - try: - product = self.pool.get('ir.model.data').get_object(cr, uid, 'product', 'product_uom_kgm') - 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 = { - 'uom_id': _get_uom, + 'product_uom_weight': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('kg'))], context=c)[0], } stock_picking() diff --git a/addons/product/product.py b/addons/product/product.py index 1c45ee7f24b..6bee0567480 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -784,9 +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), + 'product_uom_width': fields.many2one('product.uom', 'Unit of Measure',readonly="1", required=True, help="Unit of Measure (Unit of Measure) is the unit of measurement for Duration",), + 'product_uom_length': fields.many2one('product.uom', 'Unit of Measure', readonly="1",required=True, help="Unit of Measure (Unit of Measure) is the unit of measurement for Duration",), + 'product_uom_height': fields.many2one('product.uom', 'Unit of Measure',readonly="1", required=True, help="Unit of Measure (Unit of Measure) is the unit of measurement for Duration",), } @@ -812,21 +812,14 @@ 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, + 'product_uom_width': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('cm'))], context=c)[0], + 'product_uom_length': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('cm'))], context=c)[0], + 'product_uom_height': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('cm'))], context=c)[0] + } def checksum(ean): diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml index e92331d77a0..5f1c55c6bdb 100644 --- a/addons/product/product_view.xml +++ b/addons/product/product_view.xml @@ -564,11 +564,11 @@ - + - + - + From f6e0139229f0821febb12207ec5791545f7d99e5 Mon Sep 17 00:00:00 2001 From: "pankita shah (Open ERP)" Date: Thu, 22 Nov 2012 16:47:25 +0530 Subject: [PATCH 005/133] [IMP] view of product and additiona info tab in internal moves bzr revid: shp@tinyerp.com-20121122111725-nkbap0et70s3m2nm --- addons/delivery/delivery_view.xml | 13 ++++++------- addons/product/product_view.xml | 22 ++++++++++++++++------ 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml index 006e70a0324..6f124ebfcba 100644 --- a/addons/delivery/delivery_view.xml +++ b/addons/delivery/delivery_view.xml @@ -243,13 +243,12 @@ - - - - - - - + diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml index 5f1c55c6bdb..df4d72715eb 100644 --- a/addons/product/product_view.xml +++ b/addons/product/product_view.xml @@ -563,12 +563,22 @@ - - - - - - +