From a491127ab94fa2df63addd49601e30709c091a46 Mon Sep 17 00:00:00 2001 From: "Rakesh Sindhav (OpenERP)" Date: Mon, 21 Apr 2014 14:43:11 +0530 Subject: [PATCH 01/31] [IMP]: l10n_in_hr_payroll: Convert Yearly Salary by Head report from RML report to QWEB bzr revid: rsi@tinyerp.com-20140421091311-9ymvwu2g4nn3h630 --- addons/l10n_in_hr_payroll/__openerp__.py | 1 + .../l10n_in_hr_payroll_report.xml | 14 +- .../report_hr_salary_employee_bymonth.py | 14 +- .../report_hr_salary_employee_bymonth.rml | 293 ------------------ .../wizard/hr_salary_employee_bymonth.py | 12 +- 5 files changed, 21 insertions(+), 313 deletions(-) delete mode 100644 addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml diff --git a/addons/l10n_in_hr_payroll/__openerp__.py b/addons/l10n_in_hr_payroll/__openerp__.py index 2522d543548..3ffa88729b0 100644 --- a/addons/l10n_in_hr_payroll/__openerp__.py +++ b/addons/l10n_in_hr_payroll/__openerp__.py @@ -49,6 +49,7 @@ Indian Payroll Salary Rules. 'security/ir.model.access.csv', 'l10n_in_hr_payroll_report.xml', 'l10n_in_hr_payroll_sequence.xml', + 'views/report_hr_salary_employee_bymonth.xml', 'wizard/hr_salary_employee_bymonth_view.xml', 'wizard/hr_yearly_salary_detail_view.xml', 'report/payment_advice_report_view.xml', diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml index 7f27291051f..804236c0c68 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml @@ -18,13 +18,13 @@ rml="l10n_in_hr_payroll/report/report_payroll_advice.rml" string="Print Advice" /> - + 'None': + if month <> '': if len(month) != 7: month = '0' + str(month) if month in salary and salary[month]: @@ -128,6 +128,10 @@ class report_hr_salary_employee_bymonth(report_sxw.rml_parse): self.total += item[count] return self.total -report_sxw.report_sxw('report.salary.employee.bymonth', 'hr.salary.employee.month', 'l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml', parser=report_hr_salary_employee_bymonth, header='internal') +class employee_salary_bymonth(osv.AbstractModel): + _name = 'report.l10n_in_hr_payroll.employee_salary_bymonth' + _inherit = 'report.abstract_report' + _template = 'l10n_in_hr_payroll.employee_salary_bymonth' + _wrapped_report_class = report_hr_salary_employee_bymonth # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml b/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml deleted file mode 100644 index 6368a644f4b..00000000000 --- a/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml +++ /dev/null @@ -1,293 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Yearly Salary Details - From [[ formatLang(data['form']['start_date'], date=True) ]] To [[ formatLang(data['form']['end_date'], date=True) ]] of [[ (data['form']['category_id'][1]) ]] Category - - - -
- [[ repeatIn(get_periods(data['form']),'m') ]] - - - - Name - - - [[ m[0] != 'None' and m[0] or '' ]] - - - [[ m[1] != 'None' and m[1] or '' ]] - - - [[ m[2] != 'None' and m[2] or '' ]] - - - [[ m[3] != 'None' and m[3] or '' ]] - - - [[ m[4] != 'None' and m[4] or '' ]] - - - [[ m[5] != 'None' and m[5] or '' ]] - - - [[ m[6] != 'None' and m[6] or '' ]] - - - [[ m[7] != 'None' and m[7] or '' ]] - - - [[ m[8] != 'None' and m[8] or '' ]] - - - [[ m[9] != 'None' and m[9] or '' ]] - - - [[ m[10] != 'None' and m[10] or '' ]] - - - [[ m[11] != 'None' and m[11] or '' ]] - - - Total - - - -
- [[ repeatIn(get_employee(data['form']),'e') ]] - - - - [[ e[0] ]] - - - - [[ (e[1]!='' and formatLang(e[1])) or removeParentNode('font') ]] - - - - - [[ (e[2]!='' and formatLang(e[2])) or removeParentNode('font') ]] - - - - - [[ (e[3]!='' and formatLang(e[3])) or removeParentNode('font') ]] - - - - - [[ (e[4]!='' and formatLang(e[4])) or removeParentNode('font') ]] - - - - - [[ (e[5]!='' and formatLang(e[5])) or removeParentNode('font') ]] - - - - - [[ (e[6]!='' and formatLang(e[6])) or removeParentNode('font') ]] - - - - - [[ (e[7]!='' and formatLang(e[7])) or removeParentNode('font') ]] - - - - - [[ (e[8]!='' and formatLang(e[8])) or removeParentNode('font') ]] - - - - - [[ (e[9]!='' and formatLang(e[9])) or removeParentNode('font') ]] - - - - - [[ (e[10]!='' and formatLang(e[10])) or removeParentNode('font') ]] - - - - - [[ (e[11]!='' and formatLang(e[11])) or removeParentNode('font') ]] - - - - - [[ (e[12]!='' and formatLang(e[12])) or removeParentNode('font') ]] - - - - [[ formatLang(e[13],currency_obj= company.currency_id)]] - - - -
-
-
- [[ repeatIn(get_months_tol(),'t') ]] - - - - Total - - - [[ formatLang(t[1],currency_obj= company.currency_id) or removeParentNode('para') ]] - - - [[ formatLang(t[2],currency_obj= company.currency_id) or removeParentNode('para')]] - - - [[ formatLang(t[3],currency_obj= company.currency_id) or removeParentNode('para')]] - - - [[ formatLang(t[4],currency_obj= company.currency_id) or removeParentNode('para')]] - - - [[ formatLang(t[5],currency_obj= company.currency_id) or removeParentNode('para')]] - - - [[ formatLang(t[6],currency_obj= company.currency_id) or removeParentNode('para')]] - - - [[ formatLang(t[7],currency_obj= company.currency_id) or removeParentNode('para')]] ] - - - [[ formatLang(t[8],currency_obj= company.currency_id) or removeParentNode('para')]] - - - [[ formatLang(t[9],currency_obj= company.currency_id) or removeParentNode('para')]] - - - [[ formatLang(t[10],currency_obj= company.currency_id) or removeParentNode('para')]] - - - [[ formatLang(t[11],currency_obj= company.currency_id) or removeParentNode('para')]] - - - [[ formatLang(t[12],currency_obj= company.currency_id) or removeParentNode('para')]] - - - [[ formatLang(get_total(), currency_obj = company.currency_id)]] - - - -
-
-
diff --git a/addons/l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py b/addons/l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py index 93594e1dff8..113ad52620d 100644 --- a/addons/l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py +++ b/addons/l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py @@ -20,7 +20,6 @@ ############################################################################## import time - from openerp.osv import fields, osv class hr_salary_employee_bymonth(osv.osv_memory): @@ -60,11 +59,8 @@ class hr_salary_employee_bymonth(osv.osv_memory): res = self.read(cr, uid, ids, context=context) res = res and res[0] or {} datas.update({'form': res}) - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'salary.employee.bymonth', - 'datas': datas, - } + return self.pool['report'].get_action(cr, uid, ids, + 'l10n_in_hr_payroll.employee_salary_bymonth', + data=datas, context=context) - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 7d72983357b866f13e3ba31c72d73a27a498ce4b Mon Sep 17 00:00:00 2001 From: "Rakesh Sindhav (OpenERP)" Date: Mon, 21 Apr 2014 15:23:14 +0530 Subject: [PATCH 02/31] [ADD]: Add the view file of the QWEB report bzr revid: rsi@tinyerp.com-20140421095314-mq4o9qhi2efl5jai --- .../report_hr_salary_employee_bymonth.xml | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 addons/l10n_in_hr_payroll/views/report_hr_salary_employee_bymonth.xml diff --git a/addons/l10n_in_hr_payroll/views/report_hr_salary_employee_bymonth.xml b/addons/l10n_in_hr_payroll/views/report_hr_salary_employee_bymonth.xml new file mode 100644 index 00000000000..473c8148118 --- /dev/null +++ b/addons/l10n_in_hr_payroll/views/report_hr_salary_employee_bymonth.xml @@ -0,0 +1,75 @@ + + + + + + \ No newline at end of file From 2e67cf77de903671f7af9b20955893687a826c91 Mon Sep 17 00:00:00 2001 From: "Rakesh Sindhav (OpenERP)" Date: Tue, 22 Apr 2014 11:01:21 +0530 Subject: [PATCH 03/31] [IMP]: Change the file attribute value in report bzr revid: rsi@tinyerp.com-20140422053121-e146c69xlxbl3lum --- addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml index 804236c0c68..795d0feabd4 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml @@ -23,7 +23,7 @@ string="Yearly Salary by Head" model="hr.salary.employee.month" report_type="qweb-pdf" - file="Yearly Salary By Head" + file="l10n_in_hr_payroll.employee_salary_bymonth" name="l10n_in_hr_payroll.employee_salary_bymonth"/> Date: Tue, 22 Apr 2014 17:39:15 +0530 Subject: [PATCH 04/31] [IMP]: Remove the inline CSS bzr revid: rsi@tinyerp.com-20140422120915-wpkrw1v1zmjugx5d --- addons/l10n_in_hr_payroll/__openerp__.py | 2 +- .../l10n_in_hr_payroll_report.xml | 6 +- .../report_hr_salary_employee_bymonth.py | 4 +- .../report_hr_salary_employee_bymonth.xml | 75 ------------------- .../views/report_hrsalarybymonth.xml | 74 ++++++++++++++++++ .../wizard/hr_salary_employee_bymonth.py | 2 +- 6 files changed, 81 insertions(+), 82 deletions(-) delete mode 100644 addons/l10n_in_hr_payroll/views/report_hr_salary_employee_bymonth.xml create mode 100644 addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml diff --git a/addons/l10n_in_hr_payroll/__openerp__.py b/addons/l10n_in_hr_payroll/__openerp__.py index 3ffa88729b0..c86ad06c387 100644 --- a/addons/l10n_in_hr_payroll/__openerp__.py +++ b/addons/l10n_in_hr_payroll/__openerp__.py @@ -49,7 +49,7 @@ Indian Payroll Salary Rules. 'security/ir.model.access.csv', 'l10n_in_hr_payroll_report.xml', 'l10n_in_hr_payroll_sequence.xml', - 'views/report_hr_salary_employee_bymonth.xml', + 'views/report_hrsalarybymonth.xml', 'wizard/hr_salary_employee_bymonth_view.xml', 'wizard/hr_yearly_salary_detail_view.xml', 'report/payment_advice_report_view.xml', diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml index 795d0feabd4..dc07633ea3d 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml @@ -19,12 +19,12 @@ string="Print Advice" /> + file="l10n_in_hr_payroll.report_hrsalarybymonth" + name="l10n_in_hr_payroll.report_hrsalarybymonth"/> - - - - - \ No newline at end of file diff --git a/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml new file mode 100644 index 00000000000..94d2faa18da --- /dev/null +++ b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml @@ -0,0 +1,74 @@ + + + + + + \ No newline at end of file diff --git a/addons/l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py b/addons/l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py index 113ad52620d..6e37f5b58d5 100644 --- a/addons/l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py +++ b/addons/l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py @@ -60,7 +60,7 @@ class hr_salary_employee_bymonth(osv.osv_memory): res = res and res[0] or {} datas.update({'form': res}) return self.pool['report'].get_action(cr, uid, ids, - 'l10n_in_hr_payroll.employee_salary_bymonth', + 'l10n_in_hr_payroll.report_hrsalarybymonth', data=datas, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 7e8dcc5600b61d68af1572a904eaada9215b17a6 Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Tue, 22 Apr 2014 14:11:05 +0200 Subject: [PATCH 05/31] [IMP] l10n_be and l1n_fr reports converted to QWeb bzr revid: sle@openerp.com-20140422121105-osvy8ji5v40t70jf --- addons/l10n_be/__openerp__.py | 7 +- addons/l10n_be/l10n_be_reports.xml | 23 + addons/l10n_be/views/report_vatintraprint.xml | 51 ++ .../views/report_vatpartnerlisting.xml | 44 ++ .../wizard/l10n_be_partner_vat_listing.py | 19 +- .../wizard/l10n_be_partner_vat_listing.rml | 179 ----- addons/l10n_be/wizard/l10n_be_vat_intra.py | 16 +- .../wizard/l10n_be_vat_intra_print.rml | 141 ---- addons/l10n_fr/__openerp__.py | 5 +- addons/l10n_fr/l10n_fr_reports.xml | 23 + addons/l10n_fr/report/base_report.py | 2 +- addons/l10n_fr/report/bilan_report.py | 112 ++- addons/l10n_fr/report/bilan_report.rml | 548 --------------- .../report/compute_resultant_report.py | 69 +- .../report/compute_resultant_report.rml | 652 ------------------ addons/l10n_fr/views/report_l10nfrbilan.xml | 546 +++++++++++++++ .../l10n_fr/views/report_l10nfrresultat.xml | 395 +++++++++++ addons/l10n_fr/wizard/fr_report_bilan.py | 8 +- .../wizard/fr_report_compute_resultant.py | 6 +- addons/report/models/abstract_report.py | 2 +- addons/report/models/report.py | 8 +- 21 files changed, 1298 insertions(+), 1558 deletions(-) create mode 100644 addons/l10n_be/l10n_be_reports.xml create mode 100644 addons/l10n_be/views/report_vatintraprint.xml create mode 100644 addons/l10n_be/views/report_vatpartnerlisting.xml delete mode 100644 addons/l10n_be/wizard/l10n_be_partner_vat_listing.rml delete mode 100644 addons/l10n_be/wizard/l10n_be_vat_intra_print.rml create mode 100644 addons/l10n_fr/l10n_fr_reports.xml delete mode 100644 addons/l10n_fr/report/bilan_report.rml delete mode 100644 addons/l10n_fr/report/compute_resultant_report.rml create mode 100644 addons/l10n_fr/views/report_l10nfrbilan.xml create mode 100644 addons/l10n_fr/views/report_l10nfrresultat.xml diff --git a/addons/l10n_be/__openerp__.py b/addons/l10n_be/__openerp__.py index 8e607ba3120..c828190aaf4 100644 --- a/addons/l10n_be/__openerp__.py +++ b/addons/l10n_be/__openerp__.py @@ -18,7 +18,8 @@ # along with this program. If not, see . # ############################################################################## -{ + +{ 'name': 'Belgium - Accounting', 'version': '1.1', 'category': 'Localization/Account Charts', @@ -72,12 +73,16 @@ Wizards provided by this module: 'wizard/l10n_be_partner_vat_listing.xml', 'wizard/account_wizard.xml', 'l10n_be_sequence.xml', + 'l10n_be_reports.xml', 'fiscal_templates.xml', 'account_fiscal_position_tax_template.xml', 'security/ir.model.access.csv', + 'views/report_vatintraprint.xml', + 'views/report_vatpartnerlisting.xml', ], 'demo': [], 'installable': True, 'images': ['images/1_config_chart_l10n_be.jpeg','images/2_l10n_be_chart.jpeg'], } + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_be/l10n_be_reports.xml b/addons/l10n_be/l10n_be_reports.xml new file mode 100644 index 00000000000..6077b67e262 --- /dev/null +++ b/addons/l10n_be/l10n_be_reports.xml @@ -0,0 +1,23 @@ + + + + + + + diff --git a/addons/l10n_be/views/report_vatintraprint.xml b/addons/l10n_be/views/report_vatintraprint.xml new file mode 100644 index 00000000000..94568e3f106 --- /dev/null +++ b/addons/l10n_be/views/report_vatintraprint.xml @@ -0,0 +1,51 @@ + + + + + + diff --git a/addons/l10n_be/views/report_vatpartnerlisting.xml b/addons/l10n_be/views/report_vatpartnerlisting.xml new file mode 100644 index 00000000000..b087ffc5802 --- /dev/null +++ b/addons/l10n_be/views/report_vatpartnerlisting.xml @@ -0,0 +1,44 @@ + + + + + + diff --git a/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py b/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py index 0ffa0c16a24..3bdee77956e 100644 --- a/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py +++ b/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py @@ -205,7 +205,6 @@ class partner_vat_list(osv.osv_memory): country = ads.country_id.code data = self.read(cr, uid, ids)[0] - sender_date = time.strftime('%Y-%m-%d') comp_name = obj_cmpny.name if not email: @@ -305,19 +304,16 @@ class partner_vat_list(osv.osv_memory): def print_vatlist(self, cr, uid, ids, context=None): if context is None: context = {} - obj_vat_lclient = self.pool.get('vat.listing.clients') datas = {'ids': []} datas['model'] = 'res.company' datas['year'] = context['year'] datas['limit_amount'] = context['limit_amount'] datas['client_datas'] = self._get_datas(cr, uid, ids, context=context) if not datas['client_datas']: - raise osv.except_osv(_('Error!'),_('No record to print.')) - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'partner.vat.listing.print', - 'datas': datas, - } + raise osv.except_osv(_('Error!'), _('No record to print.')) + return self.pool['report'].get_action( + cr, uid, [], 'l10n_be.report_l10nvatpartnerlisting', data=datas, context=context + ) class partner_vat_listing_print(report_sxw.rml_parse): @@ -338,6 +334,11 @@ class partner_vat_listing_print(report_sxw.rml_parse): }) super(partner_vat_listing_print, self).set_context(objects, data, ids) -report_sxw.report_sxw('report.partner.vat.listing.print', 'res.partner', 'addons/l10n_be/wizard/l10n_be_partner_vat_listing.rml', parser=partner_vat_listing_print,header=False) + +class wrapped_vat_listing_print(osv.AbstractModel): + _name = 'report.l10n_be.report_l10nvatpartnerlisting' + _inherit = 'report.abstract_report' + _template = 'l10n_be.report_l10nvatpartnerlisting' + _wrapped_report_class = partner_vat_listing_print # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_be/wizard/l10n_be_partner_vat_listing.rml b/addons/l10n_be/wizard/l10n_be_partner_vat_listing.rml deleted file mode 100644 index 81b0635fa37..00000000000 --- a/addons/l10n_be/wizard/l10n_be_partner_vat_listing.rml +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ company.name ]] - - - [[ year ]] - - - Annual Listing of VAT-Subjected Customers - - - - - - - - - - Nr - - - Partner - - - VAT Number - - - Base Amount - - - VAT Amount - - - - - - - - - - - - - - - - [[ sum_turnover ]] - - - - - [[ sum_tax ]] - - - - - - - -
- [[ repeatIn(client_list, 'l') ]] - - - - [[ l['seq'] ]] - - - [[ l['partner_name'] ]] - - - [[ l['vat'] ]] - - - [[ l['turnover'] ]] - - - [[ l['vat_amount'] ]] - - - - - - -
- - - - - - -
-
- diff --git a/addons/l10n_be/wizard/l10n_be_vat_intra.py b/addons/l10n_be/wizard/l10n_be_vat_intra.py index 1a2d9201790..e698973fef4 100644 --- a/addons/l10n_be/wizard/l10n_be_vat_intra.py +++ b/addons/l10n_be/wizard/l10n_be_vat_intra.py @@ -29,6 +29,7 @@ from openerp.osv import fields, osv from openerp.tools.translate import _ from openerp.report import report_sxw + class partner_vat_intra(osv.osv_memory): """ Partner Vat Intra @@ -276,11 +277,9 @@ class partner_vat_intra(osv.osv_memory): 'model': 'partner.vat.intra', 'form': xml_data } - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'partner.vat.intra.print', - 'datas': datas, - } + return self.pool['report'].get_action( + cr, uid, [], 'l10n_be.report_l10nvatintraprint', data=datas, context=context + ) class vat_intra_print(report_sxw.rml_parse): @@ -290,6 +289,11 @@ class vat_intra_print(report_sxw.rml_parse): 'time': time, }) -report_sxw.report_sxw('report.partner.vat.intra.print', 'partner.vat.intra', 'addons/l10n_be/wizard/l10n_be_vat_intra_print.rml', parser=vat_intra_print, header="internal") + +class wrapped_vat_intra_print(osv.AbstractModel): + _name = 'report.l10n_be.report_l10nvatintraprint' + _inherit = 'report.abstract_report' + _template = 'l10n_be.report_l10nvatintraprint' + _wrapped_report_class = vat_intra_print # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_be/wizard/l10n_be_vat_intra_print.rml b/addons/l10n_be/wizard/l10n_be_vat_intra_print.rml deleted file mode 100644 index a25f01ff348..00000000000 --- a/addons/l10n_be/wizard/l10n_be_vat_intra_print.rml +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Partner VAT Intra - - - - - - - - - - Company Name - - - VAT Number - - - Partners without VAT - - - - - [[ data['form']['company_name'] ]] - - - [[ data['form']['company_vat'] ]] - - - [[ data['form']['partner_wo_vat'] or '-']] - - - - - - - - - - Partner Name - - - Partner VAT - - - Code (Tax Code) - - - Amount - - - -
- [[ repeatIn(data['form']['clientlist'],'l') ]] - - - - [[ l['partner_name'] ]] - - - [[ l['vat'] ]] - - - [[ l['code'] ]]([[ l['intra_code'] ]]) - - - [[ formatLang(l['amount'], currency_obj=company.currency_id) ]] - - - -
- - - - - - - - - - - - - - Total: - - - [[ formatLang(data['form']['amountsum'], currency_obj=company.currency_id) ]] - - - - - - -
-
- diff --git a/addons/l10n_fr/__openerp__.py b/addons/l10n_fr/__openerp__.py index 9a563eeb197..5bc3a82bbc3 100644 --- a/addons/l10n_fr/__openerp__.py +++ b/addons/l10n_fr/__openerp__.py @@ -55,6 +55,9 @@ configuration of their taxes and fiscal positions manually. """, 'depends': ['base_iban', 'account', 'account_chart', 'base_vat', 'l10n_fr_rib'], 'data': [ + 'views/report_l10nfrbilan.xml', + 'views/report_l10nfrresultat.xml', + 'l10n_fr_reports.xml', 'fr_report.xml', 'plan_comptable_general.xml', 'l10n_fr_view.xml', @@ -72,5 +75,5 @@ configuration of their taxes and fiscal positions manually. 'installable': True, 'images': ['images/config_chart_l10n_fr.jpeg','images/l10n_fr_chart.jpeg'], } -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_fr/l10n_fr_reports.xml b/addons/l10n_fr/l10n_fr_reports.xml new file mode 100644 index 00000000000..ab97cf84c30 --- /dev/null +++ b/addons/l10n_fr/l10n_fr_reports.xml @@ -0,0 +1,23 @@ + + + + + + + diff --git a/addons/l10n_fr/report/base_report.py b/addons/l10n_fr/report/base_report.py index bc2cd308bf8..14fcce0d88f 100644 --- a/addons/l10n_fr/report/base_report.py +++ b/addons/l10n_fr/report/base_report.py @@ -27,9 +27,9 @@ ############################################################################## import time - from openerp.report import report_sxw + class base_report(report_sxw.rml_parse): def __init__(self, cr, uid, name, context=None): super(base_report, self).__init__(cr, uid, name, context=context) diff --git a/addons/l10n_fr/report/bilan_report.py b/addons/l10n_fr/report/bilan_report.py index 2ffbd24cc4f..51a2dd64a10 100644 --- a/addons/l10n_fr/report/bilan_report.py +++ b/addons/l10n_fr/report/bilan_report.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -############################################################################## +# # # Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr # @@ -24,16 +24,118 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # -############################################################################## +# import base_report -from openerp.report import report_sxw +from openerp.osv import osv + class bilan(base_report.base_report): + def __init__(self, cr, uid, name, context): super(bilan, self).__init__(cr, uid, name, context) -report_sxw.report_sxw('report.l10n.fr.bilan', 'account.move.line','addons/l10n_fr/report/bilan_report.rml', parser=bilan, header=False) + def set_context(self, objects, data, ids): + super(bilan, self).set_context(objects, data, ids) + + self._load('bilan', self.localcontext['data']['form']) + self._set_variable( + 'at1a', + self.localcontext['bavar1'] + self.localcontext['bavar2'] + self.localcontext['bavar3'] + + self.localcontext['bavar4'] + self.localcontext[ + 'bavar5'] + self.localcontext['bavar6'] + + self.localcontext['bavar7'] + self.localcontext[ + 'bavar8'] + self.localcontext['bavar9'] + + self.localcontext['bavar10'] + self.localcontext[ + 'bavar11'] + self.localcontext['bavar12'] + + self.localcontext['bavar13'] + self.localcontext[ + 'bavar14'] + self.localcontext['bavar15'] + + self.localcontext['bavar16'] + self.localcontext[ + 'bavar17'] + self.localcontext['bavar18'] + + self.localcontext['bavar19'] + self.localcontext['bavar20'] + ) + self._set_variable( + 'at1b', + self.localcontext['bavar2b'] + self.localcontext[ + 'bavar3b'] + self.localcontext['bavar4b'] + + self.localcontext['bavar5b'] + self.localcontext[ + 'bavar6b'] + self.localcontext['bavar7b'] + + self.localcontext['bavar9b'] + self.localcontext[ + 'bavar10b'] + self.localcontext['bavar11b'] + + self.localcontext['bavar12b'] + self.localcontext[ + 'bavar13b'] + self.localcontext['bavar15b'] + + self.localcontext['bavar16b'] + self.localcontext[ + 'bavar17b'] + self.localcontext['bavar18b'] + + self.localcontext['bavar19b'] + self.localcontext['bavar20b'] + ) + self._set_variable( + 'at1', + self.localcontext['at1a'] + self.localcontext['at1b'] + ) + self._set_variable( + 'at2a', + self.localcontext['bavar21'] + self.localcontext[ + 'bavar22'] + self.localcontext['bavar23'] + + self.localcontext['bavar24'] + self.localcontext[ + 'bavar25'] + self.localcontext['bavar26'] + + self.localcontext['bavar27'] + self.localcontext[ + 'bavar28'] + self.localcontext['bavar29'] + + self.localcontext['bavar30'] + self.localcontext[ + 'bavar31'] + self.localcontext['bavar32'] + + self.localcontext['bavar33'] + ) + self._set_variable( + 'at2b', + self.localcontext['bavar21b'] + self.localcontext[ + 'bavar22b'] + self.localcontext['bavar23b'] + + self.localcontext['bavar24b'] + self.localcontext[ + 'bavar26b'] + self.localcontext['bavar27b'] + + self.localcontext['bavar29b'] + self.localcontext['bavar30b'] + ) + self._set_variable( + 'at2', + self.localcontext['at2a'] + self.localcontext['at2b'] + ) + self._set_variable( + 'actif', + self.localcontext['at1'] + self.localcontext['at2'] + self.localcontext['bavar34'] + + self.localcontext['bavar35'] + self.localcontext['bavar36'] + ) + self._set_variable( + 'pt1', + self.localcontext['bpvar1'] + self.localcontext['bpvar2'] + self.localcontext['bpvar3'] + + self.localcontext['bpvar4'] + self.localcontext[ + 'bpvar5'] + self.localcontext['bpvar6'] + + self.localcontext['bpvar7'] + self.localcontext[ + 'bpvar8'] + self.localcontext['bpvar9'] + + self.localcontext['bpvar10'] + self.localcontext[ + 'bpvar11'] + self.localcontext['bpvar12'] + ) + self._set_variable( + 'pt2', + self.localcontext['bpvar13'] + self.localcontext['bpvar14'] + ) + self._set_variable( + 'pt3', + self.localcontext['bpvar15'] + self.localcontext[ + 'bpvar16'] + self.localcontext['bpvar17'] + + self.localcontext['bpvar18'] + self.localcontext[ + 'bpvar19'] + self.localcontext['bpvar20'] + + self.localcontext['bpvar21'] + self.localcontext[ + 'bpvar22'] + self.localcontext['bpvar23'] + + self.localcontext['bpvar24'] + self.localcontext['bpvar25'] + ) + self._set_variable( + 'passif', + self.localcontext['pt1'] + self.localcontext['pt2'] + self.localcontext['pt3'] + + self.localcontext['bpvar26'] + ) + + +class wrapped_report_bilan(osv.AbstractModel): + _name = 'report.l10n_fr.report_l10nfrbilan' + _inherit = 'report.abstract_report' + _template = 'l10n_fr.report_l10nfrbilan' + _wrapped_report_class = bilan # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/l10n_fr/report/bilan_report.rml b/addons/l10n_fr/report/bilan_report.rml deleted file mode 100644 index f448d63a81a..00000000000 --- a/addons/l10n_fr/report/bilan_report.rml +++ /dev/null @@ -1,548 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ _load('bilan',data['form'])]] - [[ _set_variable('at1a',bavar1+bavar2+bavar3+bavar4+bavar5+bavar6+bavar7+bavar8+bavar9+bavar10+bavar11+bavar12+bavar13+bavar14+bavar15+bavar16+bavar17+bavar18+bavar19+bavar20)]] - [[ _set_variable('at1b', bavar2b+bavar3b+bavar4b+bavar5b+bavar6b+bavar7b+bavar9b+bavar10b+bavar11b+bavar12b+bavar13b+bavar15b+ bavar16b+bavar17b+bavar18b+bavar19b+bavar20b)]] - [[ _set_variable('at1', at1a+at1b)]] - [[ _set_variable('at2a', bavar21+bavar22+bavar23+bavar24+bavar25+bavar26+bavar27+bavar28+bavar29+bavar30+bavar31+bavar32+bavar33)]] - [[ _set_variable('at2b', bavar21b+bavar22b+bavar23b+bavar24b+bavar26b+bavar27b+bavar29b+bavar30b)]] - [[ _set_variable('at2', at2a+at2b)]] - [[ _set_variable('actif', at1+at2+bavar34+bavar35+bavar36)]] - [[ _set_variable('pt1', bpvar1+bpvar2+bpvar3+bpvar4+bpvar5+bpvar6+bpvar7+bpvar8+bpvar9+bpvar10+bpvar11+bpvar12)]] - [[ _set_variable('pt2', bpvar13+bpvar14)]] - [[ _set_variable('pt3', bpvar15+bpvar16+bpvar17+bpvar18+bpvar19+bpvar20+bpvar21+bpvar22+bpvar23+bpvar24+bpvar25)]] - [[ _set_variable('passif', pt1+pt2+pt3+bpvar26)]] - - - [[ company.name ]]au [[ time.strftime('%d-%m-%Y',time.strptime(date_stop,'%Y-%m-%d'))]] - Bilan - Imprimé le : [[ time.strftime('%d-%m-%Y') ]] - - - - - Tenue de Compte : [[ company.currency_id.name ]] - - - ACTIF - - - - Brut - Amortissements et dépréciations - Net - - - Capital souscrit - non appelé - [[bavar1]] - - [[bavar1]] - - - ACTIF IMMOBILISÉ - - - - - - IMMOBILISATIONS INCORPORELLES - - - - - - Frais d'établissement - [[bavar2]] - [[-bavar2b]] - [[bavar2+bavar2b]] - - - Frais de recherche et de développement - [[bavar3]][[-bavar3b]] - [[bavar3+bavar3b]] - - - Concessions, brevets, licences,..., droits et valeurs similaires - [[bavar4]] - [[-bavar4b]] - [[bavar4+bavar4b]] - - - Fonds commercial - [[bavar5]] - [[-bavar5b]] - [[bavar5+bavar5b]] - - - Autres - [[bavar6]] - [[-bavar6b]] - [[bavar6+bavar6b]] - - - Immobilisations incorporelles en cours - [[bavar7]] - [[-bavar7b]] - [[bavar7+bavar7b]] - - - Avances et acomptes - [[bavar8]] - - [[bavar8]] - - - IMMOBILISATIONS CORPORELLES - - - - - - Terrains - [[bavar9]] - [[-bavar9b]] - [[bavar9+bavar9b]] - - - Constructions - [[bavar10]] - [[-bavar10b]] - [[bavar10+bavar10b]] - - - Installations techniques,matériel et outillage - [[bavar11]] - [[-bavar11b]] - [[bavar11+bavar11b]] - - - Autres - [[bavar12]] - [[-bavar12b]] - [[bavar12+bavar12b]] - - - Immobilisations corporelles en cours - [[bavar13]] - [[-bavar13b]] - [[bavar13+bavar13b]] - - - Avances et acomptes - [[bavar14]] - - [[bavar14]] - - - IMMOBILISATIONS FINANCIÉRES - - - - - - Participations - [[bavar15]] - [[-bavar15b]] - [[bavar15+bavar15b]] - - - Créances rattachées à des participations - [[bavar16]] - [[-bavar16b]] - [[bavar16+bavar16b]] - - - Titres immobilisés de l'activité de portefeuille - [[bavar17]] - [[-bavar17b]] - [[bavar17+bavar17b]] - - - Autres titres immobilisés - [[bavar18]] - [[-bavar18b]] - [[bavar18+bavar18b]] - - - Prêts - [[bavar19]] - [[-bavar19b]] - [[bavar19+bavar19b]] - - - Autres - [[bavar20]] - [[-bavar20b]] - [[bavar20+bavar20b]] - - - TOTAL I - [[at1a]] - [[-at1b]] - [[at1]] - - - ACTIF CIRCULANT - - - - - - STOCK EN COURS - - - - - - Matières premières et autres approvisionnements - [[bavar21]] - [[-bavar21b]] - [[bavar21+bavar21b]] - - - En-cours de production [biens et services] - [[bavar22]] - [[-bavar22b]] - [[bavar22+bavar22b]] - - - Produits intermédiaires et finis - [[bavar23]] - [[-bavar23b]] - [[bavar23+bavar23b]] - - - Marchandises - [[bavar24]] - [[-bavar24b]] - [[bavar24+bavar24b]] - - - Avances et acomptes versés sur commandes - [[bavar25]] - - [[bavar25]] - - - CRÉANCES - - - - - - Créances clients et comptes rattachés - [[bavar26]] - [[-bavar26b]] - [[bavar26+bavar26b]] - - - Autres - [[bavar27]] - [[-bavar27b]] - [[bavar27+bavar27b]] - - - Capital souscrit - appelé , non versé - [[bavar28]] - - [[bavar28]] - - - VALEURS MOBILIÈRES DE PLACEMENT - - - - - - Actions propres - [[bavar29]] - [[-bavar29b]] - [[bavar29+bavar29b]] - - - Autres titres - [[bavar30]] - [[-bavar30b]] - [[bavar30+bavar30b]] - - - Instruments de trésorerie - [[bavar31]] - - [[bavar31]] - - - Disponibilités - [[bavar32]] - - [[bavar32]] - - - Charges constatés d'avance - [[bavar33]] - - [[bavar33]] - - - TOTAL II - [[at2a]] - [[-at2b]] - [[at2]] - - - Charges à répartir sur plusieurs exercices ( III ) - [[bavar34]] - - [[bavar34]] - - - Primes de remboursement des emprunts ( IV ) - [[bavar35]] - - [[bavar35]] - - - Écarts de conversion actif ( V ) - [[bavar36]] - - [[bavar36]] - - - TOTAL ACTIF ( I + II + III + IV + V ) - [[at1a+at2a]] - [[-at1b-at2b]] - [[actif]] - - - PASSIF - - - CAPITAUX PROPRES - - - - Capital [dont versé...] - [[bpvar1]] - - - Primes d'émission, de fusion, d'apport - [[bpvar2]] - - - Écarts de réévaluation - [[bpvar3]] - - - Écart d'équivalence - [[bpvar4]] - - - RÉSERVES - - - - Réserve légale - [[bpvar5]] - - - Réserves statutaires ou contractuelles - [[bpvar6]] - - - Réserves réglementées[[bpvar7]] - - Autres réserves - [[bpvar8]] - - - Report à nouveau - [[bpvar9]] - - - RÉSULTAT DE L'EXERCICE [bénéfice ou perte] - [[bpvar10]] - - - Subventions d'investissement - [[bpvar11]] - - - Provisions réglementées - [[bpvar12]] - - - TOTAL I - [[pt1]] - - - PROVISIONS - - - - Provisions pour risques - [[bpvar13]] - - - Provisions pour charges - [[bpvar14]] - - - TOTAL II - [[pt2]] - - - DETTES - - - - Emprunts obligataires convertibles - [[bpvar15]] - - - Autres emprunts obligataires - [[bpvar16]] - - - Emprunts et dettes auprès des établissements de crédit - [[bpvar17]] - - - Emprunts et dettes financières diverses - [[bpvar18]] - - - Avances et acomptes reçus sur commandes en cours - [[bpvar19]] - - - Dettes fournisseurs et comptes rattachés - [[bpvar20]] - - - Dettes fiscales et sociales - [[bpvar21]] - - - Dettes sur immobilisations et comptes rattachés - [[bpvar22]] - - - Autres dettes - [[bpvar23]] - - - Instruments de trésorerie - [[bpvar24]] - - - Produits constatés d'avance - [[bpvar25]] - - - TOTAL III - [[pt3]] - - - Écarts de conversion passif ( IV ) - [[bpvar26]] - - - TOTAL GÉNÉRAL (I + II + III + IV) - [[passif]] - - - ACTIF - PASSIF - [[round(actif-passif,2)]] - - - - [[ abs(bpcheck)<0.0001 and removeParentNode('para') ]] Attention, pour que votre bilan soit correct, vous devez solder les comptes 120 ou 129 (Résultat de l'exercice précédant) dans un compte de report à nouveau (compte 110 ou 119) ou dans le compte 108. Renseignez vous sur votre structure juridique et son fonctionnement comptable. - - \ No newline at end of file diff --git a/addons/l10n_fr/report/compute_resultant_report.py b/addons/l10n_fr/report/compute_resultant_report.py index 5eb62d7e82d..e371bcc12e6 100644 --- a/addons/l10n_fr/report/compute_resultant_report.py +++ b/addons/l10n_fr/report/compute_resultant_report.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -############################################################################## +# # # Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr # @@ -24,16 +24,75 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # -############################################################################## +# import base_report -from openerp.report import report_sxw +from openerp.osv import osv + class cdr(base_report.base_report): def __init__(self, cr, uid, name, context): super(cdr, self).__init__(cr, uid, name, context) -report_sxw.report_sxw('report.l10n.fr.compute_resultant', 'account.move.line','addons/l10n_fr/report/compute_resultant_report.rml', parser=cdr, header=False) + def set_context(self, objects, data, ids): + super(cdr, self).set_context(objects, data, ids) + + self._load('cdr', self.localcontext['data']['form']) + self._set_variable( + 'ct1', + self.localcontext['cdrc1']+self.localcontext['cdrc2']+self.localcontext['cdrc3']+ + self.localcontext['cdrc4']+self.localcontext['cdrc5']+self.localcontext['cdrc6']+ + self.localcontext['cdrc7']+self.localcontext['cdrc8']+self.localcontext['cdrc9']+ + self.localcontext['cdrc10']+self.localcontext['cdrc11']+self.localcontext['cdrc12']+ + self.localcontext['cdrc13']+self.localcontext['cdrc14']+self.localcontext['cdrc15'] + ) + self._set_variable( + 'ct3', + self.localcontext['cdrc17']+self.localcontext['cdrc18']+self.localcontext['cdrc19']+ + self.localcontext['cdrc20'] + ) + self._set_variable( + 'ct4', + self.localcontext['cdrc21']+self.localcontext['cdrc22']+self.localcontext['cdrc23'] + ) + self._set_variable( + 'charges', + self.localcontext['ct1']+self.localcontext['cdrc16']+self.localcontext['ct3']+ + self.localcontext['ct4']+self.localcontext['cdrc24']+self.localcontext['cdrc25'] + ) + self._set_variable( + 'pta', + self.localcontext['cdrp1']+self.localcontext['cdrp2'] + ) + self._set_variable( + 'ptb', + self.localcontext['cdrp3']+self.localcontext['cdrp4']+self.localcontext['cdrp5']+ + self.localcontext['cdrp6']+self.localcontext['cdrp7'] + ) + self._set_variable( + 'pt1', + self.localcontext['pta']+self.localcontext['ptb'] + ) + self._set_variable( + 'pt3', + self.localcontext['cdrp9']+self.localcontext['cdrp10']+self.localcontext['cdrp11']+ + self.localcontext['cdrp12']+self.localcontext['cdrp13']+self.localcontext['cdrp14'] + ) + self._set_variable( + 'pt4', + self.localcontext['cdrp15']+self.localcontext['cdrp16']+self.localcontext['cdrp17'] + ) + self._set_variable( + 'produits', + self.localcontext['pt1']+self.localcontext['cdrp8']+self.localcontext['pt3']+ + self.localcontext['pt4'] + ) + + +class wrapped_report_resultat(osv.AbstractModel): + _name = 'report.l10n_fr.report_l10nfrresultat' + _inherit = 'report.abstract_report' + _template = 'l10n_fr.report_l10nfrresultat' + _wrapped_report_class = cdr # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/l10n_fr/report/compute_resultant_report.rml b/addons/l10n_fr/report/compute_resultant_report.rml deleted file mode 100644 index b3897c8a839..00000000000 --- a/addons/l10n_fr/report/compute_resultant_report.rml +++ /dev/null @@ -1,652 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ _load('cdr',data['form'])]] - [[ _set_variable('ct1', cdrc1+cdrc2+cdrc3+cdrc4+cdrc5+cdrc6+cdrc7+cdrc8+cdrc9+cdrc10+cdrc11+cdrc12+cdrc13+cdrc14+cdrc15)]] - [[ _set_variable('ct3', cdrc17+cdrc18+cdrc19+cdrc20)]] - [[ _set_variable('ct4', cdrc21+cdrc22+cdrc23)]] - [[ _set_variable('charges', ct1+cdrc16+ct3+ct4+cdrc24+cdrc25)]] - [[ _set_variable('pta', cdrp1+cdrp2)]] - [[ _set_variable('ptb', cdrp3+cdrp4+cdrp5+cdrp6+cdrp7)]] - [[ _set_variable('pt1', pta+ptb)]] - [[ _set_variable('pt3', cdrp9+cdrp10+cdrp11+cdrp12+cdrp13+cdrp14)]] - [[ _set_variable('pt4', cdrp15+cdrp16+cdrp17)]] - [[ _set_variable('produits', pt1+cdrp8+pt3+pt4)]] - - - - [[ company.name ]] - période du [[ time.strftime('%d-%m-%Y',time.strptime(date_start,'%Y-%m-%d'))]] au [[ time.strftime('%d-%m-%Y',time.strptime(date_stop,'%Y-%m-%d'))]] - - - Compte de résultat - - - Imprimé le : [[ time.strftime('%d-%m-%Y') ]] - - - - - - - - - - - - - - - Tenue de Compte : [[ company.currency_id.name ]] - - - - - - - - - - CHARGES ( hors taxes ) - - - - - - - - - - CHARGES D'EXPLOITATION - - - - - - - - - - Achat de marchandises - - - [[cdrc1]] - - - - - Variation des stocks - - - [[cdrc2]] - - - - - Achats de matières premières et autres approvisionnements - - - [[cdrc3]] - - - - - Variation des stocks - - - [[cdrc4]] - - - - - Autres achats et charges externes - - - [[cdrc5]] - - - - - Redevances de crédit-bail mobilier - - - [[cdrc6]] - - - - - Redevances de crédit-bail immobilier - - - [[cdrc7]] - - - - - Impôts, taxes et versements assimilés - - - [[cdrc8]] - - - - - Salaires et traitements - - - [[cdrc9]] - - - - - Charges sociales - - - [[cdrc10]] - - - - - Dotation aux amortissements et aux dépréciations - - - - - - - - - - Sur immobilisations : dotations aux amortissements - - - [[cdrc11]] - - - - - Sur immobilisations : dotations aux dépréciations - - - [[cdrc12]] - - - - - Sur actif circulant : dotations aux dépréciations - - - [[cdrc13]] - - - - - Dotations aux provisions - - - [[cdrc14]] - - - - - Autres charges - - - [[cdrc15]] - - - - - TOTAL I - - - [[ct1]] - - - - - Quotes-parts de résultat sur opérations faites en commun ( II ) - - - [[cdrc16]] - - - - - CHARGES FINANCIÈRES - - - - - - - - - - Dotations aux amortissements, aux dépréciations et aux provisions - - - [[cdrc17]] - - - - - Intérêts et charges assimilées - - - [[cdrc18]] - - - - - Différences négatives de change - - - [[cdrc19]] - - - - - Charges nettes sur cessions de valeurs mobilières de placement - - - [[cdrc20]] - - - - - TOTAL III - - - [[ct3]] - - - - - CHARGES EXCEPTIONNELLES - - - - - - - - - - Sur opérations de gestion - - - [[cdrc21]] - - - - - Sur opérations en capital - - - [[cdrc22]] - - - - - Dotations aux amortissements, aux dépréciations et aux provisions - - - [[cdrc23]] - - - - - TOTAL IV - - - [[ct4]] - - - - - Participation des salariés aux résultats ( V ) - - - [[cdrc24]] - - - - - Impôts sur les bénéfices ( VI ) - - - [[cdrc25]] - - - - - TOTAL CHARGES ( I + II + III + IV+ V+ VI ) - - - [[charges]] - - - - - - - - - - - - - - - - - PRODUITS (hors taxes) - - - - - - - - - - PRODUITS D'EXPLOITATION - - - - - - - - - - Vente de marchandises - - - [[cdrp1]] - - - - - Production vendue [biens et services] - - - [[cdrp2]] - - - - - Sous-total A - Montant net du chiffre d'affaires - - - [[pta]] - - - - - Production stockée - - - [[cdrp3]] - - - - - Production immobilisée - - - [[cdrp4]] - - - - - Subventions d'exploitation - - - [[cdrp5]] - - - - - Reprises sur provisions, dépréciations (et amortissements) et transferts de charges - - - [[cdrp6]] - - - - - Autres produits - - - [[cdrp7]] - - - - - Sous-total B - - - [[ptb]] - - - - - TOTAL I ( A + B ) - - - [[pt1]] - - - - - Quotes-parts de résultat sur opérations faites en commun (II) - - - [[cdrp8]] - - - - - PRODUITS FINANCIERS - - - - - - - - - - De participation - - - [[cdrp9]] - - - - - D'autres valeurs mobilières et créances de l'actif immobilisé - - - [[cdrp10]] - - - - - Autres intérêts et produits assimilés - - - [[cdrp11]] - - - - - Reprises sur provisions, dépréciations et transferts de charges - - - [[cdrp12]] - - - - - Différences positives de change - - - [[cdrp13]] - - - - - Produits nets sur cessions de valeurs mobilières de placement - - - [[cdrp14]] - - - - - TOTAL III - - - [[pt3]] - - - - - PRODUITS EXCEPTIONNELS - - - - - - - - - - Sur opérations de gestion - - - [[cdrp15]] - - - - - Sur opérations en capital - - - [[cdrp16]] - - - - - Reprises sur provisions, dépréciations et transferts de charges - - - [[cdrp17]] - - - - - TOTAL IV - - - [[pt4]] - - - - - TOTAL DES PRODUITS ( I + II + III + IV ) - - - [[produits]] - - - - - PRODUITS - CHARGES - - - [[produits-charges]] - - - - - - - - diff --git a/addons/l10n_fr/views/report_l10nfrbilan.xml b/addons/l10n_fr/views/report_l10nfrbilan.xml new file mode 100644 index 00000000000..5b7335e0db0 --- /dev/null +++ b/addons/l10n_fr/views/report_l10nfrbilan.xml @@ -0,0 +1,546 @@ + + + + + + diff --git a/addons/l10n_fr/views/report_l10nfrresultat.xml b/addons/l10n_fr/views/report_l10nfrresultat.xml new file mode 100644 index 00000000000..9938e3fad6f --- /dev/null +++ b/addons/l10n_fr/views/report_l10nfrresultat.xml @@ -0,0 +1,395 @@ + + + + + + diff --git a/addons/l10n_fr/wizard/fr_report_bilan.py b/addons/l10n_fr/wizard/fr_report_bilan.py index e7ae542fa3f..3fde3c19d80 100644 --- a/addons/l10n_fr/wizard/fr_report_bilan.py +++ b/addons/l10n_fr/wizard/fr_report_bilan.py @@ -28,6 +28,7 @@ from openerp.osv import fields, osv + class account_bilan_report(osv.osv_memory): _name = 'account.bilan.report' _description = 'Account Bilan Report' @@ -41,7 +42,7 @@ class account_bilan_report(osv.osv_memory): } _defaults = { - 'fiscalyear_id':_get_default_fiscalyear + 'fiscalyear_id': _get_default_fiscalyear } def print_bilan_report(self, cr, uid, ids, context=None): @@ -50,7 +51,8 @@ class account_bilan_report(osv.osv_memory): data['form'] = {} data['ids'] = active_ids data['form']['fiscalyear_id'] = self.browse(cr, uid, ids)[0].fiscalyear_id.id - return {'type': 'ir.actions.report.xml', 'report_name': 'l10n.fr.bilan', 'datas': data} - + return self.pool['report'].get_action( + cr, uid, ids, 'l10n_fr.report_l10nfrbilan', data=data, context=context + ) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_fr/wizard/fr_report_compute_resultant.py b/addons/l10n_fr/wizard/fr_report_compute_resultant.py index c83f7494d4a..3e13da8f69f 100644 --- a/addons/l10n_fr/wizard/fr_report_compute_resultant.py +++ b/addons/l10n_fr/wizard/fr_report_compute_resultant.py @@ -28,6 +28,7 @@ from openerp.osv import fields, osv + class account_cdr_report(osv.osv_memory): _name = 'account.cdr.report' _description = 'Account CDR Report' @@ -50,7 +51,8 @@ class account_cdr_report(osv.osv_memory): data['form'] = {} data['ids'] = active_ids data['form']['fiscalyear_id'] = self.browse(cr, uid, ids)[0].fiscalyear_id.id - return { 'type': 'ir.actions.report.xml', 'report_name': 'l10n.fr.compute_resultant', 'datas': data} - + return self.pool['report'].get_action( + cr, uid, ids, 'l10n_fr.report_l10nfrresultat', data=data, context=context + ) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report/models/abstract_report.py b/addons/report/models/abstract_report.py index 2da32b6c0f6..4f38b39b5e2 100644 --- a/addons/report/models/abstract_report.py +++ b/addons/report/models/abstract_report.py @@ -58,7 +58,7 @@ class AbstractReport(osv.AbstractModel): docargs = wrapped_report.localcontext docargs['docs'] = docargs.get('objects') - # Used in template translating (see render_doc method from report model) + # Used in template translation (see translate_doc method from report model) docargs['doc_ids'] = context['active_ids'] docargs['doc_model'] = model diff --git a/addons/report/models/report.py b/addons/report/models/report.py index 8dd8a4dce6f..212555dbc8a 100644 --- a/addons/report/models/report.py +++ b/addons/report/models/report.py @@ -262,15 +262,15 @@ class Report(osv.Model): :param report_name: Name of the template to generate an action for """ - if context is None: - context = {} - report_obj = self.pool['ir.actions.report.xml'] idreport = report_obj.search(cr, uid, [('report_name', '=', report_name)], context=context) try: report = report_obj.browse(cr, uid, idreport[0], context=context) except IndexError: - raise osv.except_osv(_('Bad Report'), _('This report is not loaded into the database.')) + raise osv.except_osv( + _('Bad Report Reference'), + _('This report is not loaded into the database: %s.' % report_name) + ) action = { 'context': context, From 5fdb6292b1d492a793b9ce75852cef30a49f8591 Mon Sep 17 00:00:00 2001 From: Sunil Sharma Date: Tue, 22 Apr 2014 18:07:57 +0530 Subject: [PATCH 06/31] [imp]:add qweb report and remove rml report bzr revid: ssh@tinyerp.com-20140422123757-6wskvlwyltlyjvp0 --- addons/l10n_in_hr_payroll/__openerp__.py | 1 + .../l10n_in_hr_payroll_report.xml | 5 +- .../report/report_hr_yearly_salary_detail.py | 11 +- .../report/report_hr_yearly_salary_detail.rml | 588 ------------------ .../view/report_hr_yearly_salary_detail.xml | 103 +++ .../wizard/hr_yearly_salary_detail.py | 9 +- 6 files changed, 117 insertions(+), 600 deletions(-) delete mode 100644 addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.rml create mode 100644 addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml diff --git a/addons/l10n_in_hr_payroll/__openerp__.py b/addons/l10n_in_hr_payroll/__openerp__.py index 2522d543548..231491dd15a 100644 --- a/addons/l10n_in_hr_payroll/__openerp__.py +++ b/addons/l10n_in_hr_payroll/__openerp__.py @@ -53,6 +53,7 @@ Indian Payroll Salary Rules. 'wizard/hr_yearly_salary_detail_view.xml', 'report/payment_advice_report_view.xml', 'report/payslip_report_view.xml', + 'view/report_hr_yearly_salary_detail.xml', ], 'test': [ diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml index 7f27291051f..90760d4b12f 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml @@ -30,8 +30,9 @@ auto="False" id="yearly_salary" model="yearly.salary.detail" - name="salary.detail.byyear" - rml="l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.rml" + name="l10n_in_hr_payroll.report_hr_yearly_salary" + file="l10n_in_hr_payroll.report_hr_yearly_salary" + report_type="qweb-pdf" string="Yearly Salary by Employee" /> diff --git a/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py b/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py index 220bcdb5552..e531a335e7c 100644 --- a/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py +++ b/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py @@ -22,6 +22,7 @@ import time import datetime from openerp.report import report_sxw +from openerp.osv import osv class employees_yearly_salary_report(report_sxw.rml_parse): @@ -64,8 +65,8 @@ class employees_yearly_salary_report(report_sxw.rml_parse): current_year = last_year current_month = current_month + 1 for c in range(0, (12-no_months)): - mnth_name.append('None') - self.mnths.append('None') + mnth_name.append('') + self.mnths.append('') return [mnth_name] def get_employee(self, form): @@ -159,6 +160,10 @@ class employees_yearly_salary_report(report_sxw.rml_parse): def get_total(self): return self.total -report_sxw.report_sxw('report.salary.detail.byyear', 'yearly.salary.detail', 'hr_payroll/report/report_hr_yearly_salary_detail.rml', parser=employees_yearly_salary_report, header='internal landscape') +class wrapped_report_payslip(osv.AbstractModel): + _name = 'report.l10n_in_hr_payroll.report_hr_yearly_salary' + _inherit = 'report.abstract_report' + _template = 'l10n_in_hr_payroll.report_hr_yearly_salary' + _wrapped_report_class = employees_yearly_salary_report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.rml b/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.rml deleted file mode 100644 index 502eaa7b0ff..00000000000 --- a/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.rml +++ /dev/null @@ -1,588 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ repeatIn(get_employee(data['form']), 'o') ]] - - - - From [[ formatLang(data['form']['date_from'], date=True) ]] To [[ formatLang(data['form']['date_to'], date=True) ]] - - - - - - - - - - Employee Code - - - [[ o.identification_id ]] - - - Department - - - [[ o.department_id and o.department_id.name or '' ]] - - - Bank - - - [[ o.bank_account_id and o.bank_account_id.bank.name or '' ]] - - - - - - - Employee Name - - - [[ o.name ]] - - - Other No. - - - [[ o.otherid or '' ]] - - - Address - - - [[o.address_home_id and o.address_home_id.name or '' ]] - - - - - - - Designation - - - [[ o.job_id and o.job_id.name or '' ]] - - - Phone No. - - - [[ o.work_phone or '' ]] - - - E-mail Address - - - [[o.work_email or '' ]] - - - - - - -
- [[ repeatIn(get_periods(data['form']),'m') ]] - [[ get_employee_detail((data['form']),o) ]] - - - - Title - - - [[ m[0] != 'None' and m[0] or '' ]] - - - [[ m[1] != 'None' and m[1] or '' ]] - - - [[ m[2] != 'None' and m[2] or '' ]] - - - [[ m[3] != 'None' and m[3] or '' ]] - - - [[ m[4] != 'None' and m[4] or '' ]] - - - [[ m[5] != 'None' and m[5] or '' ]] - - - [[ m[6] != 'None' and m[6] or '' ]] - - - [[ m[7] != 'None' and m[7] or '' ]] - - - [[ m[8] != 'None' and m[8] or '' ]] - - - [[ m[9] != 'None' and m[9] or '' ]] - - - [[ m[10] != 'None' and m[10] or '' ]] - - - [[ m[11] != 'None' and m[11] or '' ]] - - - Total - - - - - - -
- - - - Allowances with Basic: - - - -
- [[ repeatIn(get_allow(),'e1') ]] - - - - [[ e1[0] in ["Basic","Gross"] and e1[0] ]] - [[ e1[0] not in ["Basic","Gross"] and e1[0] ]] - - - - [[ (e1[0] in ["Basic","Gross"] and e1[1]!='' and formatLang(e1[1])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[1]!='' and formatLang(e1[1])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[2]!='' and formatLang(e1[2])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[2]!='' and formatLang(e1[2])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[3]!='' and formatLang(e1[3])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[3]!='' and formatLang(e1[3])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[4]!='' and formatLang(e1[4])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[4]!='' and formatLang(e1[4])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[5]!='' and formatLang(e1[5])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[5]!='' and formatLang(e1[5])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[6]!='' and formatLang(e1[6])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[6]!='' and formatLang(e1[6])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[7]!='' and formatLang(e1[7])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[7]!='' and formatLang(e1[7])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[8]!='' and formatLang(e1[8])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[8]!='' and formatLang(e1[8])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[9]!='' and formatLang(e1[9])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[9]!='' and formatLang(e1[9])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[10]!='' and formatLang(e1[10])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[10]!='' and formatLang(e1[10])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[11]!='' and formatLang(e1[11])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[11]!='' and formatLang(e1[11])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[12]!='' and formatLang(e1[12])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[12]!='' and formatLang(e1[12])) or removeParentNode('font') ]] - - - - [[ formatLang(e1[13],currency_obj= company.currency_id) ]] - - - -
- - - - Deductions: - - - -
- [[ repeatIn(get_deduct(),'e2') ]] - - - - [[ e2[0] in ["Net"] and e2[0] ]] - [[ e2[0] not in ["Net"] and e2[0] ]] - - - - [[ (e2[0] in ["Net"] and e2[1]!='' and formatLang(e2[1])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[1]!='' and formatLang(e2[1])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[2]!='' and formatLang(e2[2])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[2]!='' and formatLang(e2[2])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[3]!='' and formatLang(e2[3])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[3]!='' and formatLang(e2[3])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[4]!='' and formatLang(e2[4])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[4]!='' and formatLang(e2[4])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[5]!='' and formatLang(e2[5])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[5]!='' and formatLang(e2[5])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[6]!='' and formatLang(e2[6])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[6]!='' and formatLang(e2[6])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[7]!='' and formatLang(e2[7])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[7]!='' and formatLang(e2[7])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[8]!='' and formatLang(e2[8])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[8]!='' and formatLang(e2[8])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[9]!='' and formatLang(e2[9])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[9]!='' and formatLang(e2[9])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[10]!='' and formatLang(e2[10])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[10]!='' and formatLang(e2[10])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[11]!='' and formatLang(e2[11])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[11]!='' and formatLang(e2[11])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[12]!='' and formatLang(e2[12])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[12]!='' and formatLang(e2[12])) or removeParentNode('font') ]] - - - - [[ formatLang(e2[13],currency_obj= company.currency_id) ]] - - - -
-
- - - -
- - - -
-
diff --git a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml new file mode 100644 index 00000000000..5430518e10d --- /dev/null +++ b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml @@ -0,0 +1,103 @@ + + + + + + diff --git a/addons/l10n_in_hr_payroll/wizard/hr_yearly_salary_detail.py b/addons/l10n_in_hr_payroll/wizard/hr_yearly_salary_detail.py index de3680f2dd3..ec36a80dd46 100644 --- a/addons/l10n_in_hr_payroll/wizard/hr_yearly_salary_detail.py +++ b/addons/l10n_in_hr_payroll/wizard/hr_yearly_salary_detail.py @@ -54,12 +54,7 @@ class yearly_salary_detail(osv.osv_memory): res = self.read(cr, uid, ids, context=context) res = res and res[0] or {} - datas.update({'form': res}) - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'salary.detail.byyear', - 'datas': datas, - } - + datas.update({'form':res}) + return self.pool['report'].get_action(cr, uid, ids, 'l10n_in_hr_payroll.report_hr_yearly_salary', data=datas, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 5184a7aceb072177e6a31131f9b6ce366c2d8086 Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Tue, 22 Apr 2014 15:13:33 +0200 Subject: [PATCH 07/31] [FIX] l10n_fr tests: render the reports with their new xmlid bzr revid: sle@openerp.com-20140422131333-dbgt9lp8oa6us1zs --- addons/l10n_fr/test/l10n_fr_report.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/l10n_fr/test/l10n_fr_report.yml b/addons/l10n_fr/test/l10n_fr_report.yml index 25de74dd313..7038887ef52 100644 --- a/addons/l10n_fr/test/l10n_fr_report.yml +++ b/addons/l10n_fr/test/l10n_fr_report.yml @@ -5,7 +5,7 @@ import os import openerp.report from openerp import tools - data, format = openerp.report.render_report(cr, uid, [], 'l10n.fr.bilan', {'model':'account.move.line', 'form':{'fiscalyear_id': ref('account.data_fiscalyear')}}, {}) + data, format = openerp.report.render_report(cr, uid, [], 'l10n_fr.report_l10nfrbilan', {'model':'account.move.line', 'form':{'fiscalyear_id': ref('account.data_fiscalyear')}}, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'l10n_fr-bilan_report.'+format), 'wb+').write(data) @@ -16,6 +16,6 @@ import os import openerp.report from openerp import tools - data, format = openerp.report.render_report(cr, uid, [], 'l10n.fr.compute_resultant', {'model':'account.move.line', 'form':{'fiscalyear_id': ref('account.data_fiscalyear')}}, {}) + data, format = openerp.report.render_report(cr, uid, [], 'l10n_fr.report_l10nfrresultat', {'model':'account.move.line', 'form':{'fiscalyear_id': ref('account.data_fiscalyear')}}, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'l10n_fr-compute_resultant_report.'+format), 'wb+').write(data) From f44148ba221803ce29fbe368b2708b1b3a935674 Mon Sep 17 00:00:00 2001 From: "Rakesh Sindhav (OpenERP)" Date: Tue, 22 Apr 2014 19:23:08 +0530 Subject: [PATCH 08/31] [IMP]: Optimize the code bzr revid: rsi@tinyerp.com-20140422135308-ixhpb0d4lbbecl2z --- .../views/report_hrsalarybymonth.xml | 106 +++++++++--------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml index 94d2faa18da..a2e3de1ef32 100644 --- a/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml +++ b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml @@ -10,61 +10,61 @@
From To of Category
- - - - - - - - + + + + - - - - + + + + - + + + + + + + + + + + + + + + +
Name - - - - - - - - - - - - - Total
- - - - - - - - - - - - - +
Name + + + + + + + + + + + + + Total
- - - - - - - - - - - - - +
+ + + + + + + + + + + + + +
-
Total
From 06ca6d2540add7e8534dea69aa62a4b5aa2a1747 Mon Sep 17 00:00:00 2001 From: Sunil Sharma Date: Wed, 23 Apr 2014 10:59:10 +0530 Subject: [PATCH 09/31] [imp]:improve code bzr revid: ssh@tinyerp.com-20140423052910-486im2lmzpqev14n --- .../view/report_hr_yearly_salary_detail.xml | 36 +++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml index 5430518e10d..fc7a2fd4b9f 100644 --- a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml @@ -36,19 +36,43 @@ Employee Name - + + + + + Other No. - + + + + + Address - + + + + + Designation - + + + + + Phone No. - + + + + + E-mail Address - + + + + + From be542630e88d834cc20401cafda990f2a47a9ba7 Mon Sep 17 00:00:00 2001 From: "Rakesh Sindhav (OpenERP)" Date: Wed, 23 Apr 2014 12:27:55 +0530 Subject: [PATCH 10/31] [IMP]: Code optimization in the view file bzr revid: rsi@tinyerp.com-20140423065755-83tyantoitle2ow4 --- .../report_hr_salary_employee_bymonth.py | 4 +- .../views/report_hrsalarybymonth.xml | 38 ++++--------------- 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py b/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py index 6d29bd82efc..8873f6e2465 100644 --- a/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py +++ b/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py @@ -81,7 +81,7 @@ class report_hr_salary_employee_bymonth(report_sxw.rml_parse): sal = self.cr.fetchall() salary = dict(sal) total = 0.0 - cnt = 1 + cnt = 0 for month in self.mnths: if month <> '': @@ -102,7 +102,7 @@ class report_hr_salary_employee_bymonth(report_sxw.rml_parse): def get_employee(self, form): emp_salary = [] salary_list = [] - total_mnths=['Total', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + total_mnths=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] emp_obj = self.pool.get('hr.employee') emp_ids = form.get('employee_ids', []) employees = emp_obj.browse(self.cr, self.uid, emp_ids, context=self.context) diff --git a/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml index a2e3de1ef32..18a81412e26 100644 --- a/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml +++ b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml @@ -14,18 +14,9 @@ Name - - - - - - - - - - - - + + + Total @@ -34,18 +25,9 @@ - - - - - - - - - - - - + + + @@ -53,13 +35,9 @@ + Total - - Total - - - - + From f15123df698df890916a880ac6b5e10e7e73a045 Mon Sep 17 00:00:00 2001 From: Sunil Sharma Date: Wed, 23 Apr 2014 15:23:39 +0530 Subject: [PATCH 11/31] [imp]:improve code firsr first call layout then foreach loop bzr revid: ssh@tinyerp.com-20140423095339-lkswkyqyhw1cm6oj --- .../view/report_hr_yearly_salary_detail.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml index fc7a2fd4b9f..8a82db03497 100644 --- a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml @@ -3,9 +3,9 @@ From 7932140dd1ac195ccb371de79409bea5a35b47a4 Mon Sep 17 00:00:00 2001 From: "Rakesh Sindhav (OpenERP)" Date: Wed, 23 Apr 2014 19:00:32 +0530 Subject: [PATCH 12/31] [IMP]: convert rml to qweb report of Payslip Details bzr revid: rsi@tinyerp.com-20140423133032-l1wxnoyytdakdnpx --- addons/l10n_in_hr_payroll/__openerp__.py | 1 + .../l10n_in_hr_payroll_report.xml | 8 +- .../report/report_payslip_details.py | 7 +- .../report/report_payslip_details.rml | 372 ------------------ 4 files changed, 11 insertions(+), 377 deletions(-) delete mode 100644 addons/l10n_in_hr_payroll/report/report_payslip_details.rml diff --git a/addons/l10n_in_hr_payroll/__openerp__.py b/addons/l10n_in_hr_payroll/__openerp__.py index 2522d543548..adccb9cabd4 100644 --- a/addons/l10n_in_hr_payroll/__openerp__.py +++ b/addons/l10n_in_hr_payroll/__openerp__.py @@ -49,6 +49,7 @@ Indian Payroll Salary Rules. 'security/ir.model.access.csv', 'l10n_in_hr_payroll_report.xml', 'l10n_in_hr_payroll_sequence.xml', + 'views/report_payslipdetails.xml', 'wizard/hr_salary_employee_bymonth_view.xml', 'wizard/hr_yearly_salary_detail_view.xml', 'report/payment_advice_report_view.xml', diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml index 7f27291051f..077bf5debf8 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml @@ -3,12 +3,12 @@ + string="PaySlip Details" + report_type="qweb-pdf" + name="l10n_in_hr_payroll.report_payslipdetails" + file="l10n_in_hr_payroll.report_payslipdetails" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[repeatIn(objects,'o')]] - - - - Pay Slip Details - - - - - [[o.credit_note==False and removeParentNode('para')]] - Credit - - Note - - ([[o.name or removeParentNode('para')]]) - - - - Name - - - [[o.employee_id.name]] - - - Designation - - - [[ o.employee_id.job_id.name or '' ]] - - - - - - - - Address - - - - [[o.employee_id.address_home_id and o.employee_id.address_home_id.name or '' ]],[[o.employee_id.address_home_id and display_address(o.employee_id.address_home_id)]] - - - - - - - Email - - - [[ o.employee_id.work_email or '' ]] - - - - Identification No - - - - [[ o.employee_id.identification_id or '' ]] - - - - - - - Reference - - - [[ o.number or '' ]] - - - Bank Account - - - [[ o.employee_id.otherid or '' ]] - - - - - - - Date From - - - [[ o.date_from or '']] - - - - Date To - - - - [[ o.date_to or '' ]] - - - - - - - - - - - - - - Details by Salary Rule Category: - - - - - - - Code - - - Salary Rule Category - - - Total - - - - - - -
- [[repeatIn(get_details_by_rule_category(o.details_by_salary_rule_category),'h') ]] - - - - - [[ h['code'] ]] - [[ h['level']!=0 and ( setTag('para','para',{'style':'terp_default_8'})) or removeParentNode('font')]] - - - - [[ '..'*h['level'] ]][[ h['rule_category'] ]][[ h['level']!=0 and ( setTag('para','para',{'style':'terp_default_8'})) or removeParentNode('font') ]] - - - [[ formatLang(h['total'], currency_obj = o.company_id and o.company_id.currency_id)]] [[ h['level']==0 and ( setTag('para','para',{'style':'terp_default_10'})) or removeParentNode('font') ]] - - - -
- - - - - - - - - - - - - - - - - - - - - - Authorized Signature - - - - - - -
-
- From c43d5235a5fe514038c2f04219281327da11fd75 Mon Sep 17 00:00:00 2001 From: "Rakesh Sindhav (OpenERP)" Date: Wed, 23 Apr 2014 19:04:03 +0530 Subject: [PATCH 13/31] [ADD]: add the view file of Payslip Details bzr revid: rsi@tinyerp.com-20140423133403-60ukgyi8uy4j6g4k --- .../views/report_payslipdetails.xml | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 addons/l10n_in_hr_payroll/views/report_payslipdetails.xml diff --git a/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml b/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml new file mode 100644 index 00000000000..0db3e17c7ee --- /dev/null +++ b/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml @@ -0,0 +1,93 @@ + + + + + + \ No newline at end of file From 2c042b1824e0a38f561621ac1333c7281476e073 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Wed, 23 Apr 2014 21:37:40 +0530 Subject: [PATCH 14/31] [IMP]: Renamed wrapped class bzr revid: atp@tinyerp.com-20140423160740-qnz5k1bnjyybgk9v --- .../report/report_hr_salary_employee_bymonth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py b/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py index 8873f6e2465..31ea9cb4b3c 100644 --- a/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py +++ b/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py @@ -128,10 +128,10 @@ class report_hr_salary_employee_bymonth(report_sxw.rml_parse): self.total += item[count] return self.total -class employee_salary_bymonth(osv.AbstractModel): +class wrapped_report_employee_salary_bymonth(osv.AbstractModel): _name = 'report.l10n_in_hr_payroll.report_hrsalarybymonth' _inherit = 'report.abstract_report' _template = 'l10n_in_hr_payroll.report_hrsalarybymonth' _wrapped_report_class = report_hr_salary_employee_bymonth -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 3446fe069547e2a07e8896abeedb238e8bf3d8df Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Thu, 24 Apr 2014 00:02:41 +0530 Subject: [PATCH 15/31] [IMP]: Improve bootstrap class with span element. bzr revid: atp@tinyerp.com-20140423183241-8c7442xgroxoik0s --- .../views/report_hrsalarybymonth.xml | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml index 18a81412e26..57fadad5865 100644 --- a/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml +++ b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml @@ -6,8 +6,10 @@
-

