From 412561c37bf814ac11b16de60135256b89cef155 Mon Sep 17 00:00:00 2001 From: niv Date: Mon, 18 Oct 2010 12:35:57 +0200 Subject: [PATCH 01/38] [IMP] Modified Belgian accounting localization to have correct default tax account bzr revid: niv@niv-laptop-20101018103557-au9q9mzcf6ei8ijb --- addons/account/account.py | 10 +++-- addons/l10n_be/account_pcmn_belgium.xml | 50 +++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 4 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index f65f8edd56f..3f0784247cd 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2874,10 +2874,12 @@ class wizard_multi_charts_accounts(osv.osv_memory): obj_ac_fp.create(cr, uid, vals_acc) ir_values = self.pool.get('ir.values') - ir_values.set(cr, uid, key='default', key2=False, name="taxes_id", company=obj_multi.company_id.id - , models =[('product.product',False)], value=[tax_template_to_tax[obj_multi.sale_tax.id]]) - ir_values.set(cr, uid, key='default', key2=False, name="supplier_taxes_id", company=obj_multi.company_id.id - , models =[('product.product',False)], value=[tax_template_to_tax[obj_multi.purchase_tax.id]]) + if obj_multi.sale_tax: + ir_values.set(cr, uid, key='default', key2=False, name="taxes_id", company=obj_multi.company_id.id + , models =[('product.product',False)], value=[tax_template_to_tax[obj_multi.sale_tax.id]]) + if obj_multi.purchase_tax: + ir_values.set(cr, uid, key='default', key2=False, name="supplier_taxes_id", company=obj_multi.company_id.id + , models =[('product.product',False)], value=[tax_template_to_tax[obj_multi.purchase_tax.id]]) wizard_multi_charts_accounts() diff --git a/addons/l10n_be/account_pcmn_belgium.xml b/addons/l10n_be/account_pcmn_belgium.xml index dc6c86fc9fa..7482250db8d 100644 --- a/addons/l10n_be/account_pcmn_belgium.xml +++ b/addons/l10n_be/account_pcmn_belgium.xml @@ -6666,6 +6666,7 @@ sale + 5 @@ -6676,6 +6677,7 @@ sale + 2 @@ -6690,6 +6692,7 @@ sale + 3 @@ -6704,6 +6707,7 @@ sale + 4 @@ -6718,6 +6722,7 @@ sale + 1 @@ -6732,6 +6737,7 @@ sale + 6 @@ -6744,6 +6750,7 @@ percent purchase + 7 @@ -6754,6 +6761,7 @@ purchase + 8 @@ -6764,6 +6772,7 @@ purchase + 9 @@ -6773,6 +6782,7 @@ percent purchase + 10 @@ -6783,6 +6793,7 @@ purchase + 11 @@ -6793,6 +6804,7 @@ purchase + 12 @@ -6802,6 +6814,7 @@ percent purchase + 13 @@ -6816,6 +6829,7 @@ purchase + 14 @@ -6826,6 +6840,7 @@ purchase + 15 @@ -6835,6 +6850,7 @@ percent purchase + 16 @@ -6849,6 +6865,7 @@ purchase + 17 @@ -6859,6 +6876,7 @@ purchase + 18 @@ -6868,6 +6886,7 @@ percent purchase + 19 @@ -6882,6 +6901,7 @@ purchase + 20 @@ -6892,6 +6912,7 @@ purchase + 21 @@ -6901,6 +6922,7 @@ percent purchase + 22 @@ -6915,6 +6937,7 @@ purchase + 23 @@ -6925,6 +6948,7 @@ purchase + 24 @@ -6936,6 +6960,7 @@ percent purchase + 25 @@ -6950,6 +6975,7 @@ purchase + 26 @@ -6960,6 +6986,7 @@ purchase + 27 @@ -6969,6 +6996,7 @@ percent purchase + 28 @@ -6983,6 +7011,7 @@ purchase + 29 @@ -6993,6 +7022,7 @@ purchase + 30 @@ -7002,6 +7032,7 @@ percent purchase + 31 @@ -7016,6 +7047,7 @@ purchase + 32 @@ -7026,6 +7058,7 @@ purchase + 33 @@ -7039,6 +7072,7 @@ sale + 34 @@ -7054,6 +7088,7 @@ purchase + 35 @@ -7068,6 +7103,7 @@ sale + 36 @@ -7078,6 +7114,7 @@ sale + 37 @@ -7088,6 +7125,7 @@ sale + 38 @@ -7100,6 +7138,7 @@ percent purchase + 39 @@ -7113,6 +7152,7 @@ purchase + 40 @@ -7128,6 +7168,7 @@ purchase + 41 @@ -7138,6 +7179,7 @@ purchase + 42 @@ -7147,6 +7189,7 @@ percent purchase + 43 @@ -7160,6 +7203,7 @@ purchase + 44 @@ -7175,6 +7219,7 @@ purchase + 45 @@ -7185,6 +7230,7 @@ purchase + 46 @@ -7194,6 +7240,7 @@ percent purchase + 47 @@ -7207,6 +7254,7 @@ purchase + 48 @@ -7222,6 +7270,7 @@ purchase + 49 @@ -7232,6 +7281,7 @@ purchase + 50 From a5f271f50de72282bbaaac624d14295eef7d51f4 Mon Sep 17 00:00:00 2001 From: nvi-openerp Date: Tue, 19 Oct 2010 16:48:45 +0200 Subject: [PATCH 02/38] [FIX] Fixed problem with hr when we use a addons_path with multiple paths bzr revid: nicolas.vanhoren@openerp.com-20101019144845-xaln01cug0hw8ykv --- addons/hr/hr.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 240511a03a0..d3cb41fc89d 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -184,9 +184,12 @@ class hr_employee(osv.osv): return {'value': {'work_email':mail.user_email}} def _get_photo(self, cr, uid, context=None): - return open(os.path.join( - tools.config['addons_path'], 'hr/image', 'photo.png'), - 'rb') .read().encode('base64') + paths = tools.config['addons_path'].split(",") + for path in paths: + full_path = os.path.join(path, 'hr/image', 'photo.png') + if os.path.exists(full_path): + return open(full_path,'rb') .read().encode('base64') + raise Exception("photo.png could not be found") _defaults = { 'active': 1, From 7d4e5af835536604b37819675f1eef12f39774cd Mon Sep 17 00:00:00 2001 From: "uco (OpenERP)" Date: Wed, 20 Oct 2010 15:43:08 +0530 Subject: [PATCH 03/38] [FIX] mrp_repair: yaml corrected. bzr revid: uco@tinyerp.com-20101020101308-cdjs4am5f9wgzbi8 --- addons/mrp_repair/test/test_mrp_repair.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mrp_repair/test/test_mrp_repair.yml b/addons/mrp_repair/test/test_mrp_repair.yml index 1cf82635825..3d9e85aa3ac 100644 --- a/addons/mrp_repair/test/test_mrp_repair.yml +++ b/addons/mrp_repair/test/test_mrp_repair.yml @@ -85,7 +85,7 @@ obj_lines = self.pool.get('account.invoice.line') inv_obj = self.pool.get('account.invoice') repair_id = self.browse(cr, uid, [ref('mrp_repair_rma0')], context=context)[0] - invoice_ids = inv_obj.search(cr, uid, [('partner_id', '=', repair_id.partner_invoice_id.id)]) + invoice_ids = inv_obj.search(cr, uid, [('partner_id', '=', repair_id.partner_id.id)]) invoice_id = inv_obj.browse(cr, uid, invoice_ids)[0] - assert repair_id.partner_invoice_id.id == invoice_id.partner_id.id, "No invoice existing for the same partner" + assert repair_id.partner_id.id == invoice_id.partner_id.id, "No invoice existing for the same partner" From 988d4d488b187ab3af1dd1aaf2c5bca8f3df468e Mon Sep 17 00:00:00 2001 From: "uco (OpenERP)" Date: Wed, 20 Oct 2010 19:27:35 +0530 Subject: [PATCH 04/38] [IMP] mrp, stock: Improvements suggested by buildbot. bzr revid: uco@tinyerp.com-20101020135735-hofrhxqqpvkycjje --- addons/mrp/mrp.py | 2 -- addons/stock/stock.py | 1 - 2 files changed, 3 deletions(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index cee60e63023..751cf384b6e 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -19,8 +19,6 @@ # ############################################################################## -from itertools import groupby -from operator import itemgetter from datetime import datetime from osv import osv, fields from tools.translate import _ diff --git a/addons/stock/stock.py b/addons/stock/stock.py index fe984b10f22..4f760936e11 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2008,7 +2008,6 @@ class stock_move(osv.osv): for id in ids: wf_service.trg_trigger(uid, 'stock.move', id, cr) - picking_obj = self.pool.get('stock.picking') wf_service = netsvc.LocalService("workflow") for pick_id in picking_ids: wf_service.trg_write(uid, 'stock.picking', pick_id, cr) From 8d2be57afa67e85019fe6b2219613424d0c67014 Mon Sep 17 00:00:00 2001 From: "uco (OpenERP)" Date: Thu, 21 Oct 2010 16:03:45 +0530 Subject: [PATCH 05/38] [FIX] auction: Fixed unicode character error from Report. bzr revid: uco@tinyerp.com-20101021103345-48ook5fhyr8p7ff2 --- addons/auction/report/catalog2.xsl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/auction/report/catalog2.xsl b/addons/auction/report/catalog2.xsl index ea27162428d..c44d0e83047 100755 --- a/addons/auction/report/catalog2.xsl +++ b/addons/auction/report/catalog2.xsl @@ -1,5 +1,5 @@ - - + + @@ -30,7 +30,7 @@ - - Vente antiquitée le      + Antiques on sale From 36dd47081b0e526172d13ebc62e3b06af0546302 Mon Sep 17 00:00:00 2001 From: "JMA (OpenERP)" Date: Thu, 21 Oct 2010 18:16:32 +0530 Subject: [PATCH 06/38] [FIX] mrp : Corrections for Work Order names bzr revid: jma@tinyerp.com-20101021124632-vfv5jesa55mzkxz7 --- addons/mrp/mrp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index cee60e63023..ac75c81426a 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -26,6 +26,7 @@ from osv import osv, fields from tools.translate import _ import netsvc import time +import tools #---------------------------------------------------------- @@ -311,7 +312,7 @@ class mrp_bom(osv.osv): mult = (d + (m and 1.0 or 0.0)) cycle = mult * wc_use.cycle_nbr result2.append({ - 'name': bom.routing_id.name, + 'name': tools.ustr(wc_use.name) + ' - ' + tools.ustr(bom.product_id.name), 'workcenter_id': wc.id, 'sequence': level+(wc_use.sequence or 0), 'cycle': cycle, From bbbcdbdbdbf76cfcecac5450d577ff17ab3fa18c Mon Sep 17 00:00:00 2001 From: "uco (OpenERP)" Date: Mon, 25 Oct 2010 10:51:11 +0530 Subject: [PATCH 07/38] [IMP] mrp_repair: Giving access rights to mrp manager to make invoice for repair order. bzr revid: uco@tinyerp.com-20101025052111-zja70wp086r60ooy --- addons/mrp_repair/security/ir.model.access.csv | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/mrp_repair/security/ir.model.access.csv b/addons/mrp_repair/security/ir.model.access.csv index e8b611bd933..b7f0c156fb9 100644 --- a/addons/mrp_repair/security/ir.model.access.csv +++ b/addons/mrp_repair/security/ir.model.access.csv @@ -21,4 +21,9 @@ "access_account_tax_manager","account.tax manager","account.model_account_tax","mrp.group_mrp_manager",1,0,0,0 "access_mrp_repair_fee_user_mrp","MRP Repair Fee user mrp","model_mrp_repair_fee","mrp.group_mrp_user",1,1,1,1 "access_mrp_repair_fee_mgr","MRP Repair Fee mgr","model_mrp_repair_fee","mrp.group_mrp_manager",1,0,0,0 - +"access_account_invoice_user","account.invoice","account.model_account_invoice","mrp.group_mrp_user",1,1,1,1 +"access_account_invoice_manager","account.invoice manager","account.model_account_invoice","mrp.group_mrp_manager",1,0,0,0 +"access_account_invoice_line_user","account.invoice.line","account.model_account_invoice_line","mrp.group_mrp_user",1,1,1,1 +"access_account_invoice_line_manager","account.invoice.line manager","account.model_account_invoice_line","mrp.group_mrp_manager",1,0,0,0 +"access_account_journal_user","account.journal","account.model_account_journal","mrp.group_mrp_user",1,1,1,1 +"access_account_journal_manager","account.journal manager","account.model_account_journal","mrp.group_mrp_manager",1,0,0,0 From 015e3d3a34f0f56410294a47f1c81ecce4afce9d Mon Sep 17 00:00:00 2001 From: "JMA (OpenERP)" Date: Mon, 25 Oct 2010 12:28:54 +0530 Subject: [PATCH 08/38] [FIX] project : Corrected field name bzr revid: jma@tinyerp.com-20101025065854-og24p6yxmapnrhxk --- addons/project/project_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 8cf262237da..29b7e244ee6 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -85,7 +85,7 @@