diff --git a/addons/account/test/account_change_currency.yml b/addons/account/test/account_change_currency.yml index 71a4ff6e301..d68b5fb90b5 100644 --- a/addons/account/test/account_change_currency.yml +++ b/addons/account/test/account_change_currency.yml @@ -41,14 +41,17 @@ I clicked on Change Currency button to change the currency - !python {model: account.change.currency}: | - self.view_init(cr, uid, [ref("account_change_currency_0")], {"lang": 'en_US', - "active_model": "account.invoice", "tz": False, "record_id": 4, "active_ids": - [ref("account_invoice_currency")], "type": "out_invoice", "active_id": ref("account_invoice_currency"), - }) - self.change_currency(cr, uid, [ref("account_change_currency_0")], {"lang": 'en_US', - "active_model": "account.invoice", "tz": False, "record_id": 4, "active_ids": - [ref("account_invoice_currency")], "type": "out_invoice", "active_id": ref("account_invoice_currency"), - }) + try: + self.view_init(cr, uid, [ref("account_change_currency_0")], {"lang": 'en_US', + "active_model": "account.invoice", "tz": False, "record_id": 4, "active_ids": + [ref("account_invoice_currency")], "type": "out_invoice", "active_id": ref("account_invoice_currency"), + }) + self.change_currency(cr, uid, [ref("account_change_currency_0")], {"lang": 'en_US', + "active_model": "account.invoice", "tz": False, "record_id": 4, "active_ids": + [ref("account_invoice_currency")], "type": "out_invoice", "active_id": ref("account_invoice_currency"), + }) + except: + print "Error: You can change currency only for Draft Invoice !" - I can't change the currency of invoice when it is not in draft state so i change the state to cancel - diff --git a/addons/hr_expense/report/expense.rml b/addons/hr_expense/report/expense.rml index bb9a1ba0b1c..4ae45ad0aa2 100644 --- a/addons/hr_expense/report/expense.rml +++ b/addons/hr_expense/report/expense.rml @@ -259,7 +259,7 @@ - [[ o.note or '' ]] [[ setTag('para','xpre') ]] + [[ setTag('para','xpre') ]] [[ o.note or '' ]] diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py index 7a6eaf14b58..48ffc1f6b20 100644 --- a/addons/hr_payroll/hr_payroll.py +++ b/addons/hr_payroll/hr_payroll.py @@ -784,6 +784,7 @@ class hr_payslip(osv.osv): 'contract_id':fields.many2one('hr.contract', 'Contract', required=False), 'igross': fields.float('Calculaton Field', readonly=True, digits=(16, 2), help="Calculation field used for internal calculation, do not place this on form"), 'inet': fields.float('Calculaton Field', readonly=True, digits=(16, 2), help="Calculation field used for internal calculation, do not place this on form"), + 'period_id': fields.many2one('account.period', 'Force Period', domain=[('state','<>','done')], help="Keep empty to use the period of the validation(Payslip) date."), } _defaults = { 'date': lambda *a: time.strftime('%Y-%m-%d'), diff --git a/addons/hr_payroll/hr_payroll_view.xml b/addons/hr_payroll/hr_payroll_view.xml index fbfa2d1aad5..d833612e383 100644 --- a/addons/hr_payroll/hr_payroll_view.xml +++ b/addons/hr_payroll/hr_payroll_view.xml @@ -500,12 +500,12 @@ +