From 01a3d66e9a994846f12d9ce24045c981268f167e Mon Sep 17 00:00:00 2001 From: "nel@tinyerp.com" <> Date: Tue, 6 Jul 2010 11:34:59 +0200 Subject: [PATCH 01/30] [IMP] expenses bzr revid: nel@tinyerp.com-20100706093459-3rr6ebih4frj1ckc --- addons/hr_expense/report/hr_expense_report.py | 2 ++ .../report/hr_expense_report_view.xml | 22 +++++++------------ 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/addons/hr_expense/report/hr_expense_report.py b/addons/hr_expense/report/hr_expense_report.py index e2ec064dc4f..a885dfc55a0 100644 --- a/addons/hr_expense/report/hr_expense_report.py +++ b/addons/hr_expense/report/hr_expense_report.py @@ -38,6 +38,7 @@ class hr_expense_report(osv.osv): 'product_id':fields.many2one('product.product', 'Product', readonly=True), 'journal_id': fields.many2one('account.journal', 'Force Journal', readonly=True), 'product_qty':fields.float('Qty', readonly=True), + 'invoiced':fields.integer('# of Invoiced Lines', readonly=True), 'employee_id': fields.many2one('hr.employee', "Employee's Name", readonly=True), 'date_confirm': fields.date('Confirmation Date', readonly=True), 'date_valid': fields.date('Validation Date', readonly=True), @@ -77,6 +78,7 @@ class hr_expense_report(osv.osv): to_date(to_char(s.date_confirm, 'dd-MM-YYYY'),'dd-MM-YYYY') as date_confirm, to_date(to_char(s.date_valid, 'dd-MM-YYYY'),'dd-MM-YYYY') as date_valid, s.invoice_id, + count(s.invoice_id) as invoiced, s.user_valid as user_id, s.department_id, to_char(date_trunc('day',s.create_date), 'YYYY') as year, diff --git a/addons/hr_expense/report/hr_expense_report_view.xml b/addons/hr_expense/report/hr_expense_report_view.xml index 75ee934709b..0152a09c240 100644 --- a/addons/hr_expense/report/hr_expense_report_view.xml +++ b/addons/hr_expense/report/hr_expense_report_view.xml @@ -17,17 +17,17 @@ - + - - + + @@ -62,15 +62,14 @@ - - + - - - + + @@ -80,7 +79,6 @@ - @@ -96,10 +94,6 @@ - - - - From 1c08a484389d6605b29f4a36c33a812577f989d3 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 7 Jul 2010 11:15:31 +0530 Subject: [PATCH 02/30] [FIX] account_cancel: inhertiance view problem fixed to open journals bzr revid: mra@mra-laptop-20100707054531-wquq5smji2ldrrzy --- addons/account/account_view.xml | 2 +- addons/account_cancel/account_cancel_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 5946661136f..1af3f1bef1e 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -376,7 +376,7 @@ - + diff --git a/addons/account_cancel/account_cancel_view.xml b/addons/account_cancel/account_cancel_view.xml index 82eae01347c..bcb9fb4d34e 100644 --- a/addons/account_cancel/account_cancel_view.xml +++ b/addons/account_cancel/account_cancel_view.xml @@ -7,7 +7,7 @@ form - + From 21786ff375c69b960b487a69bd1343b8b77f3dec Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Wed, 7 Jul 2010 11:51:07 +0530 Subject: [PATCH 03/30] [FIX]: fix a small problems related to views and labels bzr revid: mga@tinyerp.com-20100707062107-yljp2sv5tlpr17at --- addons/account_voucher/voucher_view.xml | 4 +-- addons/hr_payroll/hr_payroll.py | 48 ++++++++++++------------- addons/hr_payroll/hr_payroll_view.xml | 2 +- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/voucher_view.xml index 91038bba0bb..91cbbf007db 100644 --- a/addons/account_voucher/voucher_view.xml +++ b/addons/account_voucher/voucher_view.xml @@ -138,7 +138,7 @@ - Customer Vouchers + Receivable Vouchers account.voucher form tree,form @@ -151,7 +151,7 @@ - Vendor Vouchers + Payable Vouchers account.voucher form tree,form diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py index c04d7eb828a..bfc84d6750d 100644 --- a/addons/hr_payroll/hr_payroll.py +++ b/addons/hr_payroll/hr_payroll.py @@ -194,10 +194,10 @@ class payroll_register(osv.osv): # 'advice_ids':fields.one2many('hr.payroll.advice', 'register_id', 'Bank Advice'), 'company_id':fields.many2one('res.company', 'Company', required=False), 'period_id': fields.many2one('account.period', 'Force Period', domain=[('state','<>','done')], help="Keep empty to use the period of the validation(Payslip) date."), - 'grows': fields.function(_calculate, method=True, store=True, multi='dc', string='Gross Salary', type='float', digits=(16, int(config['price_accuracy']))), - 'net': fields.function(_calculate, method=True, store=True, multi='dc', string='Net Salary', digits=(16, int(config['price_accuracy']))), - 'allounce': fields.function(_calculate, method=True, store=True, multi='dc', string='Allowance', digits=(16, int(config['price_accuracy']))), - 'deduction': fields.function(_calculate, method=True, store=True, multi='dc', string='Deduction', digits=(16, int(config['price_accuracy']))), + 'grows': fields.function(_calculate, method=True, store=True, multi='dc', string='Gross Salary', type='float', digits=(16, 4)), + 'net': fields.function(_calculate, method=True, store=True, multi='dc', string='Net Salary', digits=(16, 4)), + 'allounce': fields.function(_calculate, method=True, store=True, multi='dc', string='Allowance', digits=(16, 4)), + 'deduction': fields.function(_calculate, method=True, store=True, multi='dc', string='Deduction', digits=(16, 4)), 'note': fields.text('Description'), } @@ -366,8 +366,8 @@ class payroll_advice_line(osv.osv): 'advice_id':fields.many2one('hr.payroll.advice', 'Bank Advice', required=False), 'name':fields.char('Bank Account A/C', size=64, required=True, readonly=False), 'employee_id':fields.many2one('hr.employee', 'Employee', required=True), - 'amount': fields.float('Amount', digits=(16, int(config['price_accuracy']))), - 'bysal': fields.float('By Salary', digits=(16, int(config['price_accuracy']))), + 'amount': fields.float('Amount', digits=(16, 4)), + 'bysal': fields.float('By Salary', digits=(16, 4)), 'flag':fields.char('D/C', size=8, required=True, readonly=False), } _defaults = { @@ -434,10 +434,10 @@ class contrib_register(osv.osv): 'analytic_account_id':fields.many2one('account.analytic.account', 'Analytic Account', required=False), 'name':fields.char('Name', size=256, required=True, readonly=False), 'register_line_ids':fields.one2many('hr.contibution.register.line', 'register_id', 'Register Line', readonly=True), - 'yearly_total_by_emp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Employee', digits=(16, int(config['price_accuracy']))), - 'yearly_total_by_comp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Company', digits=(16, int(config['price_accuracy']))), - 'monthly_total_by_emp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Employee', digits=(16, int(config['price_accuracy']))), - 'monthly_total_by_comp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Company', digits=(16, int(config['price_accuracy']))), + 'yearly_total_by_emp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Employee', digits=(16, 4)), + 'yearly_total_by_comp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Company', digits=(16, 4)), + 'monthly_total_by_emp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Employee', digits=(16, 4)), + 'monthly_total_by_comp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Company', digits=(16, 4)), 'note': fields.text('Description'), } _defaults = { @@ -466,9 +466,9 @@ class contrib_register_line(osv.osv): 'code':fields.char('Code', size=64, required=False, readonly=False), 'employee_id':fields.many2one('hr.employee', 'Employee', required=True), 'period_id': fields.many2one('account.period', 'Period'), - 'emp_deduction': fields.float('Employee Deduction', digits=(16, int(config['price_accuracy']))), - 'comp_deduction': fields.float('Company Deduction', digits=(16, int(config['price_accuracy']))), - 'total': fields.function(_total, method=True, store=True, string='Total', digits=(16, int(config['price_accuracy']))), + 'emp_deduction': fields.float('Employee Deduction', digits=(16, 4)), + 'comp_deduction': fields.float('Company Deduction', digits=(16, 4)), + 'total': fields.function(_total, method=True, store=True, string='Total', digits=(16, 4)), } contrib_register_line() @@ -539,7 +539,7 @@ class company_contribution(osv.osv): ('fix','Fixed Amount'), ('func','Function Calculation'), ],'Amount Type', select=True), - 'contribute_per':fields.float('Contribution', digits=(16, int(config['price_accuracy'])), help='Define Company contribution ratio 1.00=100% contribution, If Employee Contribute 5% then company will and here 0.50 defined then company will contribute 50% on employee 5% contribution'), + 'contribute_per':fields.float('Contribution', digits=(16, 4), help='Define Company contribution ratio 1.00=100% contribution, If Employee Contribute 5% then company will and here 0.50 defined then company will contribute 50% on employee 5% contribution'), 'account_id':fields.property( 'account.account', type='many2one', @@ -596,13 +596,13 @@ class company_contribution_line(osv.osv): 'contribution_id':fields.many2one('company.contribution', 'Contribution', required=False), 'name':fields.char('Name', size=64, required=False, readonly=False), 'umo_id':fields.many2one('product.uom', 'Unite', required=False), - 'from_val': fields.float('From', digits=(16, int(config['price_accuracy']))), - 'to_val': fields.float('To', digits=(16, int(config['price_accuracy']))), + 'from_val': fields.float('From', digits=(16, 4)), + 'to_val': fields.float('To', digits=(16, 4)), 'amount_type':fields.selection([ ('fix','Fixed Amount'), ],'Amount Type', select=True), 'sequence':fields.integer('Sequence'), - 'value': fields.float('Value', digits=(16, int(config['price_accuracy']))), + 'value': fields.float('Value', digits=(16, 4)), } company_contribution_line() @@ -730,8 +730,8 @@ class hr_payslip(osv.osv): ('cancel','Reject'), ],'State', select=True, readonly=True), 'basic_before_leaves': fields.float('Basic Salary', readonly=True, digits=(16, 2)), - 'leaves': fields.float('Leaved Deduction', readonly=True, digits=(16, 2)), - 'basic': fields.float('Basic Salary - Leaves', readonly=True, digits=(16, 2)), + 'leaves': fields.float('Leave Deductions', readonly=True, digits=(16, 2)), + 'basic': fields.float('Net Basic', readonly=True, digits=(16, 2)), 'grows': fields.function(_calculate, method=True, store=True, multi='dc', string='Gross Salary', type='float', digits=(16, 2)), 'net': fields.function(_calculate, method=True, store=True, multi='dc', string='Net Salary', digits=(16, 2)), 'allounce': fields.function(_calculate, method=True, store=True, multi='dc', string='Allowance', digits=(16, 2)), @@ -1213,9 +1213,9 @@ class hr_payslip_line(osv.osv): 'amount': fields.float('Amount / Percentage', digits=(16, 4)), 'analytic_account_id':fields.many2one('account.analytic.account', 'Analytic Account', required=False), 'account_id':fields.many2one('account.account', 'General Account', required=True), - 'total': fields.float('Sub Total', readonly=True, digits=(16, int(config['price_accuracy']))), + 'total': fields.float('Sub Total', readonly=True, digits=(16, 4)), #'total': fields.function(_calculate, method=True, type='float', string='Label', store=True), - 'company_contrib': fields.float('Company Contribution', readonly=True, digits=(16, int(config['price_accuracy']))), + 'company_contrib': fields.float('Company Contribution', readonly=True, digits=(16, 4)), 'expanse_id': fields.many2one('hr.expense.expense', 'Expense'), 'sequence': fields.integer('Sequence'), 'note':fields.text('Description'), @@ -1251,13 +1251,13 @@ class hr_payslip_line_line(osv.osv): 'slipline_id':fields.many2one('hr.payslip.line', 'Slip Line', required=False), 'name':fields.char('Name', size=64, required=False, readonly=False), 'umo_id':fields.many2one('product.uom', 'Unite', required=False), - 'from_val': fields.float('From', digits=(16, int(config['price_accuracy']))), - 'to_val': fields.float('To', digits=(16, int(config['price_accuracy']))), + 'from_val': fields.float('From', digits=(16, 4)), + 'to_val': fields.float('To', digits=(16, 4)), 'amount_type':fields.selection([ ('fix','Fixed Amount'), ],'Amount Type', select=True), 'sequence':fields.integer('Sequence'), - 'value': fields.float('Value', digits=(16, int(config['price_accuracy']))), + 'value': fields.float('Value', digits=(16, 4)), } hr_payslip_line_line() diff --git a/addons/hr_payroll/hr_payroll_view.xml b/addons/hr_payroll/hr_payroll_view.xml index f98247236ae..97b6ac70cee 100644 --- a/addons/hr_payroll/hr_payroll_view.xml +++ b/addons/hr_payroll/hr_payroll_view.xml @@ -505,7 +505,7 @@