From a33cbbd0735f5176282a3172d93a1f770e6f678b Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Wed, 22 Dec 2010 12:53:17 +0530 Subject: [PATCH 01/61] [IMP]:Improve demo data for purchase bzr revid: ksa@tinyerp.co.in-20101222072317-jbcu40mjvj0vguc0 --- addons/purchase/purchase_demo.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/purchase/purchase_demo.xml b/addons/purchase/purchase_demo.xml index 053c6f17b14..26593d419a6 100644 --- a/addons/purchase/purchase_demo.xml +++ b/addons/purchase/purchase_demo.xml @@ -5,7 +5,7 @@ - + @@ -26,7 +26,7 @@ - 2010/09/15 + 2010/12/23 New server config + material @@ -36,7 +36,7 @@ - 2010/09/15 + 2010/12/23 [PC1] Basic PC @@ -46,7 +46,7 @@ - 2010/09/15 + 2010/12/23 [PC3] Medium PC From 3583858ee66a8222398bf6fcf8d24eb1690d8f46 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Fri, 31 Dec 2010 15:59:40 +0530 Subject: [PATCH 02/61] [REF]: stock: Removed print statement bzr revid: rpa@tinyerp.com-20101231102940-o6r6fdcwno4zy70m --- addons/stock/wizard/stock_partial_move.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/addons/stock/wizard/stock_partial_move.py b/addons/stock/wizard/stock_partial_move.py index b982a4023ef..8a3b5fd7694 100644 --- a/addons/stock/wizard/stock_partial_move.py +++ b/addons/stock/wizard/stock_partial_move.py @@ -190,11 +190,7 @@ class stock_partial_move(osv.osv_memory): p_moves = {} picking_type = self.__get_picking_type(cr, uid, move_ids) - print picking_type moves_list = picking_type == 'product_moves_in' and partial.product_moves_in or partial.product_moves_out - print picking_type == 'product_moves_in' - print partial.product_moves_out - print moves_list for product_move in moves_list: p_moves[product_move.move_id.id] = product_move @@ -205,9 +201,6 @@ class stock_partial_move(osv.osv_memory): if not p_moves.get(move.id): continue - print p_moves[move.id].product_id.id - print p_moves[move.id].quantity - print p_moves[move.id].product_uom.id partial_datas['move%s' % (move.id)] = { 'product_id' : p_moves[move.id].id, @@ -224,7 +217,6 @@ class stock_partial_move(osv.osv_memory): }) - print partial_datas move_obj.do_partial(cr, uid, moves_ids_final, partial_datas, context=context) return {} From 29cf676c6573b43275e4b70f2849314af88dee36 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Fri, 31 Dec 2010 17:13:54 +0530 Subject: [PATCH 03/61] [IMP]Improvement on code price_multi_get()bug:-693056 bzr revid: ron@tinyerp.com-20101231114354-61298bobh43f71uw --- addons/product/pricelist.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py index cd8c338da89..5d2a639384b 100644 --- a/addons/product/pricelist.py +++ b/addons/product/pricelist.py @@ -166,10 +166,9 @@ class product_pricelist(osv.osv): pricelist_version_ids = pricelist_ids else: # all pricelists: - pricelist_version_ids = product_pricelist_version_obj.search(cr, uid, []) + pricelist_version_ids = self.pool.get('product.pricelist').search(cr, uid, []) pricelist_version_ids = list(set(pricelist_version_ids)) - plversions_search_args = [ ('pricelist_id', 'in', pricelist_version_ids), '|', From bf00ee7f5cbd05edf189e1e1c7e9743b26a1d6c6 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Fri, 31 Dec 2010 18:17:48 +0530 Subject: [PATCH 04/61] [FIX]procurement exception when there is stock lp bug: https://launchpad.net/bugs/691709 fixed bzr revid: ron@tinyerp.com-20101231124748-dsl8xcr1nslppgqp --- addons/sale/sale.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index cac858d765b..1051d035fa7 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -739,12 +739,13 @@ class sale_order(osv.osv): proc_obj.write(cr, uid, [proc_id], {'product_qty': mov.product_qty, 'product_uos_qty': mov.product_uos_qty}) val = {} - for proc_id in proc_ids: - wf_service.trg_validate(uid, 'procurement.order', proc_id, 'button_confirm', cr) if picking_id: wf_service.trg_validate(uid, 'stock.picking', picking_id, 'button_confirm', cr) + for proc_id in proc_ids: + wf_service.trg_validate(uid, 'procurement.order', proc_id, 'button_confirm', cr) + if order.state == 'shipping_except': val['state'] = 'progress' val['shipped'] = False From 2a55f1bc7720d09f3bc42557f7c1941080dd4fda Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Mon, 3 Jan 2011 11:39:04 +0530 Subject: [PATCH 05/61] [FIX]purchase_requisition:After Install purchase_requisition Error opening on Purchange Menu bzr revid: ron@tinyerp.com-20110103060904-davd50590m3aea69 --- addons/purchase_requisition/purchase_requisition_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase_requisition/purchase_requisition_view.xml b/addons/purchase_requisition/purchase_requisition_view.xml index ce67b0921c3..e21f893f9ac 100644 --- a/addons/purchase_requisition/purchase_requisition_view.xml +++ b/addons/purchase_requisition/purchase_requisition_view.xml @@ -21,7 +21,7 @@ purchase.order - + From 89a30feb3b152ab0872d4d56caf460d8010a21aa Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Mon, 3 Jan 2011 11:49:02 +0530 Subject: [PATCH 06/61] [FIX]: purchase: Fixed wrong product reference in demo bzr revid: rpa@tinyerp.com-20110103061902-reeh2wyfm6q94loi --- addons/purchase/purchase_demo.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase/purchase_demo.xml b/addons/purchase/purchase_demo.xml index 053c6f17b14..c4d69699d5e 100644 --- a/addons/purchase/purchase_demo.xml +++ b/addons/purchase/purchase_demo.xml @@ -48,7 +48,7 @@ 2010/09/15 [PC3] Medium PC - + 900 1 From 675823ac968a53a46ec7045a8700e8733f110c99 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Mon, 3 Jan 2011 12:21:36 +0530 Subject: [PATCH 07/61] [FIX]Purchase:Statistics report should not be allow for Purchase/User group lp bug: https://launchpad.net/bugs/690115 fixed bzr revid: ron@tinyerp.com-20110103065136-zbgq7czfl7klo9v0 --- addons/purchase/report/purchase_report_view.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/purchase/report/purchase_report_view.xml b/addons/purchase/report/purchase_report_view.xml index 7f52ca73cf0..40c05e2955c 100644 --- a/addons/purchase/report/purchase_report_view.xml +++ b/addons/purchase/report/purchase_report_view.xml @@ -171,7 +171,8 @@ - + From 3555482395cb9530bc27dbffd3ac677995d54f07 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Mon, 3 Jan 2011 12:28:05 +0530 Subject: [PATCH 08/61] [IMP]: purchase: Improvement in translation file bzr revid: rpa@tinyerp.com-20110103065805-2fibb5jpavl01tl8 --- addons/purchase/i18n/purchase.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase/i18n/purchase.pot b/addons/purchase/i18n/purchase.pot index f2618d4263b..00e6459d82f 100644 --- a/addons/purchase/i18n/purchase.pot +++ b/addons/purchase/i18n/purchase.pot @@ -539,7 +539,7 @@ msgstr "" #. module: purchase #: view:purchase.order:0 -msgid "To be Invoiced" +msgid "No Invoice" msgstr "" #. module: purchase From 11479a625fb8895ddee33e1df70f0a253961a7d3 Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Mon, 3 Jan 2011 16:10:49 +0530 Subject: [PATCH 09/61] [FIX]:mrp repair does not work with products with lot tracking lp bug: https://launchpad.net/bugs/695343 fixed bzr revid: ksa@tinyerp.co.in-20110103104049-ujw59m9j8kh96pok --- addons/mrp_repair/mrp_repair.py | 2 ++ addons/mrp_repair/mrp_repair_view.xml | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py index 899a7460fdf..8fde87c0e00 100644 --- a/addons/mrp_repair/mrp_repair.py +++ b/addons/mrp_repair/mrp_repair.py @@ -535,6 +535,7 @@ class mrp_repair(osv.osv): 'location_id': move.location_id.id, 'location_dest_id': move.location_dest_id.id, 'tracking_id': False, + 'prodlot_id': move.prodlot_id and move.prodlot_id.id or False, 'state': 'done', }) repair_line_obj.write(cr, uid, [move.id], {'move_id': move_id, 'state': 'done'}, context=context) @@ -661,6 +662,7 @@ class mrp_repair_line(osv.osv, ProductChangeMixin): 'tax_id': fields.many2many('account.tax', 'repair_operation_line_tax', 'repair_operation_line_id', 'tax_id', 'Taxes'), 'product_uom_qty': fields.float('Quantity (UoM)', digits=(16,2), required=True), 'product_uom': fields.many2one('product.uom', 'Product UoM', required=True), + 'prodlot_id': fields.many2one('stock.production.lot', 'Lot Number',domain="[('product_id','=',product_id)]"), 'invoice_line_id': fields.many2one('account.invoice.line', 'Invoice Line', readonly=True), 'location_id': fields.many2one('stock.location', 'Source Location', required=True, select=True), 'location_dest_id': fields.many2one('stock.location', 'Dest. Location', required=True, select=True), diff --git a/addons/mrp_repair/mrp_repair_view.xml b/addons/mrp_repair/mrp_repair_view.xml index 11a9eadb249..724dafc741d 100644 --- a/addons/mrp_repair/mrp_repair_view.xml +++ b/addons/mrp_repair/mrp_repair_view.xml @@ -49,7 +49,8 @@ - + + @@ -178,7 +179,7 @@ - + @@ -202,7 +203,7 @@ - + Repair Orders @@ -212,7 +213,7 @@ tree,form Repair orders allow you to organize your product repairs. In a repair order, you can detail the components you remove, add or replace and record the time you spent on the different operations. The repair order uses the warranty date on the production lot in order to know if whether the repair should be invoiced to the customer or not. - + From b430f760ae82b5aee42522a4560d9558d87a0715 Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Mon, 3 Jan 2011 16:19:33 +0530 Subject: [PATCH 10/61] [FIX] stock:Cancelling periodic inventory is now cancel account move lp bug: https://launchpad.net/bugs/458901 fixed bzr revid: aag@tinyerp.co.in-20110103104933-qip7fqkxbl5gyaar --- addons/stock/stock.py | 13 ++++++++++++- addons/stock/stock_view.xml | 4 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 88924105c16..42eeb615f84 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2573,8 +2573,19 @@ class stock_inventory(osv.osv): """ Cancels the stock move and change inventory state to draft. @return: True """ + move_obj = self.pool.get('stock.move') + account_move_obj = self.pool.get('account.move') for inv in self.browse(cr, uid, ids, context=context): - self.pool.get('stock.move').action_cancel(cr, uid, [x.id for x in inv.move_ids], context) + move_obj.action_cancel(cr, uid, [x.id for x in inv.move_ids], context) + for move in inv.move_ids: + account_move_ids = account_move_obj.search(cr, uid, [('name','=',move.name)]) + if account_move_ids: + account_move_data_l = account_move_obj.read(cr, uid, account_move_ids, ['state']) + for account_move in account_move_data_l: + if account_move['state'] == 'posted': + raise osv.except_osv(_('UserError'), + _('You can not cancel inventory which has any account move with posted state.')) + account_move_obj.unlink(cr, uid, [account_move['id']]) self.write(cr, uid, [inv.id], {'state': 'draft'}) return True diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 86135e8f13d..95e97161e5e 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -170,8 +170,8 @@ - -