diff --git a/addons/account/report/general_ledger_landscape.py b/addons/account/report/general_ledger_landscape.py index 8fb70864e00..78d6e5bce4e 100755 --- a/addons/account/report/general_ledger_landscape.py +++ b/addons/account/report/general_ledger_landscape.py @@ -107,7 +107,7 @@ class general_ledger_landscape(rml_parse.rml_parse): return result def get_min_date(self,form): - + ## Get max born from account_fiscal year # sql = """ select min(fy.date_start) as start_date,max(fy.date_stop) as stop_date from account_fiscalyear @@ -122,9 +122,9 @@ class general_ledger_landscape(rml_parse.rml_parse): periods = form['periods'][0][2] if not periods: sql = """ - Select min(p.date_start) as start_date,max(p.date_stop) as stop_date from account_period as p where p.fiscalyear_id = """ + str(form['fiscalyear']) + """ + Select min(p.date_start) as start_date,max(p.date_stop) as stop_date from account_period as p where p.fiscalyear_id = """ + str(form['fiscalyear']) + """ """ - else: + else: periods_id = ','.join(map(str, periods)) sql = """ Select min(p.date_start) as start_date,max(p.date_stop) as stop_date from account_period as p where p.id in ( """ + periods_id + """) @@ -140,9 +140,9 @@ class general_ledger_landscape(rml_parse.rml_parse): periods = form['periods'][0][2] if not periods: sql = """ - Select min(p.date_start) as start_date,max(p.date_stop) as stop_date from account_period as p where p.fiscalyear_id = """ + str(form['fiscalyear']) + """ + Select min(p.date_start) as start_date,max(p.date_stop) as stop_date from account_period as p where p.fiscalyear_id = """ + str(form['fiscalyear']) + """ """ - else: + else: periods_id = ','.join(map(str, periods)) sql = """ Select min(p.date_start) as start_date,max(p.date_stop) as stop_date from account_period as p where p.id in ( """ + periods_id + """) @@ -162,7 +162,7 @@ class general_ledger_landscape(rml_parse.rml_parse): else : borne_max = date_max elif form['state'] == 'none': - + sql = """ SELECT min(date) as start_date,max(date) as stop_date FROM account_move_line """ self.cr.execute(sql) @@ -180,7 +180,7 @@ class general_ledger_landscape(rml_parse.rml_parse): def get_children_accounts(self, account, form): - + self.child_ids = self.pool.get('account.account').search(self.cr, self.uid, [('parent_id', 'child_of', self.ids)]) # @@ -225,7 +225,7 @@ class general_ledger_landscape(rml_parse.rml_parse): res.append(child_account) ## if not len(res): - + return [account] else: ## We will now compute solde initiaux @@ -250,7 +250,7 @@ class general_ledger_landscape(rml_parse.rml_parse): move.init_credit = 0 move.init_debit = 0 - + return res def lines(self, account, form): @@ -266,19 +266,19 @@ class general_ledger_landscape(rml_parse.rml_parse): else: sorttag = 'j.code' sql = """ - SELECT l.id, l.date, j.code,c.code AS currency_code,l.amount_currency,l.ref, l.name , l.debit, l.credit, l.period_id + SELECT l.id, l.date, j.code,c.code AS currency_code,l.amount_currency,l.ref, l.name , l.debit, l.credit, l.period_id FROM account_move_line as l - LEFT JOIN res_currency c on (l.currency_id=c.id) + LEFT JOIN res_currency c on (l.currency_id=c.id) JOIN account_journal j on (l.journal_id=j.id) AND account_id = %d - AND %s - WHERE l.date<='%s' - AND l.date>='%s' - ORDER by %s"""%(account.id,self.query,self.date_borne['max_date'],self.date_borne['min_date'],sorttag) - + AND %s + WHERE l.date<='%s' + AND l.date>='%s' + ORDER by %s"""%(account.id,self.query,self.date_borne['max_date'],self.date_borne['min_date'],sorttag) + self.cr.execute(sql) - - res = self.cr.dictfetchall() + + res = self.cr.dictfetchall() sum = 0.0 account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line') for l in res: @@ -293,7 +293,10 @@ class general_ledger_landscape(rml_parse.rml_parse): l['partner'] = line.partner_id.name else : l['partner'] = '' - sum += l['debit'] - l ['credit'] + + + sum = l['debit'] - l ['credit'] + c = time.strptime(l['date'],"%Y-%m-%d") l['date'] = time.strftime("%d-%m-%Y",c) l['progress'] = sum diff --git a/addons/crm_configuration/crm_claims_menu.xml b/addons/crm_configuration/crm_claims_menu.xml index 2918acbf1dc..6dab67767e9 100644 --- a/addons/crm_configuration/crm_claims_menu.xml +++ b/addons/crm_configuration/crm_claims_menu.xml @@ -1,190 +1,162 @@ - - - ######################## CLAIMS (menu) ########################### - - All Claims - crm.case - form - tree,calendar - - - - - - tree - - - - - - calendar - - - - - - form - - - - - - - - My Claims - crm.case - tree,form,calendar - - - - - - tree - - - - - - calendar - - - - - - form - - - - + + + ######################## CLAIMS (menu) ########################### + + All Claims + crm.case + form + tree,calendar + + + + + + tree + + + + + + calendar + + + + + + form + + + + + + + + My Claims + crm.case + tree,form,calendar + + + + + + tree + + + + + + calendar + + + + + + form + + + + - - Funds - crm.case - form - - - - - - form - - - - + + Claims + crm.case + form + + + + + + form + + + + - - My Unclosed Claims - crm.case - tree,calendar,form - - - - - - tree - - - - - - calendar - - - - - - form - - - - + + My Unclosed Claims + crm.case + tree,calendar,form + + + + + + tree + + + + + + calendar + + + + + + form + + + + - - My Cancelled Claims - crm.case - tree,calendar,form - - - - - - tree - - - - - - calendar - - - - - - form - - - - - - - + + My Open Claims + crm.case + tree,calendar,form + + + + + tree + + + + + + calendar + + + + + + form + + + + - - All Unclosed Claims - crm.case - tree,calendar,form - - - - - - tree - - - - - - calendar - - - - - - form - - - - + + - - All Cancelled Claims - crm.case - tree,calendar,form - - - - - - tree - - - - - - calendar - - - - - - form - - - - + + All Unclosed Claims + crm.case + tree,calendar,form + + + + + + tree + + + + + + calendar + + + + + + form + + + + - \ No newline at end of file + diff --git a/addons/crm_configuration/crm_claims_view.xml b/addons/crm_configuration/crm_claims_view.xml index 254c9e30223..a46410a298e 100644 --- a/addons/crm_configuration/crm_claims_view.xml +++ b/addons/crm_configuration/crm_claims_view.xml @@ -1,144 +1,136 @@ - - # ------------------------------------------------------ - # Claims - # ------------------------------------------------------ + + # ------------------------------------------------------ + # Claims + # ------------------------------------------------------ - - CRM - Claims Tree - crm.case - tree - - - - - - - - - - - - + + CRM - Claims Tree + crm.case + tree + + + + + + + + + + + + - - CRM - Claims Form - crm.case - form - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -