diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index 13c6464f888..9f63c50ff97 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -326,8 +326,8 @@ class account_cash_statement(osv.osv): statement_pool = self.pool.get('account.bank.statement') for statement in statement_pool.browse(cr, uid, ids, context=context): vals = {} - - if not self._user_allow(cr, uid, statement.id, context=context): + force_allow = context.get('force_allow',False) + if not force_allow and not self._user_allow(cr, uid, statement.id, context=context): raise osv.except_osv(_('Error !'), _('User %s does not have rights to access %s journal !' % (statement.user_id.name, statement.journal_id.name))) if statement.name and statement.name == '/': diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml index e2f0bdf5709..22e0221ac8b 100644 --- a/addons/account/project/project_view.xml +++ b/addons/account/project/project_view.xml @@ -16,6 +16,7 @@ + diff --git a/addons/account/report/account_tax_report.py b/addons/account/report/account_tax_report.py index 81778e12eb3..4361448790c 100644 --- a/addons/account/report/account_tax_report.py +++ b/addons/account/report/account_tax_report.py @@ -34,9 +34,9 @@ class tax_report(rml_parse.rml_parse, common_report_header): self.period_ids = [] period_obj = self.pool.get('account.period') res['periods'] = '' - res['fiscalyear'] = data['form']['fiscalyear_id'] + res['fiscalyear'] = data['form'].get('fiscalyear_id', False) - if data['form']['period_from'] and data['form']['period_to']: + if data['form'].get('period_from', False) and data['form'].get('period_to', False): self.period_ids = period_obj.build_ctx_periods(self.cr, self.uid, data['form']['period_from'], data['form']['period_to']) periods_l = period_obj.read(self.cr, self.uid, self.period_ids, ['name']) for period in periods_l: diff --git a/addons/account/report/rml_parse.py b/addons/account/report/rml_parse.py index aab5e14c777..cf33d1c6ae0 100644 --- a/addons/account/report/rml_parse.py +++ b/addons/account/report/rml_parse.py @@ -19,6 +19,8 @@ # ############################################################################## +import time + import re import sys @@ -100,7 +102,7 @@ class rml_parse(report_sxw.rml_parse): return Stringer return Stringer def explode_this(self,chaine,length): - chaine = rstrip(chaine) + chaine = chaine.rstrip() ast = list(chaine) i = length while i <= len(ast): diff --git a/addons/account/test/account_cash_statement.yml b/addons/account/test/account_cash_statement.yml index 03d0d54db83..67e6d4d2607 100644 --- a/addons/account/test/account_cash_statement.yml +++ b/addons/account/test/account_cash_statement.yml @@ -26,7 +26,7 @@ I clicked on Open CashBox button to open the cashbox - !python {model: account.bank.statement}: | - self.button_open(cr, uid, [ref("account_bank_statement_1")], {"lang": "en_US", "tz": False, "active_model": "account.bank.statement", "active_ids": [ref("account_bank_statement_1")], "active_id": ref("account_bank_statement_1"), }) + self.button_open(cr, uid, [ref("account_bank_statement_1")], {"force_allow":True, "lang": "en_US", "tz": False, "active_model": "account.bank.statement", "active_ids": [ref("account_bank_statement_1")], "active_id": ref("account_bank_statement_1"), }) - I check that now bank statement is in the "Open" state diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml index c780bf94682..9fcd976a235 100644 --- a/addons/account/test/account_report.yml +++ b/addons/account/test/account_report.yml @@ -2,7 +2,7 @@ In order to test the PDF reports defined on an invoice, we will create a Invoice Record - !record {model: account.invoice, id: test_invoice_1}: - currency_id: base.EUR + currency_id: base.EUR company_id: base.main_company address_invoice_id: base.res_partner_address_tang partner_id: base.res_partner_asus diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py index 90fc9f1fd6a..55213155168 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis.py +++ b/addons/account_analytic_analysis/account_analytic_analysis.py @@ -20,7 +20,7 @@ ############################################################################## from osv import osv, fields -from osv.orm import intersect +from osv.orm import intersect, except_orm import tools.sql from tools.translate import _ from decimal_precision import decimal_precision as dp diff --git a/addons/account_invoice_layout/account_invoice_layout_view.xml b/addons/account_invoice_layout/account_invoice_layout_view.xml index 0d6a3565784..c8bb5e84031 100644 --- a/addons/account_invoice_layout/account_invoice_layout_view.xml +++ b/addons/account_invoice_layout/account_invoice_layout_view.xml @@ -9,10 +9,10 @@ form - + - + diff --git a/addons/account_invoice_layout/test/account_invoice_layout_report.yml b/addons/account_invoice_layout/test/account_invoice_layout_report.yml index 0c1f2df7954..cdaccf0630c 100644 --- a/addons/account_invoice_layout/test/account_invoice_layout_report.yml +++ b/addons/account_invoice_layout/test/account_invoice_layout_report.yml @@ -2,7 +2,7 @@ In order to Print the Invoice layout report in Normal Mode, we will create a invoice record - !record {model: account.invoice, id: test_invoice_1}: - currency_id: base.EUR + currency_id: base.EUR company_id: base.main_company address_invoice_id: base.res_partner_address_tang partner_id: base.res_partner_asus diff --git a/addons/account_voucher/account_voucher_view.xml b/addons/account_voucher/account_voucher_view.xml index 6a02e3371ab..a36578bb70b 100644 --- a/addons/account_voucher/account_voucher_view.xml +++ b/addons/account_voucher/account_voucher_view.xml @@ -184,11 +184,11 @@ form - -