@@ -74,7 +74,7 @@
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.analytic.account</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="view_mode">tree,graph,form</field>
|
||||
<field name="view_id" ref="view_account_analytic_account_tree"/>
|
||||
</record>
|
||||
<!--<menuitem id="menu_analytic_account" name="Analytic Accounts" parent="account.menu_analytic_accounting"/>-->
|
||||
|
||||
Executable → Regular
+54
-37
@@ -37,13 +37,13 @@
|
||||
|
||||
<blockTableStyle id="tbl_header">
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,2" stop="-1,-1"/>
|
||||
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="tbl_content">
|
||||
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockAlignment value="RIGHT" start="2,1" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
@@ -91,9 +91,9 @@
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<blockTable colWidths="55.0,35.0,150.0, 90.0,60.0,345.0,50.0,69.0,72.0,64.0,58.0" style="tbl_header" repeatRows="1">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
|
||||
<blockTable colWidths="66.0,35.0,150.0, 90.0,60.0,335.0,50.0,69.0,72.0,64.0,58.0" style="tbl_header" repeatRows="1">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P2">Date</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="date">Date</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P2">JNRL</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P2">Partner</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P2">Ref</para></td>
|
||||
@@ -105,11 +105,13 @@
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P4">Balance</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P4">Currency</para></td>
|
||||
</tr>
|
||||
<para>[[ repeatIn(objects, 'a') ]]</para>
|
||||
<para>[[ repeatIn(get_children_accounts(a,data['form']), 'o') ]]</para>
|
||||
|
||||
<tr>
|
||||
<para>[[ repeatIn(objects, 'a') ]]</para>
|
||||
<para>[[ repeatIn(get_children_accounts(a,data['form']), 'o') ]]</para>
|
||||
<td>
|
||||
<blockTable colWidths="404.0,375.0,69.0,72.0,64.0,59.00" style="Table5">
|
||||
|
||||
<tr>
|
||||
<td><para style="Standard">[[ o.code ]] [[ o.name ]]</para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
@@ -118,28 +120,35 @@
|
||||
<td><para style="P9b"><u>[[ sum_solde_account(o, data['form']) or '0.0' ]]</u></para></td>
|
||||
<td><para style="P9b"><u> [[ sum_currency_amount_account(o, data['form']) or '0.0' ]]</u></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> [[ repeatIn(lines(o, data['form']), 'line') ]]
|
||||
<blockTable colWidths="55.0,35.0,150.0, 90.0,60.0,333.0,50.0,69.0,72.0,64.0,58.0" style="tbl_content" >
|
||||
<tr>
|
||||
|
||||
<td><para style="P2_content">[[ line['date'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['code'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['partner'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['ref'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['move'] ]]</para></td>
|
||||
<td><para style="P3_content">[[ line['name'] ]]</para></td>
|
||||
<td><para style="P3_content">[[ strip_name(line['line_corresp'],55) ]]</para></td>
|
||||
<td><para style="P4_content">[[ line['debit'] and line['debit'] or '0.0' ]]</para></td>
|
||||
<td><para style="P4_content">[[ line['credit'] and line['credit'] or '0.0' ]]</para></td>
|
||||
<td><para style="P4_content">[[ line['progress'] and line['progress'] or '0.0' ]]</para></td>
|
||||
<td><para style="P4_content">[[ line['amount_currency'] or '0.0' ]] [[ line['currency_code'] ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
[[ repeatIn(lines(o, data['form']), 'line') ]]
|
||||
<td><para style="P2_content">[[ line['date'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['code'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['partner'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['ref'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['move'] ]]</para></td>
|
||||
<td><para style="P3_content">[[ line['name'] ]]</para></td>
|
||||
<td><para style="P3_content">[[ strip_name(line['line_corresp'],55) ]]</para></td>
|
||||
<td><para style="P4_content">[[ line['debit'] and line['debit'] or '0.0' ]]</para></td>
|
||||
<td><para style="P4_content">[[ line['credit'] and line['credit'] or '0.0' ]]</para></td>
|
||||
<td><para style="P4_content">[[ line['progress'] and line['progress'] or '0.0' ]]</para></td>
|
||||
<td><para style="P4_content">[[ line['amount_currency'] or '0.0' ]] [[ line['currency_code'] ]]</para></td>
|
||||
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
<blockTable colWidths="55.0,35.0,166.0,90.0,60.0,390.0,50.0,69.0,72.0,64.0" style="tbl_header" repeatRows="1">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
|
||||
<blockTable colWidths="66.0,35.0,166.0,90.0,60.0,378.0,50.0,69.0,72.0,64.0" style="tbl_header" repeatRows="1">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P2">Date</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="date">Date</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P2">JNRL</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P2">Partner</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P2">Ref</para></td>
|
||||
@@ -150,9 +159,10 @@
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P4">Credit</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P4">Balance</para></td>
|
||||
</tr>
|
||||
<para>[[ repeatIn(objects, 'a') ]]</para>
|
||||
<para>[[ repeatIn(get_children_accounts(a,data['form']), 'o') ]]</para>
|
||||
|
||||
<tr>
|
||||
<para>[[ repeatIn(objects, 'a') ]]</para>
|
||||
<para>[[ repeatIn(get_children_accounts(a,data['form']), 'o') ]]</para>
|
||||
<td>
|
||||
<blockTable colWidths="405.0,435.0,69.0,72.0,64.0" style="Table5">
|
||||
<tr>
|
||||
@@ -162,22 +172,29 @@
|
||||
<td alignment="right"><para style="P9b"><u>[[sum_credit_account(o, data['form']) or '0.0']]</u></para></td>
|
||||
<td><para style="P9b"><u>[[sum_solde_account(o, data['form']) or '0.0' ]]</u></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> [[ repeatIn(lines(o, data['form']), 'line') ]]
|
||||
<blockTable colWidths="55.0,35.0,166.0,90.0,60.0,378.0,50.0,69.0,72.0,64.0" style="tbl_content">
|
||||
<tr>
|
||||
|
||||
<td><para style="P2_content">[[ line['date'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['code'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['partner'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['ref'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['move'] ]]</para></td>
|
||||
<td><para style="P3_content">[[ line['name'] ]]</para></td>
|
||||
<td><para style="P3_content">[[ strip_name(line['line_corresp'],55) ]]</para></td>
|
||||
<td><para style="P4_content">[[ line['debit'] and line['debit'] or '0.0' ]]</para></td>
|
||||
<td><para style="P4_content">[[ line['credit'] and line['credit'] or '0.0' ]]</para></td>
|
||||
<td><para style="P4_content">[[ line['progress'] and line['progress'] or '0.0' ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
[[ repeatIn(lines(o, data['form']), 'line') ]]
|
||||
<td><para style="P2_content">[[ line['date'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['code'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['partner'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['ref'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['move'] ]]</para></td>
|
||||
<td><para style="P3_content">[[ line['name'] ]]</para></td>
|
||||
<td><para style="P3_content">[[ strip_name(line['line_corresp'],55) ]]</para></td>
|
||||
<td><para style="P4_content">[[ line['debit'] and line['debit'] or '0.0' ]]</para></td>
|
||||
<td><para style="P4_content">[[ line['credit'] and line['credit'] or '0.0' ]]</para></td>
|
||||
<td><para style="P4_content">[[ line['progress'] and line['progress'] or '0.0' ]]</para></td>
|
||||
</tr>
|
||||
|
||||
</blockTable>
|
||||
</story>
|
||||
</document>
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
@@ -61,81 +61,81 @@ class partner_balance(report_sxw.rml_parse):
|
||||
for date in date_array:
|
||||
full_str_date.append(str(date))
|
||||
return full_str_date
|
||||
|
||||
|
||||
#
|
||||
|
||||
|
||||
|
||||
|
||||
def transform_period_into_date_array(self,data):
|
||||
## Get All Period Date
|
||||
#
|
||||
# If we have no period we will take all perdio in the FiscalYear.
|
||||
|
||||
|
||||
|
||||
|
||||
if not data['form']['periods'][0][2] :
|
||||
periods_id = self.pool.get('account.period').search(self.cr, self.uid, [('fiscalyear_id','=',data['form']['fiscalyear'])])
|
||||
else:
|
||||
periods_id = data['form']['periods'][0][2]
|
||||
date_array = []
|
||||
date_array = []
|
||||
for period_id in periods_id:
|
||||
period_obj = self.pool.get('account.period').browse(self.cr, self.uid, period_id)
|
||||
date_array = date_array + self.date_range(period_obj.date_start,period_obj.date_stop)
|
||||
self.date_lst = date_array
|
||||
self.date_lst.sort()
|
||||
|
||||
|
||||
|
||||
|
||||
def transform_date_into_date_array(self,data):
|
||||
return_array = self.date_range(data['form']['date1'],data['form']['date2'])
|
||||
self.date_lst = return_array
|
||||
self.date_lst.sort()
|
||||
|
||||
|
||||
def transform_both_into_date_array(self,data):
|
||||
if not data['form']['periods'][0][2] :
|
||||
periods_id = self.pool.get('account.period').search(self.cr, self.uid, [('fiscalyear_id','=',data['form']['fiscalyear'])])
|
||||
else:
|
||||
periods_id = data['form']['periods'][0][2]
|
||||
date_array = []
|
||||
date_array = []
|
||||
for period_id in periods_id:
|
||||
period_obj = self.pool.get('account.period').browse(self.cr, self.uid, period_id)
|
||||
date_array = date_array + self.date_range(period_obj.date_start,period_obj.date_stop)
|
||||
|
||||
|
||||
period_start_date = date_array[0]
|
||||
date_start_date = data['form']['date1']
|
||||
period_stop_date = date_array[-1]
|
||||
date_stop_date = data['form']['date2']
|
||||
|
||||
|
||||
if period_start_date<date_start_date:
|
||||
start_date = period_start_date
|
||||
else :
|
||||
start_date = date_start_date
|
||||
|
||||
|
||||
if date_stop_date<period_stop_date:
|
||||
stop_date = period_stop_date
|
||||
else :
|
||||
stop_date = date_stop_date
|
||||
|
||||
|
||||
|
||||
|
||||
final_date_array = []
|
||||
final_date_array = final_date_array + self.date_range(start_date,stop_date)
|
||||
self.date_lst = final_date_array
|
||||
self.date_lst.sort()
|
||||
|
||||
|
||||
def transform_none_into_date_array(self,data):
|
||||
|
||||
|
||||
sql = "SELECT min(date) as start_date from account_move_line"
|
||||
self.cr.execute(sql)
|
||||
start_date = self.cr.fetchone()[0]
|
||||
|
||||
|
||||
sql = "SELECT max(date) as start_date from account_move_line"
|
||||
self.cr.execute(sql)
|
||||
stop_date = self.cr.fetchone()[0]
|
||||
|
||||
|
||||
|
||||
|
||||
array = []
|
||||
array = array + self.date_range(start_date,stop_date)
|
||||
self.date_lst = array
|
||||
self.date_lst.sort()
|
||||
|
||||
|
||||
|
||||
|
||||
def comma_me(self,amount):
|
||||
if type(amount) is float :
|
||||
amount = str('%.2f'%amount)
|
||||
@@ -149,27 +149,27 @@ class partner_balance(report_sxw.rml_parse):
|
||||
return new
|
||||
else:
|
||||
return self.comma_me(new)
|
||||
|
||||
|
||||
def preprocess(self, objects, data, ids):
|
||||
# Transformation des date
|
||||
#
|
||||
#
|
||||
if data['form']['state'] == 'none':
|
||||
|
||||
|
||||
self.transform_none_into_date_array(data)
|
||||
elif data['form']['state'] == 'bydate':
|
||||
|
||||
|
||||
self.transform_date_into_date_array(data)
|
||||
elif data['form']['state'] == 'byperiod':
|
||||
|
||||
|
||||
self.transform_period_into_date_array(data)
|
||||
elif data['form']['state'] == 'all':
|
||||
|
||||
self.transform_both_into_date_array(data)
|
||||
|
||||
|
||||
|
||||
# if data['form']['fiscalyear']:
|
||||
|
||||
self.transform_both_into_date_array(data)
|
||||
|
||||
|
||||
|
||||
# if data['form']['fiscalyear']:
|
||||
# print"data['form']['fiscalyear']=True"
|
||||
# self.transform_period_into_date_array(data)
|
||||
# else:
|
||||
@@ -195,7 +195,7 @@ class partner_balance(report_sxw.rml_parse):
|
||||
"AND a.type IN " + self.ACCOUNT_TYPE + " " \
|
||||
"AND a.active", (data['form']['company_id'],))
|
||||
self.account_ids = ','.join([str(a) for (a,) in self.cr.fetchall()])
|
||||
|
||||
|
||||
super(partner_balance, self).preprocess(objects, data, ids)
|
||||
|
||||
def lines(self,data):
|
||||
@@ -208,8 +208,8 @@ class partner_balance(report_sxw.rml_parse):
|
||||
#
|
||||
#
|
||||
if data['form']['soldeinit'] :
|
||||
|
||||
|
||||
|
||||
|
||||
self.cr.execute(
|
||||
"SELECT p.ref, p.name,l.account_id,ac.name as account_name,ac.code as code , sum(debit) as debit, sum(credit) as credit, " \
|
||||
"CASE WHEN sum(debit) > sum(credit) " \
|
||||
@@ -234,13 +234,13 @@ class partner_balance(report_sxw.rml_parse):
|
||||
"ORDER BY l.account_id,p.name",
|
||||
(self.date_lst[0],self.date_lst[0]))
|
||||
res = self.cr.dictfetchall()
|
||||
|
||||
|
||||
for r in res:
|
||||
full_account.append(r)
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
self.cr.execute(
|
||||
"SELECT p.ref,l.account_id,ac.name as account_name,ac.code as code ,p.name, sum(debit) as debit, sum(credit) as credit, " \
|
||||
"CASE WHEN sum(debit) > sum(credit) " \
|
||||
@@ -264,10 +264,10 @@ class partner_balance(report_sxw.rml_parse):
|
||||
"GROUP BY p.id, p.ref, p.name,l.account_id,ac.name,ac.code " \
|
||||
"ORDER BY l.account_id,p.name")
|
||||
res = self.cr.dictfetchall()
|
||||
|
||||
print "============ res",res
|
||||
for r in res:
|
||||
full_account.append(r)
|
||||
|
||||
|
||||
## We will now compute Total
|
||||
return self._add_subtotal(full_account)
|
||||
|
||||
@@ -303,7 +303,7 @@ class partner_balance(report_sxw.rml_parse):
|
||||
#
|
||||
r['type'] = 1
|
||||
r['balance'] = float(r['sdebit']) - float(r['scredit'])
|
||||
|
||||
|
||||
completearray.append(r)
|
||||
#
|
||||
tot_debit = r['debit']
|
||||
@@ -319,7 +319,7 @@ class partner_balance(report_sxw.rml_parse):
|
||||
# new_tot['ref'] = 'Total'
|
||||
# new_tot['name'] = cleanarray[i-1]['account_name']
|
||||
# new_tot['code'] = cleanarray[i-1]['code']
|
||||
#
|
||||
#
|
||||
# new_tot['debit'] = tot_debit
|
||||
# new_tot['credit'] = tot_credit
|
||||
# new_tot['scredit'] = tot_scredit
|
||||
@@ -329,9 +329,9 @@ class partner_balance(report_sxw.rml_parse):
|
||||
# new_tot['type'] = 3
|
||||
# ##
|
||||
# completearray.append(new_tot)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
new_header['debit'] = tot_debit
|
||||
new_header['credit'] = tot_credit
|
||||
new_header['scredit'] = tot_scredit
|
||||
@@ -339,12 +339,14 @@ class partner_balance(report_sxw.rml_parse):
|
||||
new_header['enlitige'] = tot_enlitige
|
||||
new_header['balance'] = float(tot_sdebit) - float(tot_scredit)
|
||||
new_header['type'] = 3
|
||||
# we reset the counter
|
||||
# we reset the counter
|
||||
tot_debit = r['debit']
|
||||
tot_credit = r['credit']
|
||||
tot_scredit = r['scredit']
|
||||
tot_sdebit = r['sdebit']
|
||||
tot_enlitige = (r['enlitige'] or 0.0)
|
||||
|
||||
|
||||
#
|
||||
##
|
||||
new_header = {}
|
||||
@@ -360,36 +362,51 @@ class partner_balance(report_sxw.rml_parse):
|
||||
new_header['type'] = 3
|
||||
##
|
||||
##
|
||||
|
||||
|
||||
completearray.append(new_header)
|
||||
##
|
||||
##
|
||||
#
|
||||
r['type'] = 1
|
||||
#
|
||||
r['balance'] = float(r['sdebit']) - float(r['scredit'])
|
||||
|
||||
|
||||
#
|
||||
|
||||
completearray.append(r)
|
||||
|
||||
|
||||
if cleanarray[i]['account_id'] == cleanarray[i-1]['account_id']:
|
||||
# we reset the counter
|
||||
|
||||
# we reset the counter
|
||||
|
||||
new_header['debit'] = tot_debit
|
||||
new_header['credit'] = tot_credit
|
||||
new_header['scredit'] = tot_scredit
|
||||
new_header['sdebit'] = tot_sdebit
|
||||
new_header['enlitige'] = tot_enlitige
|
||||
new_header['balance'] = float(tot_sdebit) - float(tot_scredit)
|
||||
new_header['type'] = 3
|
||||
|
||||
tot_debit = tot_debit + r['debit']
|
||||
tot_credit = tot_credit + r['credit']
|
||||
tot_scredit = tot_scredit + r['scredit']
|
||||
tot_sdebit = tot_sdebit + r['sdebit']
|
||||
tot_enlitige = tot_enlitige + (r['enlitige'] or 0.0)
|
||||
|
||||
new_header['debit'] = tot_debit
|
||||
new_header['credit'] = tot_credit
|
||||
new_header['scredit'] = tot_scredit
|
||||
new_header['sdebit'] = tot_sdebit
|
||||
new_header['enlitige'] = tot_enlitige
|
||||
new_header['balance'] = float(tot_sdebit) - float(tot_scredit)
|
||||
|
||||
#
|
||||
r['type'] = 2
|
||||
#
|
||||
r['balance'] = float(r['sdebit']) - float(r['scredit'])
|
||||
#
|
||||
|
||||
completearray.append(r)
|
||||
|
||||
|
||||
i = i + 1
|
||||
|
||||
|
||||
return completearray
|
||||
|
||||
|
||||
@@ -400,7 +417,7 @@ class partner_balance(report_sxw.rml_parse):
|
||||
result_tmp = 0.0
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
if data['form']['soldeinit'] :
|
||||
self.cr.execute(
|
||||
"SELECT sum(debit) " \
|
||||
@@ -418,14 +435,14 @@ class partner_balance(report_sxw.rml_parse):
|
||||
"WHERE l.account_id IN (" + self.account_ids + ") " \
|
||||
"AND l.date IN (" + self.date_lst_string + ") " )
|
||||
result_tmp = result_tmp + float(self.cr.fetchone()[0] or 0.0)
|
||||
|
||||
|
||||
return result_tmp
|
||||
|
||||
def _sum_credit(self,data):
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
|
||||
|
||||
result_tmp = 0.0
|
||||
#
|
||||
#
|
||||
@@ -445,9 +462,9 @@ class partner_balance(report_sxw.rml_parse):
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE l.account_id IN (" + self.account_ids + ") " \
|
||||
"AND l.date IN (" + self.date_lst_string + ") " )
|
||||
|
||||
|
||||
result_tmp = result_tmp + float(self.cr.fetchone()[0] or 0.0)
|
||||
|
||||
|
||||
return result_tmp
|
||||
|
||||
def _sum_litige(self,data):
|
||||
@@ -455,7 +472,7 @@ class partner_balance(report_sxw.rml_parse):
|
||||
return 0.0
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
result_tmp = 0.0
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
if data['form']['soldeinit'] :
|
||||
@@ -477,7 +494,7 @@ class partner_balance(report_sxw.rml_parse):
|
||||
"AND l.date IN (" + self.date_lst_string + ") " \
|
||||
"AND l.blocked=TRUE " )
|
||||
result_tmp = result_tmp + float(self.cr.fetchone()[0] or 0.0)
|
||||
|
||||
|
||||
return result_tmp
|
||||
|
||||
def _sum_sdebit(self,data):
|
||||
@@ -485,7 +502,7 @@ class partner_balance(report_sxw.rml_parse):
|
||||
return 0.0
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
result_tmp = 0.0
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
if data['form']['soldeinit'] :
|
||||
@@ -500,7 +517,7 @@ class partner_balance(report_sxw.rml_parse):
|
||||
"AND l.reconcile_id IS NULL " \
|
||||
"GROUP BY l.partner_id",
|
||||
(self.date_lst[0],))
|
||||
|
||||
|
||||
if self.cr.fetchone() != None:
|
||||
result_tmp = float(self.cr.fetchone()[0])
|
||||
else:
|
||||
@@ -517,20 +534,20 @@ class partner_balance(report_sxw.rml_parse):
|
||||
"AND l.date IN (" + self.date_lst_string + ") " \
|
||||
"GROUP BY l.partner_id")
|
||||
a = self.cr.fetchone()[0]
|
||||
|
||||
|
||||
if self.cr.fetchone() != None:
|
||||
result_tmp = result_tmp + (a or 0.0)
|
||||
else:
|
||||
result_tmp = 0.0
|
||||
|
||||
return result_tmp
|
||||
|
||||
return result_tmp
|
||||
|
||||
def _sum_scredit(self,data):
|
||||
|
||||
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
|
||||
|
||||
result_tmp = 0.0
|
||||
#
|
||||
#
|
||||
@@ -546,7 +563,7 @@ class partner_balance(report_sxw.rml_parse):
|
||||
"AND l.reconcile_id IS NULL " \
|
||||
"GROUP BY l.partner_id",
|
||||
(self.date_lst[0],))
|
||||
|
||||
|
||||
if self.cr.fetchone() != None:
|
||||
result_tmp = float(self.cr.fetchone()[0]) or 0.0
|
||||
else:
|
||||
@@ -565,16 +582,16 @@ class partner_balance(report_sxw.rml_parse):
|
||||
a = self.cr.fetchone()[0] or 0.0
|
||||
if self.cr.fetchone() != None:
|
||||
result_tmp = result_tmp + (a or 0.0)
|
||||
|
||||
|
||||
else:
|
||||
result_tmp = 0.0
|
||||
|
||||
|
||||
return result_tmp
|
||||
|
||||
|
||||
def _solde_balance_debit(self,data):
|
||||
debit, credit = self._sum_debit(data), self._sum_credit(data)
|
||||
return debit > credit and debit - credit
|
||||
|
||||
|
||||
def _solde_balance_credit(self,data):
|
||||
debit, credit = self._sum_debit(data), self._sum_credit(data)
|
||||
return credit > debit and credit - debit
|
||||
@@ -587,4 +604,4 @@ class partner_balance(report_sxw.rml_parse):
|
||||
|
||||
report_sxw.report_sxw('report.account.partner.balance', 'res.partner',
|
||||
'account/report/partner_balance.rml',parser=partner_balance,
|
||||
header=False)
|
||||
header=False)
|
||||
@@ -105,7 +105,7 @@ period_fields = {
|
||||
'fiscalyear': {'string': 'Fiscal year', 'type': 'many2one', 'relation': 'account.fiscalyear',
|
||||
'help': 'Keep empty for all open fiscal year'},
|
||||
'periods': {'string': 'Periods', 'type': 'many2many', 'relation': 'account.period', 'help': 'All periods if empty'},
|
||||
'sortbydate':{'string':"Sort by:",'type':'selection','selection':[('sort_date','Date'),('sort_mvt','Mouvement')]},
|
||||
'sortbydate':{'string':"Sort by:",'type':'selection','selection':[('sort_date','Date'),('sort_mvt','Movement')]},
|
||||
'display_account':{'string':"Display accounts ",'type':'selection','selection':[('bal_mouvement','With movements'),('bal_all','All'),('bal_solde','With balance is not equal to 0')]},
|
||||
'landscape':{'string':"Landscape Mode",'type':'boolean'},
|
||||
'soldeinit':{'string':"Inclure les soldes initiaux",'type':'boolean'},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
@@ -400,7 +400,7 @@ class payment_line(osv.osv):
|
||||
method=True, type='date',help="Invoice Effective Date"),
|
||||
# 'reference': fields.function(select_by_name, string="Ref", method=True,
|
||||
# type='char'),
|
||||
'ml_maturity_date': fields.function(_get_ml_maturity_date, method=True, type='char', string='Maturity Date'),
|
||||
'ml_maturity_date': fields.function(_get_ml_maturity_date, method=True, type='date', string='Maturity Date'),
|
||||
'ml_inv_ref': fields.function(_get_ml_inv_ref, method=True, type='many2one', relation='account.invoice', string='Invoice Ref'),
|
||||
'info_owner': fields.function(info_owner, string="Owner Account", method=True, type="text",help='Address of the Main Partner'),
|
||||
'info_partner': fields.function(info_partner, string="Destination Account", method=True, type="text",help='Address of the Ordering Customer.'),
|
||||
|
||||
@@ -17,47 +17,17 @@
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#000000" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#000000" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#000000" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#000000" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,-1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,-1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="3,0" stop="3,-1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="GRID" colorName="black"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="3,0" stop="3,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="4,0" stop="4,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#000000" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#000000" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#000000" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#000000" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="GRID" colorName="black"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
@@ -77,7 +47,6 @@
|
||||
<paraStyle name="Table Contents" fontName="Times-Roman"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="Standard">[[ repeatIn(objects, 'o') ]]</para>
|
||||
<para style="Standard">
|
||||
@@ -115,7 +84,7 @@
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="83.0,98.0,190.0,71.0,85.0" style="Table2">
|
||||
<blockTable colWidths="83.0,98.0,190.0,70.0,85.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P4">Partner</para>
|
||||
@@ -134,7 +103,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="83.0,98.0,190.0,71.0,85.0" style="Table1">
|
||||
<blockTable colWidths="83.0,98.0,190.0,70.0,85.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="Table Contents">[[repeatIn(o.line_ids, 'line') ]]</para>
|
||||
@@ -144,13 +113,13 @@
|
||||
<para style="Table Contents">[[ line.bank_id and line.bank_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ line.reference ]]</para>
|
||||
<para style="Table Contents">[[ line.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P2">[[ formatLang(line.value_date, date=True) ]]</para>
|
||||
<para style="P2">[[ line.date ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ formatLang(line.to_pay_currency) ]] [[ line.currency.name ]]</para>
|
||||
<para style="P3">[[ formatLang(line.amount_currency) ]] [[ line.currency.name ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
@@ -42,7 +42,7 @@ arch_duedate='''<?xml version="1.0"?>
|
||||
|
||||
def search_entries(self, cr, uid, data, context):
|
||||
search_due_date=data['form']['duedate']
|
||||
|
||||
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
order_obj = pool.get('payment.order')
|
||||
line_obj = pool.get('account.move.line')
|
||||
@@ -54,14 +54,9 @@ def search_entries(self, cr, uid, data, context):
|
||||
ctx = '''context="{'journal_id': %d}"''' % payment.mode.journal.id
|
||||
|
||||
# Search for move line to pay:
|
||||
line_ids = line_obj.search(cr, uid, [
|
||||
('reconcile_id', '=', False),
|
||||
('account_id.type', '=', 'payable'),
|
||||
('amount_to_pay', '>', 0),
|
||||
('date_maturity','<=',search_due_date)
|
||||
], context=context)
|
||||
|
||||
|
||||
domain = [('reconcile_id', '=', False),('account_id.type', '=', 'payable'),('amount_to_pay', '>', 0)]
|
||||
domain = domain + ['|',('date_maturity','<',search_due_date),('date_maturity','=',False)]
|
||||
line_ids = line_obj.search(cr, uid, domain, context=context)
|
||||
FORM.string = '''<?xml version="1.0"?>
|
||||
<form string="Populate Payment:">
|
||||
<field name="entries" colspan="4" height="300" width="800" nolabel="1"
|
||||
@@ -115,7 +110,7 @@ class wizard_payment_order(wizard.interface):
|
||||
If a type is given, unsuitable account move lines are ignored.
|
||||
"""
|
||||
states = {
|
||||
|
||||
|
||||
'init': {
|
||||
'actions': [],
|
||||
'result': {
|
||||
@@ -128,7 +123,7 @@ class wizard_payment_order(wizard.interface):
|
||||
]
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
'search': {
|
||||
'actions': [search_entries],
|
||||
'result': {
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import voucher
|
||||
import voucher_account
|
||||
import report
|
||||
import report
|
||||
|
||||
@@ -29,7 +29,6 @@ from mx.DateTime import RelativeDateTime
|
||||
|
||||
from tools import config
|
||||
|
||||
|
||||
class account_voucher(osv.osv):
|
||||
def _get_period(self, cr, uid, context):
|
||||
periods = self.pool.get('account.period').find(cr, uid)
|
||||
@@ -45,10 +44,8 @@ class account_voucher(osv.osv):
|
||||
def _get_reference_type(self, cursor, user, context=None):
|
||||
return [('none', 'Free Reference')]
|
||||
|
||||
|
||||
|
||||
def _get_journal(self, cr, uid, context):
|
||||
type_inv = context.get('type', 'rec_voucher')
|
||||
type_inv = context #.get('type', 'rec_voucher')
|
||||
type2journal = {'rec_voucher': 'cash', 'bank_rec_voucher': 'cash','pay_voucher': 'cash','bank_pay_voucher': 'cash', 'cont_voucher': 'cash','journal_sale_voucher': 'sale','journal_pur_voucher': 'purchase' }
|
||||
journal_obj = self.pool.get('account.journal')
|
||||
res = journal_obj.search(cr, uid, [('type', '=', type2journal.get(type_inv, 'cash'))], limit=1)
|
||||
@@ -93,8 +90,7 @@ class account_voucher(osv.osv):
|
||||
('cancel','Cancel')
|
||||
], 'State',
|
||||
readonly=True),
|
||||
'amount':fields.float('Amount', readonly=True),
|
||||
# , states={'draft':[('readonly',False)]}
|
||||
'amount':fields.float('Amount'),
|
||||
'number':fields.char('Number', size=32, readonly=True),
|
||||
'reference': fields.char('Voucher Reference', size=64),
|
||||
'reference_type': fields.selection(_get_reference_type, 'Reference Type',
|
||||
@@ -168,11 +164,13 @@ class account_voucher(osv.osv):
|
||||
self.write(cr,uid,ids,{'amount':total})
|
||||
self.write(cr, uid, ids, {'state':'proforma'})
|
||||
return True
|
||||
|
||||
def proforma_voucher(self, cr, uid, ids, context={}):
|
||||
self.action_move_line_create(cr, uid, ids)
|
||||
self.action_number(cr, uid, ids)
|
||||
self.write(cr, uid, ids, {'state':'posted'})
|
||||
return True
|
||||
|
||||
def cancel_voucher(self,cr,uid,ids,context={}):
|
||||
self.action_cancel(cr, uid, ids)
|
||||
self.write(cr, uid, ids, {'state':'cancel'})
|
||||
@@ -213,12 +211,13 @@ class account_voucher(osv.osv):
|
||||
ref = inv.reference
|
||||
else:
|
||||
ref = self._convert_ref(cr, uid, inv.number)
|
||||
|
||||
il['analytic_lines'] = [(0,0, {
|
||||
'name': il['name'],
|
||||
'date': inv['date'],
|
||||
'account_id': il['account_analytic_id'],
|
||||
'amount': inv['amount'] * sign,
|
||||
'partner_id': il['partner_id'] or False,
|
||||
#'partner_id': il['partner_id'] or False,
|
||||
'general_account_id': il['account_id'] or False,
|
||||
'journal_id': self._get_journal(cr, uid, inv.type),
|
||||
'ref': ref,
|
||||
@@ -227,10 +226,14 @@ class account_voucher(osv.osv):
|
||||
return iml
|
||||
|
||||
def action_move_line_create(self, cr, uid, ids, *args):
|
||||
|
||||
for inv in self.browse(cr, uid, ids):
|
||||
|
||||
if inv.move_id:
|
||||
continue
|
||||
|
||||
company_currency = inv.company_id.currency_id.id
|
||||
|
||||
# create the analytical lines
|
||||
line_ids = self.read(cr, uid, [inv.id], ['payment_ids'])[0]['payment_ids']
|
||||
ils = self.pool.get('account.voucher.line').read(cr, uid, line_ids)
|
||||
@@ -277,13 +280,12 @@ class account_voucher(osv.osv):
|
||||
'currency_id': diff_currency_p \
|
||||
and inv.currency_id.id or False,
|
||||
'ref': ref
|
||||
})
|
||||
})
|
||||
|
||||
date = inv.date
|
||||
inv.amount=total
|
||||
|
||||
|
||||
line = map(lambda x:(0,0,self.line_get_convert(cr, uid, x,date, context={})) ,iml)
|
||||
line = map(lambda x:(0, 0, self.line_get_convert(cr, uid, x,date, context={})), iml)
|
||||
|
||||
journal_id = inv.journal_id.id #self._get_journal(cr, uid, {'type': inv['type']})
|
||||
journal = self.pool.get('account.journal').browse(cr, uid, journal_id)
|
||||
@@ -291,6 +293,7 @@ class account_voucher(osv.osv):
|
||||
name = self.pool.get('ir.sequence').get_id(cr, uid, journal.sequence_id.id)
|
||||
|
||||
move = {'name': name, 'line_id': line, 'journal_id': journal_id}
|
||||
|
||||
if inv.period_id:
|
||||
move['period_id'] = inv.period_id.id
|
||||
for i in line:
|
||||
@@ -301,12 +304,9 @@ class account_voucher(osv.osv):
|
||||
obj=self.pool.get('account.move').browse(cr,uid,move_id)
|
||||
for line in obj.line_id :
|
||||
cr.execute('insert into voucher_id (account_id,rel_account_move) values (%d, %d)',(int(ids[0]),int(line.id)))
|
||||
# self.pool.get('account.move').post(cr, uid, [move_id])
|
||||
# self._log_event(cr, uid, ids)
|
||||
return True
|
||||
|
||||
|
||||
|
||||
return True
|
||||
|
||||
def line_get_convert(self, cr, uid, x, date, context={}):
|
||||
return {
|
||||
'date':date,
|
||||
|
||||
@@ -30,13 +30,14 @@
|
||||
<field name="name" select="1"/>
|
||||
<field name="journal_id" select="1" on_change="onchange_journal(journal_id,type)"/>
|
||||
<field name="account_id" select="2" on_change="onchange_account(account_id)"/>
|
||||
<field name="amount" select="1" required="1"/>
|
||||
<field name="amount" select="1"/>
|
||||
<newline/>
|
||||
<field name="payment_ids" colspan="4" nolabel="1">
|
||||
<tree string="Voucher Lines" editable="top">
|
||||
<field name="account_analytic_id"/>
|
||||
<field name="partner_id" on_change="onchange_partner(partner_id,type,parent.type)"/>
|
||||
<field name="account_id" groups="base.group_system"/>
|
||||
<field name="name" groups="base.group_system"/>
|
||||
<field name="account_id"/>
|
||||
<field name="name"/>
|
||||
<field name="ref"/>
|
||||
<field name="amount"/>
|
||||
<field name="type"/>
|
||||
|
||||
@@ -45,6 +45,8 @@ meetings, eso.
|
||||
"crm_meeting_view.xml",
|
||||
"crm_opportunity_view.xml",
|
||||
"crm_fund_view.xml",
|
||||
"crm_claims_view.xml",
|
||||
"crm_phonecall_view.xml",
|
||||
"crm_report_view.xml"
|
||||
],
|
||||
"demo_xml" : [
|
||||
@@ -54,6 +56,8 @@ meetings, eso.
|
||||
# "crm_meeting_demo.xml",
|
||||
# "crm_lead_demo.xml",
|
||||
# "crm_opportunity_demo.xml",
|
||||
# "crm_claims_demo.xml",
|
||||
# "crm_phonecall_demo.xml",
|
||||
],
|
||||
"update_xml" : [
|
||||
# "crm_bugs_data.xml",
|
||||
@@ -69,6 +73,10 @@ meetings, eso.
|
||||
# "crm_meeting_menu.xml",
|
||||
# "crm_opportunity_data.xml",
|
||||
# "crm_opportunity_menu.xml",
|
||||
# "crm_claims_data.xml",
|
||||
# "crm_claims_menu.xml",
|
||||
# "crm_phonecall_data.xml",
|
||||
# "crm_phonecall_menu.xml",
|
||||
"security/ir.model.access.csv",
|
||||
"process/crm_configuration_process.xml",
|
||||
],
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<record model="crm.case.section" id="section_support_claims">
|
||||
<field name="name">Claims</field>
|
||||
<field name="code">Claim</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Case Categories
|
||||
-->
|
||||
<record model="crm.case.categ" id="categ_claim1">
|
||||
<field name="name">Factual Claims</field>
|
||||
<field name="section_id" ref="section_support_claims"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_claim2">
|
||||
<field name="name">Value Claims</field>
|
||||
<field name="section_id" ref="section_support_claims"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_claim3">
|
||||
<field name="name">Policy Claims</field>
|
||||
<field name="section_id" ref="section_support_claims"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Case Category2
|
||||
-->
|
||||
<record model="crm.case.category2" id="category_claim1">
|
||||
<field name="name">Corrective</field>
|
||||
<field name="section_id" ref="section_support_claims"/>
|
||||
</record>
|
||||
<record model="crm.case.category2" id="category_claim2">
|
||||
<field name="name">Preventive</field>
|
||||
<field name="section_id" ref="section_support_claims"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Case Stage
|
||||
-->
|
||||
<record model="crm.case.stage" id="stage_claim1">
|
||||
<field name="name">Accepted as Claim</field>
|
||||
<field name="section_id" ref="section_support_claims"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_claim2">
|
||||
<field name="name">Fixed</field>
|
||||
<field name="section_id" ref="section_support_claims"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_claim3">
|
||||
<field name="name">Won't fix</field>
|
||||
<field name="section_id" ref="section_support_claims"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_claim4">
|
||||
<field name="name">Invalid</field>
|
||||
<field name="section_id" ref="section_support_claims"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_claim5">
|
||||
<field name="name">Awaiting Response</field>
|
||||
<field name="section_id" ref="section_support_claims"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<!--
|
||||
((((((((((( Demo Cases )))))))))))
|
||||
-->
|
||||
<record id="crm_case_claim01" model="crm.case">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_15"/>
|
||||
<field eval="time.strftime('%Y-%m-04 10:45:36')" name="date"/>
|
||||
<field name="category2_id" ref="crm_configuration.category_claim1"/>
|
||||
<field name="partner_id" ref="base.res_partner_11"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""Problem with the delivery of goods"" name="name"/>
|
||||
<field eval=""open"" name="state"/>
|
||||
<field name="section_id" ref="crm_configuration.section_support_claims"/>
|
||||
<field eval=""(726) 782-0636"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm_configuration.categ_claim1"/>
|
||||
<field name="stage_id" ref="crm_configuration.stage_claim1"/>
|
||||
<field eval=""(769) 703-274"" name="partner_phone"/>
|
||||
</record>
|
||||
<record id="crm_case_claim02" model="crm.case">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_6"/>
|
||||
<field eval="time.strftime('%Y-%m-11 11:19:25')" name="date"/>
|
||||
<field name="category2_id" ref="crm_configuration.category_claim2"/>
|
||||
<field name="partner_id" ref="base.res_partner_6"/>
|
||||
<field eval=""4"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""Damaged Products"" name="name"/>
|
||||
<field eval=""open"" name="state"/>
|
||||
<field name="section_id" ref="crm_configuration.section_support_claims"/>
|
||||
<field eval=""(392) 895-7917"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm_configuration.categ_claim2"/>
|
||||
<field name="stage_id" ref="crm_configuration.stage_claim5"/>
|
||||
<field eval=""(956) 293-2595"" name="partner_phone"/>
|
||||
</record>
|
||||
<record id="crm_case_claim03" model="crm.case">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_2"/>
|
||||
<field eval="time.strftime('%Y-%m-15 17:44:12')" name="date"/>
|
||||
<field name="category2_id" ref="crm_configuration.category_claim1"/>
|
||||
<field name="partner_id" ref="base.res_partner_10"/>
|
||||
<field eval=""2"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field eval=""Document related problems"" name="name"/>
|
||||
<field eval=""done"" name="state"/>
|
||||
<field name="section_id" ref="crm_configuration.section_support_claims"/>
|
||||
<field eval=""(820) 167-3208"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm_configuration.categ_claim3"/>
|
||||
<field name="stage_id" ref="crm_configuration.stage_claim2"/>
|
||||
<field eval=""(079) 681-2139"" name="partner_phone"/>
|
||||
<field eval=""contact@tecsas.fr"" name="email_from"/>
|
||||
</record>
|
||||
<record id="crm_case_claim04" model="crm.case">
|
||||
<field eval="time.strftime('%Y-%m-21 14:10:23')" name="date"/>
|
||||
<field name="category2_id" ref="crm_configuration.category_claim2"/>
|
||||
<field name="partner_id" ref="base.res_partner_tinyatwork"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""Product quality not maintained"" name="name"/>
|
||||
<field eval=""draft"" name="state"/>
|
||||
<field name="section_id" ref="crm_configuration.section_support_claims"/>
|
||||
<field eval=""(077) 582-4035"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm_configuration.categ_claim1"/>
|
||||
<field name="stage_id" ref="crm_configuration.stage_claim5"/>
|
||||
<field eval=""(514) 698-4118"" name="partner_phone"/>
|
||||
</record>
|
||||
<record id="crm_case_claim05" model="crm.case">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_10"/>
|
||||
<field eval="time.strftime('%Y-%m-28 16:20:43')" name="date"/>
|
||||
<field name="category2_id" ref="crm_configuration.category_claim1"/>
|
||||
<field name="partner_id" ref="base.res_partner_5"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""Some products missing"" name="name"/>
|
||||
<field eval=""pending"" name="state"/>
|
||||
<field name="section_id" ref="crm_configuration.section_support_claims"/>
|
||||
<field eval=""(333) 715-1450"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm_configuration.categ_claim3"/>
|
||||
<field name="stage_id" ref="crm_configuration.stage_claim3"/>
|
||||
<field eval=""(855) 924-4364"" name="partner_phone"/>
|
||||
</record>
|
||||
<record id="crm_case_claim06" model="crm.case">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_1"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="category2_id" ref="crm_configuration.category_claim2"/>
|
||||
<field name="partner_id" ref="base.res_partner_9"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""Problem with the delivery of assignments"" name="name"/>
|
||||
<field eval=""cancel"" name="state"/>
|
||||
<field name="section_id" ref="crm_configuration.section_support_claims"/>
|
||||
<field eval=""(468) 017-2684"" name="partner_mobile"/>
|
||||
<field eval="time.strftime('%Y-%m-28 14:15:30')" name="date"/>
|
||||
<field name="categ_id" ref="crm_configuration.categ_claim1"/>
|
||||
<field name="stage_id" ref="crm_configuration.stage_claim4"/>
|
||||
<field eval=""(373) 907-1009"" name="partner_phone"/>
|
||||
<field eval=""info@opensides.be"" name="email_from"/>
|
||||
</record>
|
||||
<record id="crm_case_claims07" model="crm.case">
|
||||
<field eval="1" name="active"/>
|
||||
<field name="category2_id" ref="crm_configuration.category_claim1"/>
|
||||
<field name="partner_id" ref="base.res_partner_seagate"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""Documents unclear"" name="name"/>
|
||||
<field eval=""done"" name="state"/>
|
||||
<field name="section_id" ref="crm_configuration.section_support_claims"/>
|
||||
<field eval="" (463) 014-1208"" name="partner_mobile"/>
|
||||
<field eval="time.strftime('%Y-%m-19 13:01:05')" name="date"/>
|
||||
<field name="categ_id" ref="crm_configuration.categ_claim3"/>
|
||||
<field name="stage_id" ref="crm_configuration.stage_claim2"/>
|
||||
<field eval=""(282) 603-7489"" name="partner_phone"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -0,0 +1,190 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<menuitem id="menu_aftersale" name="After-Sale Services" parent="crm.menu_crm"/>
|
||||
|
||||
######################## CLAIMS (menu) ###########################
|
||||
<record model="ir.actions.act_window" id="crm_case_categ_claim0">
|
||||
<field name="name">All Claims</field>
|
||||
<field name="res_model">crm.case</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,calendar</field>
|
||||
<field name="view_id" ref="crm_case_claims_tree_view"/>
|
||||
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_claims'))+')]'"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_claim0">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_claims_tree_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_claim0"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_claim0">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">calendar</field>
|
||||
<field name="view_id" ref="crm_case_claims_calendar_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_claim0"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_form_claim0">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_case_claims_form_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_claim0"/>
|
||||
</record>
|
||||
<menuitem name="Claims" id="menu_crm_case_claims" parent="menu_aftersale" action="crm_case_categ_claim0"/>
|
||||
|
||||
<!-- My Claims -->
|
||||
<record model="ir.actions.act_window" id="crm_case_category_act_claim_my1">
|
||||
<field name="name">My Claims</field>
|
||||
<field name="res_model">crm.case</field>
|
||||
<field name="view_mode">tree,form,calendar</field>
|
||||
<field name="view_id" ref="crm_case_claims_tree_view"/>
|
||||
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_claims'))+'),(\'user_id\',\'=\',uid)]'"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_claim_my1">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_claims_tree_view"/>
|
||||
<field name="act_window_id" ref="crm_case_category_act_claim_my1"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_graph_view_claim_my1">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">calendar</field>
|
||||
<field name="view_id" ref="crm_case_claims_calendar_view"/>
|
||||
<field name="act_window_id" ref="crm_case_category_act_claim_my1"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_claim_my1">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_case_claims_form_view"/>
|
||||
<field name="act_window_id" ref="crm_case_category_act_claim_my1"/>
|
||||
</record>
|
||||
<menuitem name="My Claims" id="menu_crm_case_category_act_claim_my1" action="crm_case_category_act_claim_my1" parent="menu_crm_case_claims"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_category_act_claim1">
|
||||
<field name="name">Funds</field>
|
||||
<field name="res_model">crm.case</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_case_claims_form_view"/>
|
||||
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_claims'))+')]'"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_claim1">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_case_claims_form_view"/>
|
||||
<field name="act_window_id" ref="crm_case_category_act_claim1"/>
|
||||
</record>
|
||||
<menuitem name="New Claim" id="menu_crm_case_categ0_act_claim" action="crm_case_category_act_claim1" parent="menu_crm_case_category_act_claim_my1"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_category_act_claim_my2">
|
||||
<field name="name">My Unclosed Claims</field>
|
||||
<field name="res_model">crm.case</field>
|
||||
<field name="view_mode">tree,calendar,form</field>
|
||||
<field name="view_id" ref="crm_case_claims_tree_view"/>
|
||||
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_claims'))+'),(\'user_id\',\'=\',uid),(\'state\',\'<>\',\'done\'),(\'state\',\'<>\',\'cancel\')]'"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_claim_my2">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_claims_tree_view"/>
|
||||
<field name="act_window_id" ref="crm_case_category_act_claim_my2"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_view_claim_my2">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">calendar</field>
|
||||
<field name="view_id" ref="crm_case_claims_calendar_view"/>
|
||||
<field name="act_window_id" ref="crm_case_category_act_claim_my2"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_claim_my2">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_case_claims_form_view"/>
|
||||
<field name="act_window_id" ref="crm_case_category_act_claim_my2"/>
|
||||
</record>
|
||||
<menuitem name="My Unclosed Claims" id="menu_crm_case_categ0_act_claim_my2" action="crm_case_category_act_claim_my2" parent="menu_crm_case_category_act_claim_my1"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_category_act_claim_my3">
|
||||
<field name="name">My Cancelled Claims</field>
|
||||
<field name="res_model">crm.case</field>
|
||||
<field name="view_mode">tree,calendar,form</field>
|
||||
<field name="view_id" ref="crm_case_claims_tree_view"/>
|
||||
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_claims'))+'),(\'user_id\',\'=\',uid),(\'state\',\'=\',\'cancel\')]'"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_claim_my3">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_claims_tree_view"/>
|
||||
<field name="act_window_id" ref="crm_case_category_act_claim_my3"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_claim_my3">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">calendar</field>
|
||||
<field name="view_id" ref="crm_case_claims_calendar_view"/>
|
||||
<field name="act_window_id" ref="crm_case_category_act_claim_my3"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_graph_view_claim_my3">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_case_claims_form_view"/>
|
||||
<field name="act_window_id" ref="crm_case_category_act_claim_my3"/>
|
||||
</record>
|
||||
<menuitem name="My Cancelled Claims" id="menu_crm_case_categ0_act_claim_my3" action="crm_case_category_act_claim_my3" parent="menu_crm_case_category_act_claim_my1"/>
|
||||
|
||||
<!-- All Claims -->
|
||||
<menuitem name="All Claims" id="menu_crm_case_categ_claim0" action="crm_case_categ_claim0" parent="menu_crm_case_claims"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_category_act_claim_all2">
|
||||
<field name="name">All Unclosed Claims</field>
|
||||
<field name="res_model">crm.case</field>
|
||||
<field name="view_mode">tree,calendar,form</field>
|
||||
<field name="view_id" ref="crm_case_claims_tree_view"/>
|
||||
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_claims'))+'),(\'state\',\'<>\',\'done\'),(\'state\',\'<>\',\'cancel\')]'"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_claim_all2">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_claims_tree_view"/>
|
||||
<field name="act_window_id" ref="crm_case_category_act_claim_all2"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_view_claim_all2">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">calendar</field>
|
||||
<field name="view_id" ref="crm_case_claims_calendar_view"/>
|
||||
<field name="act_window_id" ref="crm_case_category_act_claim_all2"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_claim_all2">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_case_claims_form_view"/>
|
||||
<field name="act_window_id" ref="crm_case_category_act_claim_all2"/>
|
||||
</record>
|
||||
<menuitem name="All Unclosed Claims" id="menu_crm_case_categ0_act_claim_all2" action="crm_case_category_act_claim_all2" parent="menu_crm_case_categ_claim0"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_category_act_claim_all3">
|
||||
<field name="name">All Cancelled Claims</field>
|
||||
<field name="res_model">crm.case</field>
|
||||
<field name="view_mode">tree,calendar,form</field>
|
||||
<field name="view_id" ref="crm_case_claims_tree_view"/>
|
||||
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_claims'))+'),(\'state\',\'=\',\'cancel\')]'"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_claim_all3">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_claims_tree_view"/>
|
||||
<field name="act_window_id" ref="crm_case_category_act_claim_all3"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_claim_all3">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">calendar</field>
|
||||
<field name="view_id" ref="crm_case_claims_calendar_view"/>
|
||||
<field name="act_window_id" ref="crm_case_category_act_claim_all3"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_graph_view_claim_all3">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_case_claims_form_view"/>
|
||||
<field name="act_window_id" ref="crm_case_category_act_claim_all3"/>
|
||||
</record>
|
||||
<menuitem name="All Cancelled Claims" id="menu_crm_case_categ0_act_claim_all3" action="crm_case_category_act_claim_all3" parent="menu_crm_case_categ_claim0"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -0,0 +1,144 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
# ------------------------------------------------------
|
||||
# Claims
|
||||
# ------------------------------------------------------
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_claims_tree_view">
|
||||
<field name="name">CRM - Claims Tree</field>
|
||||
<field name="model">crm.case</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Claims" colors="red:state=='open'">
|
||||
<field name="id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="date" string="Date of Claim"/>
|
||||
<field name="categ_id" string="Type of claim" select="1"/>
|
||||
<field name="date_closed"/>
|
||||
<field name="planned_cost" string="Claim Cost"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_claims_form_view">
|
||||
<field name="name">CRM - Claims Form</field>
|
||||
<field name="model">crm.case</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Claims">
|
||||
<group colspan="4" col="6">
|
||||
<field name="partner_id"/>
|
||||
<field name="section_id" colspan="1"/>
|
||||
<newline/>
|
||||
<field name="categ_id" string="Type of claim" select="1" on_change="onchange_categ_id(categ_id)"/>
|
||||
<field name="date" string="Date of Claim"/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Claims Info">
|
||||
<field name="partner_address_id" string="Contact" on_change="onchange_partner_address_id(partner_address_id, email_from)" colspan="1"/>
|
||||
<field name="email_from"/>
|
||||
<newline/>
|
||||
<field name="partner_phone"/>
|
||||
<field name="partner_mobile"/>
|
||||
<newline/>
|
||||
<separator colspan="4"/>
|
||||
<field name="planned_cost" string="Claim Cost"/>
|
||||
<field name="probability"/>
|
||||
<newline/>
|
||||
<field name="priority"/>
|
||||
<field name="category2_id" string="Type of Action" select="1"/>
|
||||
<field name="stage_id" colspan="2"/>
|
||||
<field name="user_id" string="Responsible" select="2"/>
|
||||
<newline/>
|
||||
<separator colspan="4"/>
|
||||
<field name="name" string="Description" colspan="4"/>
|
||||
<separator colspan="4"/>
|
||||
<group col="8" colspan="4">
|
||||
<field name="state" select="1"/>
|
||||
<button name="case_close" string="Done" states="open,draft,pending" type="object"/>
|
||||
<button name="case_open" string="Open" states="draft,pending" type="object"/>
|
||||
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object"/>
|
||||
<button name="case_pending" string="Pending" states="draft,open" type="object"/>
|
||||
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Internal Notes">
|
||||
<separator string= "Notes" colspan="4"/>
|
||||
<field name="note" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Extra Info">
|
||||
<field name="id"/>
|
||||
<field name="active"/>
|
||||
<field name="email_cc"/>
|
||||
<field name="canal_id"/>
|
||||
<separator colspan="4" string="Dates"/>
|
||||
<field name="create_date"/>
|
||||
<field name="date_closed"/>
|
||||
<field name="date_action_last"/>
|
||||
<field name="date_action_next"/>
|
||||
<separator colspan="4"/>
|
||||
<field name="history_line" colspan="2" nolabel="1" mode="tree,form">
|
||||
<form string="Communication history">
|
||||
<group col="6" colspan="4">
|
||||
<field name="date"/>
|
||||
<field name="email"/>
|
||||
<field name="canal_id"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<field name="description" colspan="4" nolabel="1"/>
|
||||
</form>
|
||||
<tree string="Communication history">
|
||||
<field name="description"/>
|
||||
<field name="email"/>
|
||||
<field name="date"/>
|
||||
</tree>
|
||||
</field>
|
||||
<group col="2" colspan="2" expand="1">
|
||||
<field name="som"/>
|
||||
<button name="add_reply" string="Add Last Mail for Replying"
|
||||
states="open" type="object" colspan="2"/>
|
||||
<field name="description" colspan="2" nolabel="1"/>
|
||||
<button name="case_log_reply"
|
||||
string="Send Partner & Historize" states="open"
|
||||
type="object"/>
|
||||
<button name="case_log" string="Historize" states="open"
|
||||
type="object"/>
|
||||
</group>
|
||||
<separator colspan="4" string="References"/>
|
||||
<field name="ref" colspan="4"/>
|
||||
<field name="ref2" colspan="4"/>
|
||||
</page>
|
||||
<page string="History">
|
||||
<field name="log_ids" nolabel="1" colspan="4">
|
||||
<form string="Actions">
|
||||
<separator string="Action Information" colspan="4"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="date"/>
|
||||
<field name="user_id"/>
|
||||
<field name="som"/>
|
||||
<field name="canal_id"/>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_claims_calendar_view">
|
||||
<field name="name">CRM - Claims Calendar</field>
|
||||
<field name="model">crm.case</field>
|
||||
<field name="type">calendar</field>
|
||||
<field name="priority" eval="2"/>
|
||||
<field name="arch" type="xml">
|
||||
<calendar string="Claims" date_start="date" color="user_id">
|
||||
<field name="name"/>
|
||||
<field name="partner_name"/>
|
||||
<field name="categ_id"/>
|
||||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -96,11 +96,14 @@ class crm_menu_config_wizard(osv.osv_memory):
|
||||
'bugs' : fields.boolean('Bug Tracking', help="Used by companies to track bugs and support requests on softwares"),
|
||||
'helpdesk': fields.boolean('Helpdesk', help="Manages an Helpdesk service."),
|
||||
'fund' : fields.boolean('Fund Raising Operations', help="This may help associations in their fund raising process and tracking."),
|
||||
'claims' : fields.boolean('Supplier Claims', help="Manages the supplier complaints."),
|
||||
'phonecall' : fields.boolean('Phone Calls', help="Help you to encode the result of a phone call"),
|
||||
}
|
||||
_defaults = {
|
||||
'meeting': lambda *args: True,
|
||||
'jobs': lambda *args: True,
|
||||
'opportunity': lambda *args: True,
|
||||
'phonecall': lambda *args: True,
|
||||
}
|
||||
def action_create(self, cr, uid, ids, *args):
|
||||
modid = self.pool.get('ir.module.module').search(cr, uid, [('name','=','crm_configuration')])
|
||||
@@ -110,7 +113,7 @@ class crm_menu_config_wizard(osv.osv_memory):
|
||||
lst = ('data','menu','demo')
|
||||
res = self.read(cr,uid,ids)[0]
|
||||
idref = {}
|
||||
for section in ['meeting','lead','opportunity','jobs','bugs','fund','helpdesk'] :
|
||||
for section in ['meeting','lead','opportunity','jobs','bugs','fund','helpdesk','claims','phonecall'] :
|
||||
if (not res[section]):
|
||||
continue
|
||||
for fname in lst:
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
<field name="bugs"/>
|
||||
<field name="helpdesk"/>
|
||||
<field name="fund"/>
|
||||
<field name="claims"/>
|
||||
<field name="phonecall"/>
|
||||
<separator colspan="4" string="Calendar Sharing"/>
|
||||
<field name="document_ics"/>
|
||||
<newline/>
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<record model="crm.case.section" id="section_support_phone">
|
||||
<field name="name">Phone Calls</field>
|
||||
<field name="code">Phone</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Case Categories
|
||||
-->
|
||||
<record model="crm.case.categ" id="categ_phone1">
|
||||
<field name="name">Inbound</field>
|
||||
<field name="section_id" ref="section_support_phone"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_phone2">
|
||||
<field name="name">Outbound</field>
|
||||
<field name="section_id" ref="section_support_phone"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Case Stage
|
||||
-->
|
||||
<record model="crm.case.stage" id="stage_phone1">
|
||||
<field name="name">Planned</field>
|
||||
<field name="section_id" ref="section_support_phone"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_phone2">
|
||||
<field name="name">Held</field>
|
||||
<field name="section_id" ref="section_support_phone"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_phone3">
|
||||
<field name="name">Not Held</field>
|
||||
<field name="section_id" ref="section_support_phone"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -0,0 +1,99 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<!--
|
||||
((((((((((( Demo Cases )))))))))))
|
||||
-->
|
||||
<record id="crm_case_phone01" model="crm.case">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_15"/>
|
||||
<field eval="time.strftime('%Y-%m-04 10:45:36')" name="date"/>
|
||||
<field name="partner_id" ref="base.res_partner_11"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""Left the message"" name="name"/>
|
||||
<field eval=""open"" name="state"/>
|
||||
<field name="section_id" ref="crm_configuration.section_support_phone"/>
|
||||
<field eval=""(726) 782-0636"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm_configuration.categ_phone1"/>
|
||||
<field name="stage_id" ref="crm_configuration.stage_phone1"/>
|
||||
<field eval=""(769) 703-274"" name="partner_phone"/>
|
||||
</record>
|
||||
<record id="crm_case_phone02" model="crm.case">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_6"/>
|
||||
<field eval="time.strftime('%Y-%m-11 11:19:25')" name="date"/>
|
||||
<field name="partner_id" ref="base.res_partner_6"/>
|
||||
<field eval=""4"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""Get More information on the proposed deal"" name="name"/>
|
||||
<field eval=""open"" name="state"/>
|
||||
<field name="section_id" ref="crm_configuration.section_support_phone"/>
|
||||
<field eval=""(392) 895-7917"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm_configuration.categ_phone1"/>
|
||||
<field name="stage_id" ref="crm_configuration.stage_phone2"/>
|
||||
<field eval=""(956) 293-2595"" name="partner_phone"/>
|
||||
</record>
|
||||
<record id="crm_case_phone03" model="crm.case">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_2"/>
|
||||
<field eval="time.strftime('%Y-%m-15 17:44:12')" name="date"/>
|
||||
<field name="partner_id" ref="base.res_partner_10"/>
|
||||
<field eval=""2"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field eval=""Bad time, will call back"" name="name"/>
|
||||
<field eval=""done"" name="state"/>
|
||||
<field name="section_id" ref="crm_configuration.section_support_phone"/>
|
||||
<field eval=""(820) 167-3208"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm_configuration.categ_phone1"/>
|
||||
<field name="stage_id" ref="crm_configuration.stage_phone3"/>
|
||||
<field eval=""(079) 681-2139"" name="partner_phone"/>
|
||||
<field eval=""contact@tecsas.fr"" name="email_from"/>
|
||||
</record>
|
||||
<record id="crm_case_phone04" model="crm.case">
|
||||
<field eval="time.strftime('%Y-%m-21 14:10:23')" name="date"/>
|
||||
<field name="partner_id" ref="base.res_partner_tinyatwork"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""Discuss Review Process"" name="name"/>
|
||||
<field eval=""draft"" name="state"/>
|
||||
<field name="section_id" ref="crm_configuration.section_support_phone"/>
|
||||
<field eval=""(077) 582-4035"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm_configuration.categ_phone2"/>
|
||||
<field name="stage_id" ref="crm_configuration.stage_phone1"/>
|
||||
<field eval=""(514) 698-4118"" name="partner_phone"/>
|
||||
</record>
|
||||
<record id="crm_case_phone05" model="crm.case">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_10"/>
|
||||
<field eval="time.strftime('%Y-%m-28 16:20:43')" name="date"/>
|
||||
<field name="partner_id" ref="base.res_partner_5"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""More information on the proposed deal"" name="name"/>
|
||||
<field eval=""pending"" name="state"/>
|
||||
<field name="section_id" ref="crm_configuration.section_support_phone"/>
|
||||
<field eval=""(333) 715-1450"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm_configuration.categ_phone2"/>
|
||||
<field name="stage_id" ref="crm_configuration.stage_phone2"/>
|
||||
<field eval=""(855) 924-4364"" name="partner_phone"/>
|
||||
</record>
|
||||
<record id="crm_case_phone06" model="crm.case">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_1"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="partner_id" ref="base.res_partner_9"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""Bad time"" name="name"/>
|
||||
<field eval=""cancel"" name="state"/>
|
||||
<field name="section_id" ref="crm_configuration.section_support_phone"/>
|
||||
<field eval=""(468) 017-2684"" name="partner_mobile"/>
|
||||
<field eval="time.strftime('%Y-%m-28 14:15:30')" name="date"/>
|
||||
<field name="categ_id" ref="crm_configuration.categ_phone2"/>
|
||||
<field name="stage_id" ref="crm_configuration.stage_phone3"/>
|
||||
<field eval=""(373) 907-1009"" name="partner_phone"/>
|
||||
<field eval=""info@opensides.be"" name="email_from"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -0,0 +1,316 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<act_window
|
||||
id="crm_case_categ_phone_create_partner"
|
||||
name="New Phone Call"
|
||||
res_model="crm.case"
|
||||
src_model="res.partner"
|
||||
view_mode="calendar,tree,form"
|
||||
context="{'default_partner_id': active_id, 'default_duration': 1.0}"
|
||||
domain="[('section_id','=','Phone Calls')]"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_categ_phone_create_partner">
|
||||
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+')]'"/>
|
||||
</record>
|
||||
######################## PHONE CALLS (menu) ###########################
|
||||
<record model="ir.actions.act_window" id="crm_case_categ_phone0">
|
||||
<field name="name">Phone Calls</field>
|
||||
<field name="res_model">crm.case</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+')]'"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone0">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone0"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_phone0">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_calendar_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone0"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_form_phone0">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_case_phone_form_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone0"/>
|
||||
</record>
|
||||
<menuitem name="Phone Calls" id="menu_crm_case_phone" parent="crm.menu_crm" action="crm_case_categ_phone0"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_categ_phone_incoming0">
|
||||
<field name="name">Inbound</field>
|
||||
<field name="res_model">crm.case</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+'), (\'categ_id\',\'=\','+str(ref('categ_phone1'))+')]'"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_incoming0">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_incoming0"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_phone_incoming0">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_calendar_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_incoming0"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_form_phone_incoming0">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_case_phone_form_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_incoming0"/>
|
||||
</record>
|
||||
<menuitem name="Inbound" id="menu_crm_case_categ_phone_incoming0" parent="menu_crm_case_phone" action="crm_case_categ_phone_incoming0"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_categ_phone_incoming1">
|
||||
<field name="name">New Incoming Call</field>
|
||||
<field name="res_model">crm.case</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_phone_form_view"/>
|
||||
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+'), (\'categ_id\',\'=\','+str(ref('categ_phone1'))+')]'"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_incoming1">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_incoming1"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_form_phone_incoming1">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_case_phone_form_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_incoming1"/>
|
||||
</record>
|
||||
<menuitem name="New Incoming Call" id="menu_crm_case_categ_phone_incoming1" parent="menu_crm_case_categ_phone_incoming0" action="crm_case_categ_phone_incoming1"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_categ_phone_incoming2">
|
||||
<field name="name">Planned Calls</field>
|
||||
<field name="res_model">crm.case</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+'), (\'categ_id\',\'=\','+str(ref('categ_phone1'))+'), (\'stage_id\',\'=\','+str(ref('stage_phone1'))+')]'"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_incoming2">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_incoming2"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_phone_incoming2">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_calendar_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_incoming2"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_form_phone_incoming2">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_case_phone_form_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_incoming2"/>
|
||||
</record>
|
||||
<menuitem name="Planned Calls" id="menu_crm_case_categ_phone_incoming2" parent="menu_crm_case_categ_phone_incoming0" action="crm_case_categ_phone_incoming2"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_categ_phone_incoming3">
|
||||
<field name="name">Calls Held</field>
|
||||
<field name="res_model">crm.case</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+'), (\'categ_id\',\'=\','+str(ref('categ_phone1'))+'), (\'stage_id\',\'=\','+str(ref('stage_phone2'))+')]'"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_incoming3">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_incoming3"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_phone_incoming3">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_calendar_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_incoming3"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_form_phone_incoming3">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_case_phone_form_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_incoming3"/>
|
||||
</record>
|
||||
<menuitem name="Calls Held" id="menu_crm_case_categ_phone_incoming3" parent="menu_crm_case_categ_phone_incoming0" action="crm_case_categ_phone_incoming3"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_categ_phone_incoming4">
|
||||
<field name="name">Calls Not Held</field>
|
||||
<field name="res_model">crm.case</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+'), (\'categ_id\',\'=\','+str(ref('categ_phone1'))+'), (\'stage_id\',\'=\','+str(ref('stage_phone3'))+')]'"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_incoming4">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_incoming4"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_phone_incoming4">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_calendar_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_incoming4"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_form_phone_incoming4">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_case_phone_form_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_incoming4"/>
|
||||
</record>
|
||||
<menuitem name="Calls Not Held" id="menu_crm_case_categ_phone_incoming4" parent="menu_crm_case_categ_phone_incoming0" action="crm_case_categ_phone_incoming4"/>
|
||||
|
||||
################################################################
|
||||
<record model="ir.actions.act_window" id="crm_case_categ_phone_outgoing0">
|
||||
<field name="name">Outbound</field>
|
||||
<field name="res_model">crm.case</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+'), (\'categ_id\',\'=\','+str(ref('categ_phone2'))+')]'"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_outgoing0">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_outgoing0"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_phone_outgoing0">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_calendar_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_outgoing0"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_form_phone_outgoing0">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_case_phone_form_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_outgoing0"/>
|
||||
</record>
|
||||
<menuitem name="Outbound" id="menu_crm_case_categ_phone_outgoing0" parent="menu_crm_case_phone" action="crm_case_categ_phone_outgoing0"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_categ_phone_outgoing1">
|
||||
<field name="name">New Outgoing Call</field>
|
||||
<field name="res_model">crm.case</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_phone_form_view"/>
|
||||
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+'), (\'categ_id\',\'=\','+str(ref('categ_phone2'))+')]'"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_outgoing1">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_outgoing1"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_form_phone_outgoing1">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_case_phone_form_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_outgoing1"/>
|
||||
</record>
|
||||
<menuitem name="New Outgoing Call" id="menu_crm_case_categ_phone_outgoing1" parent="menu_crm_case_categ_phone_outgoing0" action="crm_case_categ_phone_outgoing1"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_categ_phone_outgoing2">
|
||||
<field name="name">Planned Calls</field>
|
||||
<field name="res_model">crm.case</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+'), (\'categ_id\',\'=\','+str(ref('categ_phone2'))+'), (\'stage_id\',\'=\','+str(ref('stage_phone1'))+')]'"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_outgoing2">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_outgoing2"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_phone_outgoing2">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_calendar_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_outgoing2"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_form_phone_outgoing2">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_case_phone_form_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_outgoing2"/>
|
||||
</record>
|
||||
<menuitem name="Planned Calls" id="menu_crm_case_categ_phone_outgoing2" parent="menu_crm_case_categ_phone_outgoing0" action="crm_case_categ_phone_outgoing2"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_categ_phone_outgoing3">
|
||||
<field name="name">Calls Held</field>
|
||||
<field name="res_model">crm.case</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+'), (\'categ_id\',\'=\','+str(ref('categ_phone2'))+'), (\'stage_id\',\'=\','+str(ref('stage_phone2'))+')]'"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_outgoing3">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_outgoing3"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_phone_outgoing3">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_calendar_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_outgoing3"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_form_phone_outgoing3">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_case_phone_form_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_outgoing3"/>
|
||||
</record>
|
||||
<menuitem name="Calls Held" id="menu_crm_case_categ_phone_outgoing3" parent="menu_crm_case_categ_phone_outgoing0" action="crm_case_categ_phone_outgoing3"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_categ_phone_outgoing4">
|
||||
<field name="name">Calls Not Held</field>
|
||||
<field name="res_model">crm.case</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+'), (\'categ_id\',\'=\','+str(ref('categ_phone2'))+'), (\'stage_id\',\'=\','+str(ref('stage_phone3'))+')]'"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_outgoing4">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_outgoing4"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_phone_outgoing4">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_calendar_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_outgoing4"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_form_phone_outgoing4">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_case_phone_form_view"/>
|
||||
<field name="act_window_id" ref="crm_case_categ_phone_outgoing4"/>
|
||||
</record>
|
||||
<menuitem name="Calls Not Held" id="menu_crm_case_categ_phone_outgoing4" parent="menu_crm_case_categ_phone_outgoing0" action="crm_case_categ_phone_outgoing4"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -0,0 +1,137 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
# ------------------------------------------------------
|
||||
# Phone Calls
|
||||
# ------------------------------------------------------
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_phone_tree_view">
|
||||
<field name="name">CRM - Phone Calls Tree</field>
|
||||
<field name="model">crm.case</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Phone Calls" colors="red:state=='open'">
|
||||
<field name="id"/>
|
||||
<field name="name" string="Subject"/>
|
||||
<field name="categ_id" string="Direction" select="1"/>
|
||||
<field name="partner_id" string="Related to"/>
|
||||
<field name="date" string="Start Date"/>
|
||||
<field name="partner_address_id" string="Contact"/>
|
||||
<field name="user_id" string="Assigned to"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_phone_form_view">
|
||||
<field name="name">CRM - Phone Call Form</field>
|
||||
<field name="model">crm.case</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Claims">
|
||||
<group colspan="4" col="6">
|
||||
<field name="name" string="Subject"/>
|
||||
<field name="section_id" colspan="1"/>
|
||||
<newline/>
|
||||
<field name="date" string="Start Date & Time"/>
|
||||
<field name="duration"/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="General">
|
||||
<field name="partner_id" string="Related to"/>
|
||||
<field name="partner_address_id" string="Contact" on_change="onchange_partner_address_id(partner_address_id, email_from)" colspan="1"/>
|
||||
<newline/>
|
||||
<field name="partner_phone"/>
|
||||
<field name="partner_mobile"/>
|
||||
<newline/>
|
||||
<field name="email_from"/>
|
||||
<field name="user_id" string="Assigned to" select="2"/>
|
||||
<field name="priority"/>
|
||||
<field name="active" string="Reminder"/>
|
||||
<separator colspan="4"/>
|
||||
<field name="categ_id" string="Direction" select="1" on_change="onchange_categ_id(categ_id)"/>
|
||||
<field name="stage_id"/>
|
||||
<separator string= "Description" colspan="4"/>
|
||||
<field name="note" nolabel="1" colspan="4"/>
|
||||
<separator colspan="4"/>
|
||||
<group col="8" colspan="4">
|
||||
<field name="state" select="1"/>
|
||||
<button name="case_close" string="Done" states="open,draft,pending" type="object"/>
|
||||
<button name="case_open" string="Open" states="draft,pending" type="object"/>
|
||||
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object"/>
|
||||
<button name="case_pending" string="Pending" states="draft,open" type="object"/>
|
||||
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Extra Info">
|
||||
<field name="id" colspan="4"/>
|
||||
<field name="email_cc"/>
|
||||
<field name="canal_id"/>
|
||||
<separator colspan="4" string="Dates"/>
|
||||
<field name="create_date"/>
|
||||
<field name="date_closed"/>
|
||||
<field name="date_action_last"/>
|
||||
<field name="date_action_next"/>
|
||||
<separator colspan="4"/>
|
||||
<field name="history_line" colspan="2" nolabel="1" mode="tree,form">
|
||||
<form string="Communication history">
|
||||
<group col="6" colspan="4">
|
||||
<field name="date"/>
|
||||
<field name="email"/>
|
||||
<field name="canal_id"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<field name="description" colspan="4" nolabel="1"/>
|
||||
</form>
|
||||
<tree string="Communication history">
|
||||
<field name="description"/>
|
||||
<field name="email"/>
|
||||
<field name="date"/>
|
||||
</tree>
|
||||
</field>
|
||||
<group col="2" colspan="2" expand="1">
|
||||
<field name="som"/>
|
||||
<button name="add_reply" string="Add Last Mail for Replying"
|
||||
states="open" type="object" colspan="2"/>
|
||||
<field name="description" colspan="2" nolabel="1"/>
|
||||
<button name="case_log_reply"
|
||||
string="Send Partner & Historize" states="open"
|
||||
type="object"/>
|
||||
<button name="case_log" string="Historize" states="open"
|
||||
type="object"/>
|
||||
</group>
|
||||
<separator colspan="4" string="References"/>
|
||||
<field name="ref" colspan="4"/>
|
||||
<field name="ref2" colspan="4"/>
|
||||
</page>
|
||||
<page string="History">
|
||||
<field name="log_ids" nolabel="1" colspan="4">
|
||||
<form string="Actions">
|
||||
<separator string="Action Information" colspan="4"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="date"/>
|
||||
<field name="user_id"/>
|
||||
<field name="som"/>
|
||||
<field name="canal_id"/>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_phone_calendar_view">
|
||||
<field name="name">CRM - Phone Calls Calendar</field>
|
||||
<field name="model">crm.case</field>
|
||||
<field name="type">calendar</field>
|
||||
<field name="priority" eval="2"/>
|
||||
<field name="arch" type="xml">
|
||||
<calendar string="Phone Calls" date_start="date" color="user_id" date_delay="duration">
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="categ_id"/>
|
||||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Purchases by products by month -->
|
||||
|
||||
<!-- Purchases by products by month -->
|
||||
<record id="view_order_product_form" model="ir.ui.view">
|
||||
<field name="name">report.purchase.order.product.form</field>
|
||||
<field name="model">report.purchase.order.product</field>
|
||||
@@ -19,7 +19,20 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_product_month_graph">
|
||||
<field name="name">product.month.graph</field>
|
||||
<field name="model">report.purchase.order.product</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Purchases by products" type="bar">
|
||||
<field name="product_id"/>
|
||||
<field name="quantity" operator="+"/>
|
||||
<field name="price_total" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_order_product_tree" model="ir.ui.view">
|
||||
<field name="name">report.purchase.order.product.tree</field>
|
||||
<field name="model">report.purchase.order.product</field>
|
||||
@@ -36,12 +49,12 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="action_order_product_tree" model="ir.actions.act_window">
|
||||
<field name="name">Purchases by Products (this month)</field>
|
||||
<field name="res_model">report.purchase.order.product</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="domain">[('name','=',time.strftime('%Y-%m-01'))]</field>
|
||||
</record>
|
||||
<menuitem id="next_id_73" name="Reporting" parent="purchase.menu_purchase_root"/><menuitem id="next_id_74" name="This Month" parent="next_id_73"/><menuitem action="action_order_product_tree" id="menu_report_order_product" parent="next_id_74"/>
|
||||
@@ -49,12 +62,12 @@
|
||||
<field name="name">Purchases by Products</field>
|
||||
<field name="res_model">report.purchase.order.product</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
</record>
|
||||
<menuitem id="next_id_75" name="All Months" parent="report_purchase.next_id_73"/><menuitem action="action_order_product_tree_all" id="menu_report_order_product_all" parent="next_id_75"/>
|
||||
|
||||
|
||||
<!-- Purchases by category by month -->
|
||||
|
||||
|
||||
<record id="view_order_category_form" model="ir.ui.view">
|
||||
<field name="name">report.purchase.order.category.form</field>
|
||||
<field name="model">report.purchase.order.category</field>
|
||||
@@ -71,7 +84,20 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_product_category_graph">
|
||||
<field name="name">product.category.graph</field>
|
||||
<field name="model">report.purchase.order.category</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Purchases by Category of Products" type="bar">
|
||||
<field name="category_id"/>
|
||||
<field name="quantity" operator="+"/>
|
||||
<field name="price_total" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_order_category_tree" model="ir.ui.view">
|
||||
<field name="name">report.purchase.order.category.tree</field>
|
||||
<field name="model">report.purchase.order.category</field>
|
||||
@@ -88,12 +114,12 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="action_order_category_tree" model="ir.actions.act_window">
|
||||
<field name="name">Purchases by Category of Product (this month)</field>
|
||||
<field name="res_model">report.purchase.order.category</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="domain">[('name','=',time.strftime('%Y-%m-01'))]</field>
|
||||
</record>
|
||||
<menuitem action="action_order_category_tree" id="menu_report_order_category" parent="report_purchase.next_id_74"/>
|
||||
@@ -101,13 +127,13 @@
|
||||
<field name="name">Purchases by Category of Products</field>
|
||||
<field name="res_model">report.purchase.order.category</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
</record>
|
||||
<menuitem action="action_order_category_tree_all" id="menu_report_order_category_all" parent="report_purchase.next_id_75"/>
|
||||
|
||||
|
||||
<act_window domain="[('product_id', '=', active_id)]" id="act_product_product_2_report_purchases_order_product" name="Monthly purchases" res_model="report.purchase.order.product" src_model="product.product"/>
|
||||
|
||||
|
||||
<act_window domain="[('category_id', '=', active_id)]" id="act_product_category_2_report_purchase_order_category" name="Monthly purchases" res_model="report.purchase.order.category" src_model="product.category"/>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
Reference in New Issue
Block a user