Yearly Salary Details

-
From To of Category
+

Yearly Salary Details

+

+ From To of Category +

@@ -15,7 +17,9 @@ - @@ -24,22 +28,26 @@ - - - - + - + @@ -49,4 +57,4 @@ - \ No newline at end of file + From 45e74261e4d8f961373c8d68514bc9e37e0f1d5d Mon Sep 17 00:00:00 2001 From: Sunil Sharma Date: Thu, 24 Apr 2014 10:17:56 +0530 Subject: [PATCH 16/31] [imp]:improve use a text-center class bzr revid: ssh@tinyerp.com-20140424044756-ls3g2mour8rmjtes --- .../view/report_hr_yearly_salary_detail.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml index 8a82db03497..bf64d028430 100644 --- a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml @@ -6,11 +6,11 @@
-
-
From +
+
From To -
+

Name + + + Total
+ + + + + + +
TotalTotal
From c61a1b679e9a575ca8e2e510edb2704accdd1fc8 Mon Sep 17 00:00:00 2001 From: "Rakesh Sindhav (OpenERP)" Date: Thu, 24 Apr 2014 10:51:18 +0530 Subject: [PATCH 17/31] [IMP]: Add the padding to the child level bzr revid: rsi@tinyerp.com-20140424052118-y92vvkbam7cwlklj --- addons/l10n_in_hr_payroll/views/report_payslipdetails.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml b/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml index 0db3e17c7ee..4d59b5b4178 100644 --- a/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml +++ b/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml @@ -74,7 +74,7 @@ + From 1c1d9eee500a79b6db699e4fee39bbc629a6f9a7 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Fri, 25 Apr 2014 22:00:22 +0530 Subject: [PATCH 27/31] [ADD]: Add payroll advice report bzr revid: atp@tinyerp.com-20140425163022-q4fw9zcx0f7n35ox --- addons/l10n_in_hr_payroll/__openerp__.py | 2 +- .../l10n_in_hr_payroll_report.xml | 6 +- .../report/report_payroll_advice.py | 6 +- .../report/report_payroll_advice.rml | 425 ------------------ .../views/report_payrolladvice.xml | 92 ++++ 5 files changed, 101 insertions(+), 430 deletions(-) delete mode 100644 addons/l10n_in_hr_payroll/report/report_payroll_advice.rml create mode 100644 addons/l10n_in_hr_payroll/views/report_payrolladvice.xml diff --git a/addons/l10n_in_hr_payroll/__openerp__.py b/addons/l10n_in_hr_payroll/__openerp__.py index 122ff26243c..eb6b8d4165a 100644 --- a/addons/l10n_in_hr_payroll/__openerp__.py +++ b/addons/l10n_in_hr_payroll/__openerp__.py @@ -56,7 +56,7 @@ Indian Payroll Salary Rules. 'report/payment_advice_report_view.xml', 'report/payslip_report_view.xml', 'views/report_hr_yearly_salary_detail.xml', - + 'views/report_payrolladvice.xml', ], 'test': [ 'test/payment_advice.yml', diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml index 3e1e8e529c5..b6c04794e8a 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml @@ -14,9 +14,9 @@ auto="False" id="payroll_advice" model="hr.payroll.advice" - name="payroll.advice" - rml="l10n_in_hr_payroll/report/report_payroll_advice.rml" - string="Print Advice" /> + report_type="qweb-pdf" + name="l10n_in_hr_payroll.report_payrolladvice" + file="l10n_in_hr_payroll.report_payrolladvice"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[repeatIn(objects,'o')]] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ o.neft == True and removeParentNode('blockTable') ]] - - - - - - - - -
- [[ repeatIn(get_detail(o.line_ids),'line') ]] - [[ o.neft == True and removeParentNode('blockTable') ]] -
- - - - - - - - - [[ o.neft != True and removeParentNode('blockTable') ]] - - - - - - - - - -
- [[ repeatIn(get_detail(o.line_ids),'line') ]] - [[ o.neft !=True and removeParentNode('blockTable') ]] -
- - - - - - - - - - [[ o.neft == True and removeParentNode('blockTable') ]] - - - - - - - - - [[ o.neft !=True and removeParentNode('blockTable') ]] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/addons/l10n_in_hr_payroll/views/report_payrolladvice.xml b/addons/l10n_in_hr_payroll/views/report_payrolladvice.xml new file mode 100644 index 00000000000..03bb91f567d --- /dev/null +++ b/addons/l10n_in_hr_payroll/views/report_payrolladvice.xml @@ -0,0 +1,92 @@ + + + + + + \ No newline at end of file From 105331f12a19fba7561f84bd64f8d7d2a2a0f08d Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Fri, 25 Apr 2014 22:35:24 +0530 Subject: [PATCH 28/31] [FIX]: import osv file in report file. add stringin reportxml file bzr revid: atp@tinyerp.com-20140425170524-fev2rr0uhycalp9h --- addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml | 3 ++- addons/l10n_in_hr_payroll/report/report_payroll_advice.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml index b6c04794e8a..9cf41633d50 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml @@ -11,9 +11,10 @@ file="l10n_in_hr_payroll.report_payslipdetails" /> diff --git a/addons/l10n_in_hr_payroll/report/report_payroll_advice.py b/addons/l10n_in_hr_payroll/report/report_payroll_advice.py index c2efe496387..41f4b5880d3 100644 --- a/addons/l10n_in_hr_payroll/report/report_payroll_advice.py +++ b/addons/l10n_in_hr_payroll/report/report_payroll_advice.py @@ -23,7 +23,7 @@ import time from datetime import datetime - +from openerp.osv import osv from openerp.report import report_sxw from openerp.tools import amount_to_text_en From ae858f4d68fa74629b2eff810c1c75754f4f2cb1 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Fri, 25 Apr 2014 23:22:30 +0530 Subject: [PATCH 29/31] [IMP]: Rename report name report_hryearly salary bzr revid: atp@tinyerp.com-20140425175230-sctyfvvn87c6exm9 --- addons/l10n_in_hr_payroll/__openerp__.py | 2 +- .../l10n_in_hr_payroll_report.xml | 4 +- .../report/report_hr_yearly_salary_detail.py | 4 +- ...y_detail.xml => report_hryearlysalary.xml} | 73 +++++++++---------- .../wizard/hr_yearly_salary_detail.py | 2 +- 5 files changed, 42 insertions(+), 43 deletions(-) rename addons/l10n_in_hr_payroll/views/{report_hr_yearly_salary_detail.xml => report_hryearlysalary.xml} (63%) diff --git a/addons/l10n_in_hr_payroll/__openerp__.py b/addons/l10n_in_hr_payroll/__openerp__.py index eb6b8d4165a..c56417fbce4 100644 --- a/addons/l10n_in_hr_payroll/__openerp__.py +++ b/addons/l10n_in_hr_payroll/__openerp__.py @@ -55,7 +55,7 @@ Indian Payroll Salary Rules. 'wizard/hr_yearly_salary_detail_view.xml', 'report/payment_advice_report_view.xml', 'report/payslip_report_view.xml', - 'views/report_hr_yearly_salary_detail.xml', + 'views/report_hryearlysalary.xml', 'views/report_payrolladvice.xml', ], 'test': [ diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml index 9cf41633d50..427e9111017 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml @@ -31,8 +31,8 @@ auto="False" id="yearly_salary" model="yearly.salary.detail" - name="l10n_in_hr_payroll.report_hr_yearly_salary" - file="l10n_in_hr_payroll.report_hr_yearly_salary" + name="l10n_in_hr_payroll.report_hryearlysalary" + file="l10n_in_hr_payroll.report_hryearlysalary" report_type="qweb-pdf" string="Yearly Salary by Employee" /> diff --git a/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py b/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py index e531a335e7c..e396e611a3f 100644 --- a/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py +++ b/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py @@ -161,9 +161,9 @@ class employees_yearly_salary_report(report_sxw.rml_parse): return self.total class wrapped_report_payslip(osv.AbstractModel): - _name = 'report.l10n_in_hr_payroll.report_hr_yearly_salary' + _name = 'report.l10n_in_hr_payroll.report_hryearlysalary' _inherit = 'report.abstract_report' - _template = 'l10n_in_hr_payroll.report_hr_yearly_salary' + _template = 'l10n_in_hr_payroll.report_hryearlysalary' _wrapped_report_class = employees_yearly_salary_report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/views/report_hryearlysalary.xml similarity index 63% rename from addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml rename to addons/l10n_in_hr_payroll/views/report_hryearlysalary.xml index bf9de12125e..189dfd29e5a 100644 --- a/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/views/report_hryearlysalary.xml @@ -1,7 +1,7 @@ -
- + From ad71e6b87c3d841f761a65014dfc469e6bd09e4f Mon Sep 17 00:00:00 2001 From: Sunil Sharma Date: Thu, 24 Apr 2014 14:14:02 +0530 Subject: [PATCH 18/31] [imp]:improve th tag to td tag bzr revid: ssh@tinyerp.com-20140424084402-gam7edp04qvyj7gu --- .../view/report_hr_yearly_salary_detail.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml index bf64d028430..13383817889 100644 --- a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml @@ -14,20 +14,20 @@
- + - + - + - - + - - + + - - + + + + + + - - - - + + - + - + + + + - + +
Employee CodeEmployee Code DepartmentDepartment BankBank From 2949a395ba7960e8ec7c4aff9c9239b1895bd396 Mon Sep 17 00:00:00 2001 From: "Rakesh Sindhav (OpenERP)" Date: Thu, 24 Apr 2014 15:31:50 +0530 Subject: [PATCH 19/31] [IMP]: set the header to left side bzr revid: rsi@tinyerp.com-20140424100150-0as1tmhipxo8tfdn --- .../l10n_in_hr_payroll/views/report_payslipdetails.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml b/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml index 4d59b5b4178..426a71de1ee 100644 --- a/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml +++ b/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml @@ -6,8 +6,8 @@
-

Pay Slip Details

-
()
+

Pay Slip Details

+

@@ -43,7 +43,7 @@
-

Details by Salary Rule Category:
+

Details by Salary Rule Category

@@ -54,7 +54,6 @@ -
@@ -84,6 +83,8 @@
+ +

Authorized signature

From e5c1bf06a2ac350adf42eecfb3505d5633a5c319 Mon Sep 17 00:00:00 2001 From: Sunil Sharma Date: Thu, 24 Apr 2014 16:20:05 +0530 Subject: [PATCH 20/31] [imp]:remove br or text-center class then improve h2 or p tag bzr revid: ssh@tinyerp.com-20140424105005-bcg7ynx571h25w3w --- .../view/report_hr_yearly_salary_detail.xml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml index 13383817889..cc827bd6555 100644 --- a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml @@ -6,12 +6,10 @@
-
-
From +

+

From - To -

-
+ To

From 1e81e20cca31baffc487c32cb0f677888f2c260c Mon Sep 17 00:00:00 2001 From: "Sunil Sharma (OpenERP)" Date: Thu, 24 Apr 2014 17:32:02 +0530 Subject: [PATCH 21/31] [IMP]: Change function condition. bzr revid: atp@tinyerp.com-20140424120202-jqbkr72y1a43dbpf --- .../view/report_hr_yearly_salary_detail.xml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml index cc827bd6555..ce148d5fbf9 100644 --- a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml @@ -10,7 +10,7 @@

From To

-
Employee Code
+
-
Employee Code @@ -18,7 +18,6 @@ Department @@ -73,7 +72,7 @@
- + @@ -88,7 +87,6 @@ - From e2aa0707bb075052b0dfa6b843885e73d9fe6692 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Fri, 25 Apr 2014 09:46:41 +0530 Subject: [PATCH 22/31] [FIX]: ADD formatLang function in date field. use h2 tag in report title. bzr revid: atp@tinyerp.com-20140425041641-vk95pdxb8w3034ij --- .../views/report_hr_yearly_salary_detail.xml | 8 +++----- .../l10n_in_hr_payroll/views/report_hrsalarybymonth.xml | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml index ce148d5fbf9..91d93c3b73f 100644 --- a/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml @@ -8,8 +8,8 @@

From - - To

+ + To

Total
Allowances with Basic:
@@ -102,8 +102,7 @@ - - + @@ -111,7 +110,6 @@ -
Employee Code
Deductions:
diff --git a/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml index 57fadad5865..2f1f2ac8a9d 100644 --- a/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml +++ b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml @@ -6,8 +6,8 @@
-

Yearly Salary Details

-

+

Yearly Salary Details

+

From To of Category

From be912b1d4622e541a6043c8ddf6dd4cabe3cd086 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Fri, 25 Apr 2014 09:51:48 +0530 Subject: [PATCH 23/31] [FIX]: Add qweb xml into openerp.py file bzr revid: atp@tinyerp.com-20140425042148-jkldr55vvxfrxnmy --- addons/l10n_in_hr_payroll/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_in_hr_payroll/__openerp__.py b/addons/l10n_in_hr_payroll/__openerp__.py index 61c4e11edaa..122ff26243c 100644 --- a/addons/l10n_in_hr_payroll/__openerp__.py +++ b/addons/l10n_in_hr_payroll/__openerp__.py @@ -55,7 +55,7 @@ Indian Payroll Salary Rules. 'wizard/hr_yearly_salary_detail_view.xml', 'report/payment_advice_report_view.xml', 'report/payslip_report_view.xml', - 'view/report_hr_yearly_salary_detail.xml', + 'views/report_hr_yearly_salary_detail.xml', ], 'test': [ From 1fadb254d5cd404996e11a8abc249b32a8e3bc98 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Fri, 25 Apr 2014 13:07:19 +0530 Subject: [PATCH 24/31] [FIX]: Fix months count in yearly salary details bzr revid: atp@tinyerp.com-20140425073719-7nlk18wuoxx3s39o --- .../views/report_hr_yearly_salary_detail.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml index 91d93c3b73f..c231587ab77 100644 --- a/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml @@ -3,9 +3,9 @@ From 18de18a29e37f084c000206e138aaeddf9bc62ac Mon Sep 17 00:00:00 2001 From: Sunil Sharma Date: Fri, 25 Apr 2014 18:34:57 +0530 Subject: [PATCH 25/31] [imp]:improve hr yearly salary detail tbody code bzr revid: ssh@tinyerp.com-20140425130457-rh9fxo703956eyqx --- .../views/report_hr_yearly_salary_detail.xml | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml index c231587ab77..4c7f41c3bde 100644 --- a/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml @@ -87,30 +87,35 @@
Total
Allowances with Basic:
Deductions:
From d75153f990f45ef6639637139bccef77a4a8a7ce Mon Sep 17 00:00:00 2001 From: Sunil Sharma Date: Fri, 25 Apr 2014 18:39:34 +0530 Subject: [PATCH 26/31] [imp]:improve title for allowances with basic bzr revid: ssh@tinyerp.com-20140425130934-y3oho46frq1ss4p4 --- .../l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml index 4c7f41c3bde..bf9de12125e 100644 --- a/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml @@ -88,6 +88,7 @@
Allowances with Basic:
- [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]] - - - - - - - - -
- To, - The Manager - - - - -
- [[ o.bank_id.name ]] Bank - - - - -
- - - - Dear Sir/Madam, - - - - -
- Payment Advice from [[ o.name ]] A/C no. [[ o.company_id.bank_ids and o.company_id.bank_ids[0].acc_number ]] form period [[ get_month(o.date)['from_name'] ]] to [[ get_month(o.date)['to_name'] ]] -
- [[ o.note ]] -
- SI. No. - - Name of the Employe - - Bank Account No. - - By Salary - - C/D -
- - . - - - - [[ line['name'] ]] - - [[ line['acc_no'] ]] - - [[formatLang(line['bysal'], currency_obj = company.currency_id) ]] - - [[ line['debit_credit'] ]] -
- SI. No. - - Name of the Employe - - Bank Account No. - - IFSC Code - - By Salary - - C/D -
- - . - - - [[ line['name'] ]] - - [[ line['acc_no'] ]] - - [[ line['ifsc_code'] ]] - - [[formatLang(line['bysal'], currency_obj = company.currency_id) ]] - - [[ line['debit_credit'] ]] -
- - - - - - - - - Total : [[ o.line_ids==[] and removeParentNode('para') ]] - - - [[ o.line_ids==[] and removeParentNode('para') ]][[ formatLang(get_bysal_total(), currency_obj = company.currency_id) ]] - - - - -
- - - - - - - - - Total : [[ o.line_ids==[] and removeParentNode('para') ]] - - - [[ o.line_ids==[] and removeParentNode('para') ]][[ formatLang(get_bysal_total(), currency_obj = company.currency_id) ]] - - - - -
- Yours Sincerely - - - - -
- For [[ company.name ]] - - - - -
- - - - - - - -
- - - - - - - -
- Authorized Signature - - - - -