From c1e6ff9445ad9e1595d93ee60bdd10effa7b161c Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 31 Oct 2013 19:10:18 +0100 Subject: [PATCH 01/12] [FIX] */report: font names are case sensitive bzr revid: chs@openerp.com-20131031181018-pkbtgd3ix5ke4veg --- addons/account/report/account_balance.rml | 1 + .../report/analytic_account_budget_report.rml | 10 ++++---- .../account_budget/report/budget_report.rml | 10 ++++---- .../report/crossovered_budget_report.rml | 10 ++++---- .../survey/report/survey_analysis_report.py | 21 ++++++++-------- .../survey/report/survey_browse_response.py | 24 +++++++++---------- addons/survey/report/survey_form.py | 14 +++++------ 7 files changed, 46 insertions(+), 44 deletions(-) diff --git a/addons/account/report/account_balance.rml b/addons/account/report/account_balance.rml index 6ddfc238bff..08c05c65fa8 100644 --- a/addons/account/report/account_balance.rml +++ b/addons/account/report/account_balance.rml @@ -170,6 +170,7 @@ + diff --git a/addons/account_budget/report/analytic_account_budget_report.rml b/addons/account_budget/report/analytic_account_budget_report.rml index 837825aa4e3..15fddebd02d 100644 --- a/addons/account_budget/report/analytic_account_budget_report.rml +++ b/addons/account_budget/report/analytic_account_budget_report.rml @@ -182,19 +182,19 @@ - [['.....' *(a['status']-1) ]] [[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ a['name'] ]] + [['.....' *(a['status']-1) ]] [[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ a['name'] ]] - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['theo'], currency_obj=company.currency_id) ]] + [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['theo'], currency_obj=company.currency_id) ]] - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['pln'], currency_obj=company.currency_id) ]] + [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['pln'], currency_obj=company.currency_id) ]] - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['prac'], currency_obj=company.currency_id) ]] + [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['prac'], currency_obj=company.currency_id) ]] - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['perc']) ]]% + [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['perc']) ]]% diff --git a/addons/account_budget/report/budget_report.rml b/addons/account_budget/report/budget_report.rml index 8b9835b6615..789c3ed1ffb 100644 --- a/addons/account_budget/report/budget_report.rml +++ b/addons/account_budget/report/budget_report.rml @@ -145,19 +145,19 @@ - [['.....' *(a['status']-1) ]][[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ a['name'] ]] + [['.....' *(a['status']-1) ]][[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ a['name'] ]] - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['theo'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]] + [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['theo'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]] - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['pln'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]] + [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['pln'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]] - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['prac'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]] + [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['prac'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]] - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['perc'], digits=2) ]]% + [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['perc'], digits=2) ]]% diff --git a/addons/account_budget/report/crossovered_budget_report.rml b/addons/account_budget/report/crossovered_budget_report.rml index 50b7d267125..a63920a4c9f 100644 --- a/addons/account_budget/report/crossovered_budget_report.rml +++ b/addons/account_budget/report/crossovered_budget_report.rml @@ -160,19 +160,19 @@ - [['.....' *(a['status']-1) ]][[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ a['name'] ]] + [['.....' *(a['status']-1) ]][[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ a['name'] ]] - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['theo'], dp='Account', currency_obj=company.currency_id) ]] + [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['theo'], dp='Account', currency_obj=company.currency_id) ]] - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['pln'], dp='Account', currency_obj=company.currency_id) ]] + [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['pln'], dp='Account', currency_obj=company.currency_id) ]] - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['prac'], dp='Account', currency_obj=company.currency_id) ]] + [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['prac'], dp='Account', currency_obj=company.currency_id) ]] - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['perc'],digits=2) ]]% + [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['perc'],digits=2) ]]% diff --git a/addons/survey/report/survey_analysis_report.py b/addons/survey/report/survey_analysis_report.py index b4e7765346c..cc61d65169a 100644 --- a/addons/survey/report/survey_analysis_report.py +++ b/addons/survey/report/survey_analysis_report.py @@ -94,20 +94,21 @@ class survey_analysis(report_rml): - - + + - - - - - - - + + + + + + + + - + diff --git a/addons/survey/report/survey_browse_response.py b/addons/survey/report/survey_browse_response.py index 54abe6e34bb..91e534877e7 100644 --- a/addons/survey/report/survey_browse_response.py +++ b/addons/survey/report/survey_browse_response.py @@ -161,18 +161,18 @@ class survey_browse_response(report_rml): - - - + + + - - - - - - - + + + + + + + @@ -183,8 +183,8 @@ class survey_browse_response(report_rml): - - + + """ diff --git a/addons/survey/report/survey_form.py b/addons/survey/report/survey_form.py index 8375df6acaf..e036e2dfcad 100644 --- a/addons/survey/report/survey_form.py +++ b/addons/survey/report/survey_form.py @@ -132,13 +132,13 @@ class survey_form(report_rml): - - - - - - - + + + + + + + From a8eebfe6b4072692aca8c9aa85636b08a0cd7b9e Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 31 Oct 2013 19:43:21 +0100 Subject: [PATCH 02/12] [FIX] account,account_followup,l10n_{ch,es,pt,us,ve}: correct or remove wrong fields in creation bzr revid: chs@openerp.com-20131031184321-2nqqpxowhg03wt4t --- addons/account/data/account_data.xml | 1 - .../account_followup_data.xml | 2 +- addons/l10n_ch/sterchi_chart/account.xml | 3 -- addons/l10n_es/taxes_data_assoc.xml | 2 -- addons/l10n_pt/account_chart_template.xml | 1 - addons/l10n_us/account_chart_template.xml | 9 ------ addons/l10n_ve/data/account_tax.xml | 28 +++++++++---------- 7 files changed, 15 insertions(+), 31 deletions(-) diff --git a/addons/account/data/account_data.xml b/addons/account/data/account_data.xml index 9d2e65a3a4c..8119e9f1002 100644 --- a/addons/account/data/account_data.xml +++ b/addons/account/data/account_data.xml @@ -16,7 +16,6 @@ - Immediate Payment balance diff --git a/addons/account_followup/account_followup_data.xml b/addons/account_followup/account_followup_data.xml index ec18e0d2b0c..1a11db5e5f7 100644 --- a/addons/account_followup/account_followup_data.xml +++ b/addons/account_followup/account_followup_data.xml @@ -162,7 +162,7 @@ ${object.get_followup_table_html() | safe} 0 15 - True + True Dear %(partner_name)s, diff --git a/addons/l10n_ch/sterchi_chart/account.xml b/addons/l10n_ch/sterchi_chart/account.xml index f5f5c09bf55..ef2d73d59e2 100644 --- a/addons/l10n_ch/sterchi_chart/account.xml +++ b/addons/l10n_ch/sterchi_chart/account.xml @@ -177,14 +177,12 @@ Bilan : Debiteurs receivable - unreconciled none Bilan : Fournisseurs payable - unreconciled none @@ -11809,7 +11807,6 @@ - diff --git a/addons/l10n_es/taxes_data_assoc.xml b/addons/l10n_es/taxes_data_assoc.xml index e2ebb47fb59..152b27363af 100644 --- a/addons/l10n_es/taxes_data_assoc.xml +++ b/addons/l10n_es/taxes_data_assoc.xml @@ -44,7 +44,6 @@ Base adquisiciones exentas - -- 1.0 @@ -53,7 +52,6 @@ Base ventas exentas -- - 1.0 diff --git a/addons/l10n_pt/account_chart_template.xml b/addons/l10n_pt/account_chart_template.xml index 3b4a63a4a43..a19eda86b29 100644 --- a/addons/l10n_pt/account_chart_template.xml +++ b/addons/l10n_pt/account_chart_template.xml @@ -15,7 +15,6 @@ - Portugal - Template do Plano de Contas SNC diff --git a/addons/l10n_us/account_chart_template.xml b/addons/l10n_us/account_chart_template.xml index 878991c859d..ac2784e33d7 100644 --- a/addons/l10n_us/account_chart_template.xml +++ b/addons/l10n_us/account_chart_template.xml @@ -6,7 +6,6 @@ Basic Chart of Account - Basic Chart of Account @@ -20,7 +19,6 @@ Cost of Goods sold - @@ -34,7 +32,6 @@ Advertising - @@ -48,7 +45,6 @@ Agriculture - @@ -62,7 +58,6 @@ Construction Trades (Plumber, Electrician, HVAC, etc.) - @@ -76,7 +71,6 @@ Financial Services other than Accounting or Bookkeeping - @@ -90,7 +84,6 @@ General Service-Based Business - @@ -104,7 +97,6 @@ Legal Services - @@ -118,7 +110,6 @@ General Product-Based Business - diff --git a/addons/l10n_ve/data/account_tax.xml b/addons/l10n_ve/data/account_tax.xml index 7acbda3e2af..8fb1aa4b819 100644 --- a/addons/l10n_ve/data/account_tax.xml +++ b/addons/l10n_ve/data/account_tax.xml @@ -7,8 +7,8 @@ 0.00000 percent all - - + + @@ -21,8 +21,8 @@ 0.120000 percent sale - - + + @@ -34,8 +34,8 @@ 0.080000 percent sale - - + + @@ -47,8 +47,8 @@ 0.220000 percent sale - - + + @@ -60,8 +60,8 @@ 0.120000 percent purchase - - + + @@ -73,8 +73,8 @@ 0.080000 percent purchase - - + + @@ -86,8 +86,8 @@ 0.220000 percent purchase - - + + From 39e6bc0bba1eceec30c800c9818b321c8cb9e124 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 31 Oct 2013 19:48:44 +0100 Subject: [PATCH 03/12] [FIX] survey/report: correct style name bzr revid: chs@openerp.com-20131031184844-xjc2ngm0sfqxu6v3 --- addons/survey/report/survey_analysis_report.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/survey/report/survey_analysis_report.py b/addons/survey/report/survey_analysis_report.py index cc61d65169a..1329c1d3198 100644 --- a/addons/survey/report/survey_analysis_report.py +++ b/addons/survey/report/survey_analysis_report.py @@ -99,12 +99,11 @@ class survey_analysis(report_rml): - + - + - @@ -119,7 +118,7 @@ class survey_analysis(report_rml): for survey in surv_obj.browse(cr, uid, ids): rml += """ - Answers Summary + Answers Summary From c59474804b6748ac3ccfd925e921d49bdeb38059 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 31 Oct 2013 19:56:33 +0100 Subject: [PATCH 04/12] [FIX] sale/edi: do not import non-existing field date_planned bzr revid: chs@openerp.com-20131031185633-qf5eus62nwf3xs0m --- addons/sale/test/edi_sale_order.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/sale/test/edi_sale_order.yml b/addons/sale/test/edi_sale_order.yml index 24fdfdf2786..65b6eb76835 100644 --- a/addons/sale/test/edi_sale_order.yml +++ b/addons/sale/test/edi_sale_order.yml @@ -170,7 +170,6 @@ "__import_module": "sale", "__import_model": "sale.order.line", "name": "Basic PC", - "date_planned": "2011-09-30", "price_unit": 150.0, "product_id": ["product:5af1272e-dd26-11e0-b65e-701a04e25543.product_product_pc1", "[PC1] Basic PC"], "product_qty": 1.0, @@ -183,7 +182,6 @@ "__import_module": "sale", "__import_model": "sale.order.line", "name": "Medium PC", - "date_planned": "2011-09-15", "price_unit": 100.0, "product_id": ["product:5af1272e-dd26-11e0-b65e-701a04e25543.product_product_pc3", "[PC3] Medium PC"], "product_qty": 2.0, @@ -214,4 +212,4 @@ assert sale_line.price_unit == 100 , "unit price is not same, got %s, expected 100"%(sale_line.price_unit,) assert sale_line.product_uom_qty == 2 , "product qty is not same" else: - raise AssertionError('unknown order line: %s' % sale_line) \ No newline at end of file + raise AssertionError('unknown order line: %s' % sale_line) From 46d7eb79e990cf2922460d8aad79864b4cb03703 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 8 Nov 2013 22:54:08 +0100 Subject: [PATCH 05/12] [FIX] document: even deprecated models need access rules (avoid warning) bzr revid: chs@openerp.com-20131108215408-xodw6lmvvxvw4te7 --- addons/document/security/ir.model.access.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/document/security/ir.model.access.csv b/addons/document/security/ir.model.access.csv index e0513a0640c..8c5e4323831 100644 --- a/addons/document/security/ir.model.access.csv +++ b/addons/document/security/ir.model.access.csv @@ -15,3 +15,4 @@ access_report_document_user_group_document_manager,report.document.user document access_report_document_file_group_document_manager,report.document.file document manager,model_report_document_file,base.group_system,1,0,0,0 access_report_document_file_group_document,report.document.file document manager,model_report_document_file,base.group_document_user,1,0,0,0 access_report_document_user_knowledgeuser,report.document.user knowledgeuser,document.model_report_document_user,base.group_document_user,1,0,0,0 +access_document_storage,access_document_storage,model_document_storage,base.group_system,1,1,1,1 From 871e2db195a762a199bd74cc7c5dd54b00b69991 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 8 Nov 2013 22:54:51 +0100 Subject: [PATCH 06/12] [FIX] base_action_rule: even test models need access rules (avoid warning) bzr revid: chs@openerp.com-20131108215451-mq18m32ajuuydzjq --- addons/base_action_rule/security/ir.model.access.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/base_action_rule/security/ir.model.access.csv b/addons/base_action_rule/security/ir.model.access.csv index 92d3d55649f..b509ec62944 100644 --- a/addons/base_action_rule/security/ir.model.access.csv +++ b/addons/base_action_rule/security/ir.model.access.csv @@ -1,3 +1,4 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_base_action_rule,base.action.rule,model_base_action_rule,,1,0,0,0 access_base_action_rule_config,base.action.rule config,model_base_action_rule,base.group_system,1,1,1,1 +access_base_action_rule_lead_test,access_base_action_rule_lead_test,model_base_action_rule_lead_test,base.group_system,1,1,1,1 From d623c091f3b4a6ae436154abf4fb6ac709879dd0 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 8 Nov 2013 23:15:35 +0100 Subject: [PATCH 07/12] [IMP] stock: do not use assert in (python) tests bzr revid: chs@openerp.com-20131108221535-c0lowzwd15d7asd3 --- addons/stock/tests/test_multicompany.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/stock/tests/test_multicompany.py b/addons/stock/tests/test_multicompany.py index fb840a846ea..f0175791b50 100644 --- a/addons/stock/tests/test_multicompany.py +++ b/addons/stock/tests/test_multicompany.py @@ -56,7 +56,7 @@ class TestStockMulticompany(common.TransactionCase): try: self.stock_location.check_access_rule(cr, uid, [defaults[field]], 'read', context) except Exception, exc: - assert False, "unreadable location %s: %s" % (field, exc) + self.fail("unreadable location %s: %s" % (field, exc)) self.assertEqual(defaults['type'], type, "wrong move type") @@ -71,7 +71,7 @@ class TestStockMulticompany(common.TransactionCase): try: self.stock_location.check_access_rule(cr, uid, [result[field]], 'read', context) except Exception, exc: - assert False, "unreadable location %s: %s" % (field, exc) + self.fail("unreadable location %s: %s" % (field, exc)) def test_20_multicompany_default_stock_fill_inventory(self): @@ -82,7 +82,7 @@ class TestStockMulticompany(common.TransactionCase): try: self.stock_location.check_access_rule(cr, uid, [defaults['location_id']], 'read', context) except Exception, exc: - assert False, "unreadable source location: %s" % exc + self.fail("unreadable source location: %s" % exc) def test_30_multicompany_default_warehouse_location(self): @@ -95,4 +95,4 @@ class TestStockMulticompany(common.TransactionCase): try: self.stock_location.check_access_rule(cr, uid, [defaults[field]], 'read', context) except Exception, exc: - assert False, "unreadable default %s: %s" % (field, exc) + self.fail("unreadable default %s: %s" % (field, exc)) From 4166baa1ba94978f60710d62ee2974b8e487106e Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 8 Nov 2013 23:47:24 +0100 Subject: [PATCH 08/12] [FIX] stock: mute orm logger before checking access rules bzr revid: chs@openerp.com-20131108224724-3u72ec3molct34he --- addons/stock/stock.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index f3efd8a353e..6cb9bb7672f 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1722,7 +1722,8 @@ class stock_move(osv.osv): if location_xml_id: try: location_model, location_id = mod_obj.get_object_reference(cr, uid, 'stock', location_xml_id) - self.pool.get('stock.location').check_access_rule(cr, uid, [location_id], 'read', context=context) + with tools.mute_logger('openerp.osv.orm'): + self.pool.get('stock.location').check_access_rule(cr, uid, [location_id], 'read', context=context) except (orm.except_orm, ValueError): location_id = False @@ -1756,7 +1757,8 @@ class stock_move(osv.osv): if location_xml_id: try: location_model, location_id = mod_obj.get_object_reference(cr, uid, 'stock', location_xml_id) - self.pool.get('stock.location').check_access_rule(cr, uid, [location_id], 'read', context=context) + with tools.mute_logger('openerp.osv.orm'): + self.pool.get('stock.location').check_access_rule(cr, uid, [location_id], 'read', context=context) except (orm.except_orm, ValueError): location_id = False @@ -1980,12 +1982,14 @@ class stock_move(osv.osv): location_dest_id = 'stock_location_customers' try: source_location = mod_obj.get_object_reference(cr, uid, 'stock', location_source_id) - self.pool.get('stock.location').check_access_rule(cr, uid, [source_location[1]], 'read', context=context) + with tools.mute_logger('openerp.osv.orm'): + self.pool.get('stock.location').check_access_rule(cr, uid, [source_location[1]], 'read', context=context) except (orm.except_orm, ValueError): source_location = False try: dest_location = mod_obj.get_object_reference(cr, uid, 'stock', location_dest_id) - self.pool.get('stock.location').check_access_rule(cr, uid, [dest_location[1]], 'read', context=context) + with tools.mute_logger('openerp.osv.orm'): + self.pool.get('stock.location').check_access_rule(cr, uid, [dest_location[1]], 'read', context=context) except (orm.except_orm, ValueError): dest_location = False return {'value':{'location_id': source_location and source_location[1] or False, 'location_dest_id': dest_location and dest_location[1] or False}} @@ -2931,7 +2935,8 @@ class stock_inventory_line(osv.osv): def _default_stock_location(self, cr, uid, context=None): try: location_model, location_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', 'stock_location_stock') - self.pool.get('stock.location').check_access_rule(cr, uid, [location_id], 'read', context=context) + with tools.mute_logger('openerp.osv.orm'): + self.pool.get('stock.location').check_access_rule(cr, uid, [location_id], 'read', context=context) except (orm.except_orm, ValueError): location_id = False return location_id @@ -2975,7 +2980,8 @@ class stock_warehouse(osv.osv): def _default_lot_input_stock_id(self, cr, uid, context=None): try: lot_input_stock_model, lot_input_stock_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', 'stock_location_stock') - self.pool.get('stock.location').check_access_rule(cr, uid, [lot_input_stock_id], 'read', context=context) + with tools.mute_logger('openerp.osv.orm'): + self.pool.get('stock.location').check_access_rule(cr, uid, [lot_input_stock_id], 'read', context=context) except (ValueError, orm.except_orm): # the user does not have read access on the location or it does not exists lot_input_stock_id = False @@ -2984,7 +2990,8 @@ class stock_warehouse(osv.osv): def _default_lot_output_id(self, cr, uid, context=None): try: lot_output_model, lot_output_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', 'stock_location_output') - self.pool.get('stock.location').check_access_rule(cr, uid, [lot_output_id], 'read', context=context) + with tools.mute_logger('openerp.osv.orm'): + self.pool.get('stock.location').check_access_rule(cr, uid, [lot_output_id], 'read', context=context) except (ValueError, orm.except_orm): # the user does not have read access on the location or it does not exists lot_output_id = False From 9a1c54d2424bb5a185ead521e4224eef3d8e64a0 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Sat, 9 Nov 2013 00:02:24 +0100 Subject: [PATCH 09/12] [FIX] stock: mute orm logger before checking access rules bzr revid: chs@openerp.com-20131108230224-tqj0tg5xgz8ramwd --- addons/stock/wizard/stock_fill_inventory.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/stock/wizard/stock_fill_inventory.py b/addons/stock/wizard/stock_fill_inventory.py index 07dcb3965d7..7f55adbab4c 100644 --- a/addons/stock/wizard/stock_fill_inventory.py +++ b/addons/stock/wizard/stock_fill_inventory.py @@ -21,6 +21,7 @@ from openerp.osv import fields, osv, orm from openerp.tools.translate import _ +from openerp.tools import mute_logger class stock_fill_inventory(osv.osv_memory): _name = "stock.fill.inventory" @@ -29,7 +30,8 @@ class stock_fill_inventory(osv.osv_memory): def _default_location(self, cr, uid, ids, context=None): try: location = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock') - location.check_access_rule('read', context=context) + with mute_logger('openerp.osv.orm'): + location.check_access_rule('read', context=context) location_id = location.id except (ValueError, orm.except_orm), e: return False From 824eddeb85c1c307e7c8fe6d8c93caf686bd5908 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Sat, 9 Nov 2013 00:11:30 +0100 Subject: [PATCH 10/12] [FIX] l10n_mx: account.chart.template does not have any property_stock_account_{in,out}put_categ fields bzr revid: chs@openerp.com-20131108231130-k7s49xfac9h67kbe --- addons/l10n_mx/data/account_chart.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/l10n_mx/data/account_chart.xml b/addons/l10n_mx/data/account_chart.xml index 7b81ec81d20..477b3353b8e 100644 --- a/addons/l10n_mx/data/account_chart.xml +++ b/addons/l10n_mx/data/account_chart.xml @@ -3693,8 +3693,6 @@ Cuentas del plan - - Plan de Cuentas para Mexico From 6b9822626bcb7d51721161de4a015a238bd33631 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Tue, 12 Nov 2013 12:56:35 +0100 Subject: [PATCH 11/12] [FIX] sale_stock: procuremenr.order object does not have a `property_ids` field. This field is added by `mrp` module, which we do not depend of. bzr revid: chs@openerp.com-20131112115635-tgbdeocn9awtbxkq --- addons/sale_stock/sale_stock.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/sale_stock/sale_stock.py b/addons/sale_stock/sale_stock.py index 39fdfe27c92..1cf6f87f4b0 100644 --- a/addons/sale_stock/sale_stock.py +++ b/addons/sale_stock/sale_stock.py @@ -306,7 +306,6 @@ class sale_order(osv.osv): 'move_id': move_id, 'company_id': order.company_id.id, 'note': line.name, - 'property_ids': [(6, 0, [x.id for x in line.property_ids])], } def _prepare_order_line_move(self, cr, uid, order, line, picking_id, date_planned, context=None): From 57a4125a53bd0ab48773fd4be2b9045571565a4a Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Tue, 12 Nov 2013 20:10:33 +0100 Subject: [PATCH 12/12] [FIX] l10n_be: as l10n_multilang is an optional dependency for dutch translation of the account.chart, the field spoken_languages must be set conditionnaly bzr revid: chs@openerp.com-20131112191033-hour5mlzka3w6ybp --- addons/l10n_be/__openerp__.py | 1 + addons/l10n_be/account_chart_template.xml | 1 - addons/l10n_be/account_chart_template.yml | 4 ++++ 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 addons/l10n_be/account_chart_template.yml diff --git a/addons/l10n_be/__openerp__.py b/addons/l10n_be/__openerp__.py index 18943a2bee3..70b5ef96224 100644 --- a/addons/l10n_be/__openerp__.py +++ b/addons/l10n_be/__openerp__.py @@ -65,6 +65,7 @@ Wizards provided by this module: 'account_pcmn_belgium.xml', 'account_tax_code_template.xml', 'account_chart_template.xml', + 'account_chart_template.yml', 'account_tax_template.xml', 'wizard/l10n_be_account_vat_declaration_view.xml', 'wizard/l10n_be_vat_intra_view.xml', diff --git a/addons/l10n_be/account_chart_template.xml b/addons/l10n_be/account_chart_template.xml index 47f7fc0986e..6c9f205471c 100644 --- a/addons/l10n_be/account_chart_template.xml +++ b/addons/l10n_be/account_chart_template.xml @@ -12,7 +12,6 @@ - Belgian PCMN diff --git a/addons/l10n_be/account_chart_template.yml b/addons/l10n_be/account_chart_template.yml new file mode 100644 index 00000000000..0028576f964 --- /dev/null +++ b/addons/l10n_be/account_chart_template.yml @@ -0,0 +1,4 @@ +- + !python {model: account.chart.template}: | + if 'spoken_languages' in self._all_columns: + self.write(cr, uid, [ref('l10nbe_chart_template')], {'spoken_languages': 'nl_BE'})