From ded63ab87a17f5de2c098092147345ae80b4b16b Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Mon, 18 Oct 2010 13:03:00 +0530 Subject: [PATCH 01/78] [IMP]:lunch:improved lunch order bzr revid: apa@tinyerp.com-20101018073300-z9dy97lvf37501jk --- addons/lunch/report/order.py | 7 +++- addons/lunch/report/order.rml | 76 +++++++++++++++++++++-------------- 2 files changed, 52 insertions(+), 31 deletions(-) diff --git a/addons/lunch/report/order.py b/addons/lunch/report/order.py index 29c9d381745..11ca7f79dbc 100644 --- a/addons/lunch/report/order.py +++ b/addons/lunch/report/order.py @@ -41,8 +41,12 @@ class order(report_sxw.rml_parse): total=0.0 for line in lines: total+=line.price + self.net_total+=total return total + def get_nettotal(self): + return self.net_total + def get_users(self, objects): users=[] for obj in objects: @@ -52,12 +56,13 @@ class order(report_sxw.rml_parse): def __init__(self, cr, uid, name, context): super(order, self).__init__(cr, uid, name, context) - + self.net_total=0.0 self.localcontext.update({ 'time': time, 'get_lines': self.get_lines, 'get_users': self.get_users, 'get_total': self.get_total, + 'get_nettotal': self.get_nettotal, }) report_sxw.report_sxw('report.lunch.order', 'lunch.order', diff --git a/addons/lunch/report/order.rml b/addons/lunch/report/order.rml index d47816abd9c..ba66dcddb03 100644 --- a/addons/lunch/report/order.rml +++ b/addons/lunch/report/order.rml @@ -14,25 +14,28 @@ - + - - + + + + + + - - + @@ -63,9 +66,14 @@ + + + + + @@ -84,16 +92,10 @@ Lunch Order - -
- [[repeatIn(get_users(objects),'o')]] - + - Name - - - Date + Name/Date Order @@ -107,28 +109,43 @@
- [[ repeatIn(get_lines(o,objects),'lines') ]] - + [[repeatIn(get_users(objects),'o')]] + - [[ (lines.user_id and lines.user_id.name) or '']] + [[ o.name ]] - [[ formatLang(lines.date,date='True') ]] + + + - [[ (lines.product and lines.product.name) or '' ]] - - - [[ lines.descript]] - - - [[ lines.price ]] [[ (o.company_id and o.company_id.currency_id and o.company_id.currency_id.symbol) or '' ]] + [[ formatLang(get_total(o,objects)) ]] [[ (o.company_id and o.company_id.currency_id and o.company_id.currency_id.symbol) or '' ]] +
+ [[ repeatIn(get_lines(o,objects),'lines') ]] + + + + [[ formatLang(lines.date,date='True') ]] + + + [[ (lines.product and lines.product.name) or '' ]] + + + [[ lines.descript]] + + + [[ lines.price ]] [[ (o.company_id and o.company_id.currency_id and o.company_id.currency_id.symbol) or '' ]] + + + +
- + @@ -136,16 +153,15 @@ - Total: + Total : - [[ formatLang(get_total(o,objects)) ]] [[ (o.company_id and o.company_id.currency_id and o.company_id.currency_id.symbol) or '' ]] + [[ formatLang(get_nettotal()) ]] [[ (o.company_id and o.company_id.currency_id and o.company_id.currency_id.symbol) or '' ]] - + -
- + \ No newline at end of file From bcb28bba174d93a47485c4a40c194399a14b4351 Mon Sep 17 00:00:00 2001 From: saz-OpenERP Date: Mon, 18 Oct 2010 13:07:48 +0530 Subject: [PATCH 02/78] [IMP]:mrp:Improves the graph view of futureload on workcenter in Production dashboard bzr revid: azaz.201186@gmail.com-20101018073748-ozojp5g0e6t4iq3l --- addons/mrp/report/mrp_report.py | 4 ++-- addons/mrp/report/mrp_report_view.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/mrp/report/mrp_report.py b/addons/mrp/report/mrp_report.py index d677184586e..68487527966 100644 --- a/addons/mrp/report/mrp_report.py +++ b/addons/mrp/report/mrp_report.py @@ -39,7 +39,7 @@ class report_workcenter_load(osv.osv): create or replace view report_workcenter_load as ( SELECT min(wl.id) as id, - to_char(p.date_planned,'YYYY:IW') as name, + to_char(p.date_planned,'YYYY:mm:dd') as name, SUM(wl.hour) AS hour, SUM(wl.cycle) AS cycle, wl.workcenter_id as workcenter_id @@ -49,7 +49,7 @@ class report_workcenter_load(osv.osv): ON p.id = wl.production_id GROUP BY wl.workcenter_id, - to_char(p.date_planned,'YYYY:IW') + to_char(p.date_planned,'YYYY:mm:dd') )""") report_workcenter_load() diff --git a/addons/mrp/report/mrp_report_view.xml b/addons/mrp/report/mrp_report_view.xml index db628eb5431..aee3578a632 100644 --- a/addons/mrp/report/mrp_report_view.xml +++ b/addons/mrp/report/mrp_report_view.xml @@ -22,7 +22,7 @@ graph - + From 7fcb24882557563a7122eb60364d8dbfe0f0754c Mon Sep 17 00:00:00 2001 From: vro Date: Mon, 18 Oct 2010 16:21:15 +0530 Subject: [PATCH 03/78] [Added graph views in Admin Dashboard] bzr revid: vro@tinyerp.com-20101018105115-rl9v3iaixl2yn01l --- addons/board/board.py | 8 ++ addons/board/board_administration_view.xml | 105 ++++++++++++++++++++- 2 files changed, 112 insertions(+), 1 deletion(-) diff --git a/addons/board/board.py b/addons/board/board.py index 230954d942b..9cc660181ab 100644 --- a/addons/board/board.py +++ b/addons/board/board.py @@ -223,4 +223,12 @@ class board_note(osv.osv): board_note() +class temp_log(osv.osv_memory): + _inherit = 'res.log' + _description = 'Temporary Log' + _columns = {'count': fields.integer("Count")} + _defaults = {'count': lambda *a: True} + +temp_log() + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board/board_administration_view.xml b/addons/board/board_administration_view.xml index 86222cbad43..cf031f8641b 100644 --- a/addons/board/board_administration_view.xml +++ b/addons/board/board_administration_view.xml @@ -50,8 +50,111 @@ form - + + + + + + board.res.log.graph + res.log + graph + + + + + + + + + board.res.log.tree + res.log + tree + + + + + + + + + Monthly Activity per Document + res.log + form + graph,tree + + + + + tree + + + + + + graph + + + + + + + board.weekly.res.log.graph + res.log + graph + + + + + + + + + board.weekly.res.log.tree + res.log + tree + + + + + + + + + Weekly Global Activity + res.log + form + graph,tree + + + + + tree + + + + + + graph + + + + + + board.admin.graphs.form + board.board + form + + + + + + + + + + From 9724d2f09f379961b484b85a595cd951f2f56ea2 Mon Sep 17 00:00:00 2001 From: rch Date: Mon, 18 Oct 2010 17:12:15 +0530 Subject: [PATCH 04/78] [IMP]: Fix Menu problem. bzr revid: rch@rch-desktop-20101018114215-rsem6t2hx3es7uzs --- addons/board/board_administration_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/board/board_administration_view.xml b/addons/board/board_administration_view.xml index cf031f8641b..9c30e02ca9c 100644 --- a/addons/board/board_administration_view.xml +++ b/addons/board/board_administration_view.xml @@ -50,9 +50,9 @@ form - - + From e14dc253faa27be1ac39c6524cb9f895b61a35b5 Mon Sep 17 00:00:00 2001 From: saz-OpenERP Date: Tue, 19 Oct 2010 11:17:54 +0530 Subject: [PATCH 05/78] [IMP]:account:Improves the account vat declaration report bzr revid: azaz.201186@gmail.com-20101019054754-ihta11qh64sxbtk7 --- addons/account/report/account_tax_report.py | 13 +- addons/account/report/account_tax_report.rml | 257 ++++++++++++------- addons/account/wizard/account_vat.py | 3 +- addons/account/wizard/account_vat_view.xml | 9 +- 4 files changed, 179 insertions(+), 103 deletions(-) diff --git a/addons/account/report/account_tax_report.py b/addons/account/report/account_tax_report.py index d968ee9029e..c245e735d65 100644 --- a/addons/account/report/account_tax_report.py +++ b/addons/account/report/account_tax_report.py @@ -24,13 +24,15 @@ import copy import rml_parse from report import report_sxw +from common_report_header import common_report_header -class tax_report(rml_parse.rml_parse): +class tax_report(rml_parse.rml_parse, common_report_header): _name = 'report.account.vat.declaration' def __init__(self, cr, uid, name, context={}): super(tax_report, self).__init__(cr, uid, name, context=context) self.localcontext.update({ 'time': time, + 'get_account': self._get_account, 'get_period': self._get_period, 'get_codes': self._get_codes, 'get_general': self._get_general, @@ -41,9 +43,16 @@ class tax_report(rml_parse.rml_parse): }) + +# def _get_account(self, form): +# if data['model']=='account.account': +# return self.pool.get('account.account').browse(self.cr, self.uid, data['form']['id']).company_id.name +# return super(tax_report ,self)._get_account(form) + + def get_years(self,form): res={} - fiscal_year_name = self.pool.get('account.fiscalyear').name_get(self.cr,self.uid,form['fiscalyear']) + fiscal_year_name = self.pool.get('account.fiscalyear').name_get(self.cr,self.uid,form['fiscalyear_id']) if fiscal_year_name: res['fname'] = fiscal_year_name[0][1] diff --git a/addons/account/report/account_tax_report.rml b/addons/account/report/account_tax_report.rml index 47df92cc3bc..52f19147ef2 100644 --- a/addons/account/report/account_tax_report.rml +++ b/addons/account/report/account_tax_report.rml @@ -2,34 +2,7 @@ @@ -37,97 +10,191 @@
+ + + + - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + - + - - + + + + + + + + + + + + + + + + + + + + + + + - Tax Statement - - + + + + - Year : [[ get_years(data['form'])['fname'] ]] - - - Periods : [[ get_years(data['form'])['periods'] or removeParentNode('tr')]] + + Tax Report + - - - - Tax Name - Debit - Credit - Tax Amount - - - [[ repeatIn(get_lines(data['form']['based_on'],data['form']['periods'],data['form']['company_id']), 'o') ]][[ (o['level']) ]] [[ (len(o['level'])<5 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ o['code'] ]] [[ o['name'] ]] - [[ len(o['level'])<5 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]][[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['debit']) ]][[ o['type']<>'view' and removeParentNode('font') ]][[ formatLang(o['debit']) ]] - [[ len(o['level'])<5 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]][[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['credit']) ]][[ o['type']<>'view' and removeParentNode('font') ]][[ formatLang(o['credit'])]] - [[ len(o['level'])<5 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]][[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['tax_amount']) ]] [[ company.currency_id.symbol ]][[ o['type']<>'view' and removeParentNode('font') ]][[ formatLang(o['tax_amount']) ]] [[ company.currency_id.symbol ]] - - + + + + + + + Chart of Account + + + Compute Method + + + Periods + + + Printing Date + + + + + + + [[ get_account(data) or removeParentNode('para') ]] + + + [[data['form']['based_on'] ]] + + + [[ get_years(data['form'])['periods'] or removeParentNode('para')]] + + + [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]] at [[ time.strftime('%H:%M:%S')]] + + + + + + + + + + + + + Tax Name + + + Debit + + + Credit + + + Tax Amount + + + + + + +
+ [[ repeatIn(get_lines(data['form']['based_on'],data['form']['periods'],data['form']['company_id']), 'o') ]] + + + + [[ '...'*len(o['level']) ]] [[o['type']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))]] [[ o['code'] ]] [[ o['name'] ]] + + + [[ len(o['level'])==2 and setTag('para','para',{'fontName':"Helvetica-Bold"}) ]] [[ formatLang(o['debit']) ]] + + + [[ len(o['level'])==2 and setTag('para','para',{'fontName':"Helvetica-Bold"}) ]] [[ formatLang(o['credit'])]] + + + [[ len(o['level'])==2 and setTag('para','para',{'fontName':"Helvetica-Bold"}) ]] [[ formatLang(o['tax_amount']) ]] + + + + + + +
+ + +
diff --git a/addons/account/wizard/account_vat.py b/addons/account/wizard/account_vat.py index 0c33517d428..10868c9dfb6 100644 --- a/addons/account/wizard/account_vat.py +++ b/addons/account/wizard/account_vat.py @@ -26,12 +26,13 @@ class account_vat_declaration(osv.osv_memory): _description = 'Account Vat Declaration' _inherit = "account.common.account.report" _columns = { + 'chart_account_id': fields.many2one('account.account', 'Chart of account', help='Select Charts of Accounts', required=True, domain = [('parent_id','=',False)]), 'based_on': fields.selection([('invoices','Invoices'), ('payments','Payments'),], 'Based On', required=True), 'company_id': fields.many2one('res.company', 'Company', required=True), 'periods': fields.many2many('account.period', 'vat_period_rel', 'vat_id', 'period_id', 'Periods', help="All periods if empty"), - 'fiscalyear': fields.many2many('account.fiscalyear','vat_fiscal_rel','fiscal_id','Fiscal Year',required=True), + 'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal year', help='Keep empty for all open fiscal year'), } def _get_company(self, cr, uid, context={}): diff --git a/addons/account/wizard/account_vat_view.xml b/addons/account/wizard/account_vat_view.xml index 41c0faa2c79..704a2ac7529 100644 --- a/addons/account/wizard/account_vat_view.xml +++ b/addons/account/wizard/account_vat_view.xml @@ -8,14 +8,13 @@ form
- - - + + + + - -