[Merged] stable and trunk addons

bzr revid: hda@tinyerp.com-20090924104621-7p53erkfs9xa0bev
This commit is contained in:
HDA (OpenERP) 2009-09-24 16:16:21 +05:30
parent 19990c15ba
commit 7d3a5b51ba
181 changed files with 5364 additions and 2370 deletions

View File

@ -35,9 +35,7 @@
Customer and Supplier Invoices
Bank statements
""",
'author': 'Tiny',
'website': 'http://www.openerp.com',
'depends': ['product', 'base', 'process'],
'init_xml': [],
'update_xml': [
'security/account_security.xml',

View File

@ -2152,7 +2152,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
for key,value in todo_dict.items():
if value['account_collected_id'] or value['account_paid_id']:
obj_acc_tax.write(cr, uid, [key], vals={
obj_acc_tax.write(cr, uid, [key], {
'account_collected_id': acc_template_ref[value['account_collected_id']],
'account_paid_id': acc_template_ref[value['account_paid_id']],
})

View File

@ -124,7 +124,7 @@ class account_bank_statement(osv.osv):
states={'confirm':[('readonly', True)]}),
'move_line_ids': fields.one2many('account.move.line', 'statement_id',
'Entry lines', states={'confirm':[('readonly',True)]}),
'state': fields.selection([('draft', 'Draft'),('confirm', 'Confirm')],
'state': fields.selection([('draft', 'Draft'),('confirm', 'Confirmed')],
'State', required=True,
states={'confirm': [('readonly', True)]}, readonly="1"),
'currency': fields.function(_currency, method=True, string='Currency',
@ -157,7 +157,7 @@ class account_bank_statement(osv.osv):
if not st.state=='draft':
continue
if not (abs(st.balance_end - st.balance_end_real) < 0.0001):
if not (abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001):
raise osv.except_osv(_('Error !'),
_('The statement balance is incorrect !\n') +
_('The expected balance (%.2f) is different than the computed one. (%.2f)') % (st.balance_end_real, st.balance_end))
@ -578,11 +578,13 @@ class account_bank_statement_line(osv.osv):
'note': fields.text('Notes'),
'reconcile_amount': fields.function(_reconcile_amount,
string='Amount reconciled', method=True, type='float'),
'sequence': fields.integer('Sequence'),
}
_defaults = {
'name': lambda self,cr,uid,context={}: self.pool.get('ir.sequence').get(cr, uid, 'account.bank.statement.line'),
'date': lambda *a: time.strftime('%Y-%m-%d'),
'type': lambda *a: 'general',
'sequence': lambda *a: 10,
}
account_bank_statement_line()

View File

@ -179,7 +179,7 @@
</field>
</group>
<group col="4" colspan="2">
<button colspan="2" name="button_reset_taxes" states="draft" string="Compute Taxes" type="object"/>
<button colspan="2" name="button_reset_taxes" states="draft" string="Compute Taxes" type="object" icon="gtk-execite"/>
<field name="amount_untaxed"/>
<label string="" colspan="2"/>
<field name="amount_tax"/>
@ -188,7 +188,7 @@
<field name="state" select="2"/>
<field name="residual"/>
<group col="3" colspan="4">
<button name="invoice_open" states="draft,proforma2" string="Validate" icon="gtk-execute"/>
<button name="invoice_open" states="draft,proforma2" string="Validate" icon="gtk-apply"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
<button name='%(wizard_paid_open)d' type='action' string='Re-Open' states='paid' icon="gtk-convert"/>
@ -269,7 +269,7 @@
</field>
</group>
<group col="4" colspan="2">
<button colspan="2" name="button_reset_taxes" states="draft" string="Compute Taxes" type="object" groups="base.group_user"/>
<button colspan="2" name="button_reset_taxes" states="draft" string="Compute Taxes" type="object" groups="base.group_user" icon="gtk-apply"/>
<field name="amount_untaxed"/>
<label string="" colspan="2"/>
<field name="amount_tax"/>
@ -318,6 +318,29 @@
</field>
</record>
<record id="view_account_invoice_filter" model="ir.ui.view">
<field name="name">account.invoice.select</field>
<field name="model">account.invoice</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Invoice">
<group col='6' colspan='4'>
<field name="type">
<filter icon="terp-account" domain="[('type','=','out_invoice')]" help="Customer Invoices"/>
<filter icon="terp-account" domain="[('type','=','in_invoice')]" help="Supplier Invoices"/>
</field>
<separator orientation="vertical"/>
<field name="state">
<filter icon="terp-account" domain="[('state','=','open')]" help="Open Invoices"/>
<filter icon="terp-account" domain="[('state','=','paid')]" help="Paid Invoices"/>
</field>
<separator orientation="vertical"/>
<field name="name" select='1'/>
</group>
</search>
</field>
</record>
<record id="action_invoice_tree" model="ir.actions.act_window">
<field name="name">Invoices</field>
<field name="res_model">account.invoice</field>
@ -325,6 +348,7 @@
<field name="view_mode">tree,form,calendar,graph</field>
<field name="view_id" ref="invoice_tree"/>
<field name="context">{'type':'out_invoice'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
</record>
<record id="action_invoice_tree_view1" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
@ -347,6 +371,7 @@
<field eval="False" name="view_id"/>
<field name="domain">[('type','=','out_invoice')]</field>
<field name="context">{'type':'out_invoice'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
</record>
<record id="action_invoice_tree1_view1" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
@ -369,7 +394,7 @@
<field name="domain">[('type','=','out_invoice')]</field>
<field name="context">{'type':'out_invoice'}</field>
</record>
<menuitem action="action_invoice_tree1_new" id="menu_action_invoice_tree1_new" parent="menu_action_invoice_tree1"/>
<menuitem action="action_invoice_tree1_new" sequence="50" id="menu_action_invoice_tree1_new" parent="menu_action_invoice_tree1"/>
<record id="action_invoice_tree2" model="ir.actions.act_window">
<field name="name">Supplier Invoices</field>
@ -379,6 +404,7 @@
<field eval="False" name="view_id"/>
<field name="domain">[('type','=','in_invoice')]</field>
<field name="context">{'type':'in_invoice'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
</record>
<menuitem action="action_invoice_tree2" id="menu_action_invoice_tree2" parent="account.menu_finance_invoice"/>
<record id="action_invoice_tree2_new" model="ir.actions.act_window">
@ -390,7 +416,7 @@
<field name="domain">[('type','=','in_invoice')]</field>
<field name="context">{'type':'in_invoice'}</field>
</record>
<menuitem action="action_invoice_tree2_new" id="menu_action_invoice_tree2_new" parent="menu_action_invoice_tree2"/>
<menuitem action="action_invoice_tree2_new" sequence="50" id="menu_action_invoice_tree2_new" parent="menu_action_invoice_tree2"/>
<record id="action_invoice_tree3" model="ir.actions.act_window">
<field name="name">Customer Refunds</field>
@ -400,6 +426,7 @@
<field eval="False" name="view_id"/>
<field name="domain">[('type','=','out_refund')]</field>
<field name="context">{'type':'out_refund'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
</record>
<menuitem action="action_invoice_tree3" id="menu_action_invoice_tree3" parent="account.menu_finance_invoice"/>
@ -412,7 +439,7 @@
<field name="domain">[('type','=','out_refund')]</field>
<field name="context">{'type':'out_refund'}</field>
</record>
<menuitem action="action_invoice_tree3_new" id="menu_action_invoice_tree3_new" parent="menu_action_invoice_tree3"/>
<menuitem action="action_invoice_tree3_new" sequence="50" id="menu_action_invoice_tree3_new" parent="menu_action_invoice_tree3"/>
<record id="action_invoice_tree4" model="ir.actions.act_window">
<field name="name">Supplier Refunds</field>
@ -422,6 +449,7 @@
<field eval="False" name="view_id"/>
<field name="domain">[('type','=','in_refund')]</field>
<field name="context">{'type':'in_refund'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
</record>
<menuitem action="action_invoice_tree4" id="menu_action_invoice_tree4" parent="account.menu_finance_invoice"/>
@ -434,7 +462,7 @@
<field name="domain">[('type','=','in_refund')]</field>
<field name="context">{'type':'in_refund'}</field>
</record>
<menuitem action="action_invoice_tree4_new" id="menu_action_invoice_tree4_new" parent="menu_action_invoice_tree4"/>
<menuitem action="action_invoice_tree4_new" sequence="50" id="menu_action_invoice_tree4_new" parent="menu_action_invoice_tree4"/>
<record id="action_invoice_tree5" model="ir.actions.act_window">
@ -444,6 +472,8 @@
<field name="view_mode">tree,form,calendar,graph</field>
<field name="domain">[('state','=','draft'),('type','=','out_invoice')]</field>
<field name="context">{'type':'out_invoice'}</field>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="view_account_invoice_filter"/>
</record>
<record id="action_invoice_tree5_view1" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
@ -457,7 +487,7 @@
<field name="act_window_id" ref="action_invoice_tree5"/>
</record>
<menuitem action="action_invoice_tree5" id="menu_invoice_draft" parent="menu_action_invoice_tree1"/>
<menuitem action="action_invoice_tree5" id="menu_invoice_draft" parent="menu_action_invoice_tree1" groups="base.group_extended_menu"/>
<record id="action_invoice_tree6" model="ir.actions.act_window">
<field name="name">PRO-FORMA Customer Invoices</field>
@ -466,6 +496,8 @@
<field name="view_mode">tree,form,calendar,graph</field>
<field name="domain">[('state','=','proforma2'),('type','=','out_invoice')]</field>
<field name="context">{'type':'out_invoice'}</field>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="view_account_invoice_filter"/>
</record>
<record id="action_invoice_tree6_view1" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
@ -479,7 +511,7 @@
<field name="act_window_id" ref="action_invoice_tree6"/>
</record>
<menuitem action="action_invoice_tree6" id="menu_action_invoice_tree6" parent="menu_action_invoice_tree1"/>
<menuitem action="action_invoice_tree6" id="menu_action_invoice_tree6" parent="menu_action_invoice_tree1" groups="base.group_extended_menu"/>
<record id="action_invoice_tree7" model="ir.actions.act_window">
<field name="name">Unpaid Customer Invoices</field>
@ -488,6 +520,8 @@
<field name="view_mode">tree,form,calendar,graph</field>
<field name="domain">[('state','not in',['draft','cancel']),('reconciled','=',False),('type','=','out_invoice')]</field>
<field name="context">{'type':'out_invoice'}</field>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="view_account_invoice_filter"/>
</record>
<record id="action_invoice_tree7_view1" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
@ -501,7 +535,7 @@
<field name="act_window_id" ref="action_invoice_tree7"/>
</record>
<menuitem action="action_invoice_tree7" id="menu_action_invoice_tree7" parent="menu_action_invoice_tree1"/>
<menuitem action="action_invoice_tree7" id="menu_action_invoice_tree7" parent="menu_action_invoice_tree1" groups="base.group_extended_menu"/>
<record id="action_invoice_tree8" model="ir.actions.act_window">
<field name="name">Draft Supplier Invoices</field>
@ -510,6 +544,8 @@
<field name="view_mode">tree,form,calendar,graph</field>
<field name="domain">[('state','=','draft'),('type','=','in_invoice')]</field>
<field name="context">{'type':'in_invoice'}</field>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="view_account_invoice_filter"/>
</record>
<record id="action_invoice_tree8_view1" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
@ -523,7 +559,7 @@
<field name="act_window_id" ref="action_invoice_tree8"/>
</record>
<menuitem action="action_invoice_tree8" id="menu_action_invoice_tree8" parent="menu_action_invoice_tree2"/>
<menuitem action="action_invoice_tree8" id="menu_action_invoice_tree8" parent="menu_action_invoice_tree2" groups="base.group_extended_menu"/>
<record id="action_invoice_tree9" model="ir.actions.act_window">
<field name="name">Unpaid Supplier Invoices</field>
@ -532,6 +568,8 @@
<field name="view_mode">tree,form,calendar,graph</field>
<field name="domain">[('state','not in',['draft','cancel']),('reconciled','=',False),('type','=','in_invoice')]</field>
<field name="context">{'type':'in_invoice'}</field>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="view_account_invoice_filter"/>
</record>
<record id="action_invoice_tree9_view1" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
@ -545,7 +583,7 @@
<field name="act_window_id" ref="action_invoice_tree9"/>
</record>
<menuitem action="action_invoice_tree9" id="menu_action_invoice_tree9" parent="menu_action_invoice_tree2"/>
<menuitem action="action_invoice_tree9" id="menu_action_invoice_tree9" parent="menu_action_invoice_tree2" groups="base.group_extended_menu"/>
<record id="action_invoice_tree10" model="ir.actions.act_window">
<field name="name">Draft Customer Refunds</field>
@ -554,6 +592,8 @@
<field name="view_mode">tree,form,calendar,graph</field>
<field name="domain">[('state','=','draft'),('type','=','out_refund')]</field>
<field name="context">{'type':'out_refund'}</field>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="view_account_invoice_filter"/>
</record>
<record id="action_invoice_tree10_view1" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
@ -567,7 +607,7 @@
<field name="act_window_id" ref="action_invoice_tree10"/>
</record>
<menuitem action="action_invoice_tree10" id="menu_action_invoice_tree10" parent="menu_action_invoice_tree3"/>
<menuitem action="action_invoice_tree10" id="menu_action_invoice_tree10" parent="menu_action_invoice_tree3" groups="base.group_extended_menu"/>
<record id="action_invoice_tree11" model="ir.actions.act_window">
<field name="name">Unpaid Customer Refunds</field>
@ -576,6 +616,8 @@
<field name="view_mode">tree,form,calendar,graph</field>
<field name="domain">[('state','not in',['draft','cancel']),('reconciled','=',False),('type','=','out_refund')]</field>
<field name="context">{'type':'out_refund'}</field>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="view_account_invoice_filter"/>
</record>
<record id="action_invoice_tree11_view1" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
@ -589,7 +631,7 @@
<field name="act_window_id" ref="action_invoice_tree11"/>
</record>
<menuitem action="action_invoice_tree11" id="menu_action_invoice_tree11" parent="menu_action_invoice_tree3"/>
<menuitem action="action_invoice_tree11" id="menu_action_invoice_tree11" parent="menu_action_invoice_tree3" groups="base.group_extended_menu"/>
<record id="action_invoice_tree12" model="ir.actions.act_window">
<field name="name">Draft Supplier Refunds</field>
@ -598,6 +640,8 @@
<field name="view_mode">tree,form,calendar,graph</field>
<field name="domain">[('state','=','draft'),('type','=','in_refund')]</field>
<field name="context">{'type':'in_refund'}</field>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="view_account_invoice_filter"/>
</record>
<record id="action_invoice_tree12_view1" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
@ -611,7 +655,7 @@
<field name="act_window_id" ref="action_invoice_tree12"/>
</record>
<menuitem action="action_invoice_tree12" id="menu_action_invoice_tree12" parent="menu_action_invoice_tree4"/>
<menuitem action="action_invoice_tree12" id="menu_action_invoice_tree12" parent="menu_action_invoice_tree4" groups="base.group_extended_menu"/>
<record id="action_invoice_tree13" model="ir.actions.act_window">
<field name="name">Unpaid Supplier Refunds</field>
@ -620,6 +664,8 @@
<field name="view_mode">tree,form,calendar,graph</field>
<field name="domain">[('state','not in',['draft','cancel']),('reconciled','=',False),('type','=','in_refund')]</field>
<field name="context">{'type':'in_refund'}</field>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="view_account_invoice_filter"/>
</record>
<record id="action_invoice_tree13_view1" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
@ -633,7 +679,7 @@
<field name="act_window_id" ref="action_invoice_tree13"/>
</record>
<menuitem action="action_invoice_tree13" id="menu_action_invoice_tree13" parent="menu_action_invoice_tree4"/>
<menuitem action="action_invoice_tree13" id="menu_action_invoice_tree13" parent="menu_action_invoice_tree4" groups="base.group_extended_menu"/>
<act_window domain="[('partner_id','=',active_id)]" id="act_res_partner_2_account_invoice_opened" name="Invoices" res_model="account.invoice" src_model="res.partner"/>

View File

@ -659,8 +659,8 @@ class account_move_line(osv.osv):
return j+(p and (':'+p) or '')
return False
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False):
result = super(osv.osv, self).fields_view_get(cr, uid, view_id,view_type,context,toolbar=toolbar)
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False):
result = super(osv.osv, self).fields_view_get(cr, uid, view_id,view_type,context,toolbar=toolbar, submenu=submenu)
if view_type=='tree' and 'journal_id' in context:
title = self.view_header_get(cr, uid, view_id, view_type, context)
journal = self.pool.get('account.journal').browse(cr, uid, context['journal_id'])

View File

@ -30,8 +30,8 @@
<separator colspan="4" string="States"/>
<field name="state" select="1" readonly="1"/>
<group col="2" colspan="2">
<button name="create_period" states="draft" string="Create Monthly Periods" type="object"/>
<button name="create_period3" states="draft" string="Create 3 Months Periods" type="object"/>
<button name="create_period" states="draft" string="Create Monthly Periods" type="object" icon="gtk-dnd"/>
<button name="create_period3" states="draft" string="Create 3 Months Periods" type="object" icon="gtk-dnd"/>
</group>
</form>
</field>
@ -78,7 +78,7 @@
<field name="special"/>
<separator colspan="4" string="States"/>
<field name="state" select="1"/>
<button name="action_draft" states="done" string="Set to Draft" type="object"/>
<button name="action_draft" states="done" string="Set to Draft" type="object" icon="gtk-convert"/>
</form>
</field>
</record>
@ -323,7 +323,7 @@
<field name="period_id" select="2"/>
<group colspan="2" col="3">
<button name="%(wizard_populate_statement_from_inv)d"
string="Import Invoice" type="action" attrs="{'invisible':[('state','=','confirm')]}"/>
string="Import Invoice" type="action" attrs="{'invisible':[('state','=','confirm')]}" icon="gtk-open"/>
</group>
<newline/>
<field name="balance_start"/>
@ -332,6 +332,7 @@
<page string="Entry encoding">
<field colspan="4" name="line_ids" nolabel="1">
<tree editable="bottom" string="Statement lines">
<field name="sequence"/>
<field name="date"/>
<field name="ref"/>
<field name="name"/>
@ -351,6 +352,7 @@
<field name="amount"/>
<field context="{'partner_id':partner_id,'amount':amount,'account_id':account_id,'currency_id': parent.currency,'journal_id':parent.journal_id, 'date':date}" name="reconcile_id"/>
<field name="ref"/>
<field name="sequence"/>
<separator colspan="4" string="Notes"/>
<field colspan="4" name="note" nolabel="1"/>
</form>
@ -363,9 +365,9 @@
<group col="7" colspan="4">
<field name="state" select="2"/>
<field name="balance_end"/>
<button name="button_dummy" states="draft" string="Compute"/>
<button name="button_confirm" states="draft" string="Confirm" type="object"/>
<button name="button_cancel" states="confirm" string="Cancel" type="object"/>
<button name="button_dummy" states="draft" string="Compute" icon="gtk-execute"/>
<button name="button_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
<button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
</group>
</form>
</field>
@ -384,8 +386,9 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','=','draft')]</field>
<field name="filter" eval="True"/>
</record>
<menuitem action="action_bank_statement_draft_tree" id="menu_bank_statement_draft_tree" parent="account.menu_bank_statement_tree"/>
<menuitem action="action_bank_statement_draft_tree" id="menu_bank_statement_draft_tree" parent="account.menu_bank_statement_tree" groups="base.group_extended_menu"/>
<record id="action_bank_statement_tree2" model="ir.actions.act_window">
<field name="name">New Statement</field>
@ -422,7 +425,7 @@
<field name="total_entry"/>
<field name="total_new"/>
<field name="total_balance"/>
<button colspan="2" name="dummy" string="Compute"/>
<button colspan="2" name="dummy" string="Compute" icon="gtk-execute"/>
</group>
</form>
</field>
@ -884,8 +887,8 @@
<separator colspan="4" string="State"/>
<field name="state" select="1"/>
<group col="2" colspan="2">
<button name="button_validate" states="draft" string="Validate" type="object"/>
<button name="button_cancel" states="posted" string="Cancel" type="object"/>
<button name="button_validate" states="draft" string="Validate" type="object" icon="gtk-execute"/>
<button name="button_cancel" states="posted" string="Cancel" type="object" icon="gtk-cancel"/>
</group>
</form>
</field>
@ -984,8 +987,8 @@
<group col="7" colspan="4">
<field name="state" select="2"/>
<field name="balance_end"/>
<button name="button_dummy" states="draft" string="Compute"/>
<button name="button_confirm" states="draft" string="Confirm" type="object" icon="gtk-execute"/>
<button name="button_dummy" states="draft" string="Compute" icon="gtk-execute"/>
<button name="button_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
<button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
</group>
</form>
@ -1110,7 +1113,7 @@
<separator string="Legend" colspan="4"/>
<field name="legend" colspan="4" nolabel="1"/>
<group col="1" colspan="4">
<button name="%(wizard_account_use_model)d" string="Create entries" type="action" />
<button name="%(wizard_account_use_model)d" string="Create entries" type="action" icon="gtk-execute"/>
</group>
</form>
</field>
@ -1255,8 +1258,8 @@
<field name="period_type"/>
<field name="model_id"/>
<group col="2" colspan="2">
<button name="compute" states="draft,running" string="Compute" type="object"/>
<button name="remove_line" states="running" string="Remove Lines" type="object"/>
<button name="compute" states="draft,running" string="Compute" type="object" icon="gtk-execute"/>
<button name="remove_line" states="running" string="Remove Lines" type="object" icon="gtk-remove"/>
</group>
<separator colspan="4" string="Subscription Lines"/>
<field colspan="4" name="lines_id" widget="one2many_list"/>
@ -1264,7 +1267,7 @@
<separator colspan="4" string="State"/>
<field name="state" select="2"/>
<group col="1" colspan="2">
<button name="state_draft" states="done" string="Set to Draft" type="object"/>
<button name="state_draft" states="done" string="Set to Draft" type="object" icon="gtk-convert" />
</group>
</form>
</field>
@ -1283,8 +1286,9 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','=','running')]</field>
<field name="filter" eval="True"/>
</record>
<menuitem action="action_subscription_form_running" id="menu_action_subscription_form_running" parent="menu_action_subscription_form"/>
<menuitem action="action_subscription_form_running" id="menu_action_subscription_form_running" parent="menu_action_subscription_form" groups="base.group_extended_menu"/>
<record id="action_subscription_form_new" model="ir.actions.act_window">
<field name="name">New Subscription</field>

View File

@ -34,7 +34,7 @@ class product_category(osv.osv):
string="Income Account",
method=True,
view_load=True,
help="This account will be used to value incoming stock for the current product category"),
help="This account will be used to value incoming stock(i.e. credit of incoming goods) for the current product category"),
'property_account_expense_categ': fields.property(
'account.account',
type='many2one',
@ -42,7 +42,7 @@ class product_category(osv.osv):
string="Expense Account",
method=True,
view_load=True,
help="This account will be used to value outgoing stock for the current product category"),
help="This account will be used to value outgoing stock(i.e. debit of outgoing goods) for the current product category"),
}
product_category()

View File

@ -24,7 +24,7 @@
<field name="type">tree</field>
<field name="field_parent">child_ids</field>
<field name="arch" type="xml">
<tree colors="red:date and (date&lt;=current_date)" string="Analytic account">
<tree toolbar="True" colors="red:date and (date&lt;=current_date)" string="Analytic account">
<field name="name"/>
<field name="code"/>
<field name="date"/>

View File

@ -43,9 +43,10 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="domain">[('user_id','=',uid),('state','=','open')]</field>
<field name="filter" eval="True"/>
</record>
<menuitem action="action_account_analytic_managed_open" id="menu_analytic_account_to_valid_open" parent="account_analytic_analysis.menu_analytic_account_managed"/>
<menuitem action="action_account_analytic_managed_open" id="menu_analytic_account_to_valid_open" parent="account_analytic_analysis.menu_analytic_account_managed" groups="base.group_extended_menu"/>
<record id="action_account_analytic_managed_pending" model="ir.actions.act_window">
<field name="name">My Pending Accounts</field>
@ -53,9 +54,10 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="domain">[('user_id','=',uid),('state','=','pending')]</field>
<field name="filter" eval="True"/>
</record>
<menuitem action="action_account_analytic_managed_pending" id="menu_analytic_account_to_valid_pending" parent="account_analytic_analysis.menu_analytic_account_managed"/>
<menuitem action="action_account_analytic_managed_pending" id="menu_analytic_account_to_valid_pending" parent="account_analytic_analysis.menu_analytic_account_managed" groups="base.group_extended_menu"/>
<record id="action_account_analytic_new" model="ir.actions.act_window">
<field name="name">New Analytic Account</field>
@ -101,8 +103,9 @@
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="account.view_account_analytic_account_list"/>
<field name="domain">[('state','=','open')]</field>
<field name="filter" eval="True"/>
</record>
<menuitem action="action_account_analytic_all_open" id="menu_action_account_analytic_all_open" parent="menu_action_account_analytic_all"/>
<menuitem action="action_account_analytic_all_open" id="menu_action_account_analytic_all_open" parent="menu_action_account_analytic_all" groups="base.group_extended_menu"/>
<record id="action_account_analytic_all_pending" model="ir.actions.act_window">
<field name="name">Pending Analytic Accounts</field>
@ -111,8 +114,9 @@
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="account.view_account_analytic_account_list"/>
<field name="domain">[('state','=','pending')]</field>
<field name="filter" eval="True"/>
</record>
<menuitem action="action_account_analytic_all_pending" id="menu_action_account_analytic_all_pending" parent="menu_action_account_analytic_all"/>
<menuitem action="action_account_analytic_all_pending" id="menu_action_account_analytic_all_pending" parent="menu_action_account_analytic_all" groups="base.group_extended_menu"/>
</data>
</openerp>

View File

@ -133,9 +133,9 @@ class account_analytic_plan_instance(osv.osv):
ids = self.search(cr, uid, args, limit=limit, context=context or {})
return self.name_get(cr, uid, ids, context or {})
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False):
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
wiz_id = self.pool.get('ir.actions.wizard').search(cr, uid, [("wiz_name","=","create.model")])
res = super(account_analytic_plan_instance,self).fields_view_get(cr, uid, view_id, view_type, context, toolbar)
res = super(account_analytic_plan_instance,self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
if (res['type']=='form'):
plan_id = False

View File

@ -44,9 +44,12 @@ class account_budget_post(osv.osv):
'dotation_ids': fields.one2many('account.budget.post.dotation', 'post_id', 'Spreading'),
'account_ids': fields.many2many('account.account', 'account_budget_rel', 'budget_id', 'account_id', 'Accounts'),
'crossovered_budget_line': fields.one2many('crossovered.budget.lines', 'general_budget_id', 'Budget Lines'),
'sequence': fields.integer('Sequence'),
}
_defaults = {
'sequence': lambda *a: 1,
}
_order = "sequence, name"
def spread(self, cr, uid, ids, fiscalyear_id=False, amount=0.0):
dobj = self.pool.get('account.budget.post.dotation')
@ -228,7 +231,7 @@ class crossovered_budget_lines(osv.osv):
res = {}
for line in self.browse(cr, uid, ids):
if line.theoritical_amount<>0.00:
res[line.id]=float(line.practical_amount / line.theoritical_amount)*100
res[line.id]=float(line.practical_amount or 0.0 / line.theoritical_amount)*100
else:
res[line.id]=0.00
return res

View File

@ -19,6 +19,7 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Budgetary Position">
<field name="sequence"/>
<field name="code"/>
<field name="name"/>
</tree>
@ -67,12 +68,13 @@
<form string="Budgetary Position">
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="sequence" select="2"/>
<notebook colspan="4">
<page string="Accounts">
<field name="account_ids" colspan="4" nolabel="1"/>
</page>
<page string="Dotations">
<button string="Spread" name="%(wizard_budget_spread)d" type="action"/>
<button string="Spread" name="%(wizard_budget_spread)d" type="action" icon="gtk-fullscreen"/>
<field name="dotation_ids" colspan="4" nolabel="1"/>
</page>
@ -148,10 +150,10 @@
</field>
<field name="state" select="1"/>
<group col="4" colspan="2">
<button string="Confirm" name="confirm" states="draft" type="workflow" />
<button string="Validate" name="validate" states="confirm" type="workflow"/>
<button string="Done" name="done" states="validate" type="workflow"/>
<button string="Cancel" name="cancel" states="confirm,validate" type="workflow" />
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-apply" />
<button string="Validate" name="validate" states="confirm" type="workflow" icon="gtk-ok"/>
<button string="Done" name="done" states="validate" type="workflow" icon="gtk-jump-to" />
<button string="Cancel" name="cancel" states="confirm,validate" type="workflow" icon="gtk-cancel"/>
<!--<button string="Set to Draft" name="action_set_to_draft" states="cancel" type="object"/>-->
</group>

View File

@ -96,7 +96,7 @@
<field name="date_prefered"/>
<field name="date_planned" select="1"/>
<field name="user_id" select="2"/>
<button colspan="2" name="%(wizard_populate_payment)d" string="Select Invoices to Pay" type="action" attrs="{'invisible':[('state','=','done')]}"/>
<button colspan="2" name="%(wizard_populate_payment)d" string="Select Invoices to Pay" type="action" attrs="{'invisible':[('state','=','done')]}" icon="gtk-find"/>
<field name="line_ids" colspan="4" widget="one2many_list" nolabel="1">
<form string="Payment Line">
<notebook>
@ -149,10 +149,10 @@
<field name="date_done" select="2"/>
<field name="state" readonly="1" select="1"/>
<group col="4" colspan="2">
<button name="cancel" states="draft,open" string="Cancel"/>
<button name="open" states="draft" string="Confirm Payments"/>
<button name="%(wizard_pay_payment)d" states="open" string="Make Payments" type="action"/>
<button name="set_to_draft" states="cancel" string="Set to draft" type="object"/>
<button name="cancel" states="draft,open" string="Cancel" icon="gtk-cancel"/>
<button name="open" states="draft" string="Confirm Payments" icon="gtk-apply"/>
<button name="%(wizard_pay_payment)d" states="open" string="Make Payments" type="action" icon="gtk-execute"/>
<button name="set_to_draft" states="cancel" string="Set to draft" type="object" icon="gtk-convert"/>
</group>
</form>
</field>
@ -190,8 +190,9 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','=','draft')]</field>
<field name="filter" eval="True"/>
</record>
<menuitem action="action_payment_order_draft" id="menu_action_payment_order_draft" parent="account_payment.menu_action_payment_order_form" sequence="2"/>
<menuitem action="action_payment_order_draft" id="menu_action_payment_order_draft" parent="account_payment.menu_action_payment_order_form" sequence="2" groups="base.group_extended_menu"/>
<record id="action_payment_order_open" model="ir.actions.act_window">
<field name="name">Payment Orders to Validate</field>
@ -199,8 +200,9 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','=','open')]</field>
<field name="filter" eval="True"/>
</record>
<menuitem action="action_payment_order_open" id="menu_action_payment_order_open" parent="account_payment.menu_action_payment_order_form" sequence="3"/>
<menuitem action="action_payment_order_open" id="menu_action_payment_order_open" parent="account_payment.menu_action_payment_order_form" sequence="3" groups="base.group_extended_menu"/>
<record id="action_payment_order_tree_new" model="ir.actions.act_window">
<field name="name">New Payment Order</field>
@ -291,7 +293,7 @@
<field name="inherit_id" ref="account.view_bank_statement_form"/>
<field name="arch" type="xml">
<group colspan="2" col="3" position="inside">
<button name="%(wizard_populate_statement)d" string="Import payment lines" type="action"/>
<button name="%(wizard_populate_statement)d" string="Import payment lines" type="action" icon="gtk-open"/>
</group>
</field>
</record>

View File

@ -59,9 +59,9 @@ class account_report(osv.osv):
def _calc_context(key,obj):
if key==0:
return obj.find(cr,uid,exception=False)
return obj.find(cr, uid, exception=False)
else:
obj_key=obj.browse(cr,uid,obj.find(cr,uid,exception=False))
obj_key=obj.browse(cr,uid,obj.find(cr, uid, exception=False))
if isinstance(obj_key,list):
obj_key=obj_key[0]
key_ids=obj.search(cr,uid,[('date_stop','<',obj_key.date_start)])

View File

@ -256,4 +256,4 @@ class account_account_template(osv.osv):
account_account_template()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -162,5 +162,4 @@ class rml_parse(report_sxw.rml_parse):
rml_head = rml_head.replace('<pageGraphics>','''<pageGraphics> <image x="10" y="26cm" height="770.0" width="1120.0" >[[company.logo]] </image> ''')
return True
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -248,7 +248,8 @@ class account_voucher(osv.osv):
ref = inv.reference
else:
ref = self._convert_ref(cr, uid, inv.number)
acc_id = None
date = inv.date
total_currency = 0
acc_id = None

View File

@ -76,7 +76,7 @@
</record>
<menuitem name="Object Categories" parent="auction_config_menu" action="action_auction_object_categories" id="menu_auction_object_cat"/>
=======================================================
Auction Management/Auction Dates/New Auction Dates
Auction Management/Auction Dates/New Auction Dates
=======================================================
<record model="ir.ui.view" id="view_auction_dates_tree">
<field name="name">Auction dates</field>
@ -114,7 +114,7 @@ Auction Management/Auction Dates/New Auction Dates
<field name="account_analytic_id"/>
<separator string="State" colspan="4"/>
<field name="state"/>
<button name="close" states="draft" string="Close + Create all invoices" type="object" colspan="2"/>
<button name="close" states="draft" string="Close + Create all invoices" type="object" colspan="2" icon="gtk-print"/>
</form>
</field>
</record>
@ -150,8 +150,8 @@ Auction Management/Auction Dates/New Auction Dates
=======================================================
Auction Management/Auction Dates/Reporting
=======================================================
Auction Management/Auction Dates/Reporting
=======================================================
<!-- tree1 form1 for NEW object in the deposit border -->
<record model="ir.ui.view" id="v5">
@ -287,11 +287,11 @@ Auction Management/Auction Dates/Reporting
<field name="obj_desc" colspan="4" nolabel="1" select="2"/>
<field name="state" colspan="1" select="2"/>
<group col="4" colspan="2">
<button name="button_bought" string="Sold" states="draft" type="object"/>
<button name="button_not_bought" string="Not sold" states="draft" type="object"/>
<button name="button_taken_away" string="Taken away" states="sold" type="object"/>
<button name="button_draft" string="Set to draft" states="sold,unsold" type="object"/>
<button name="button_unpaid" string="Set to draft" states="paid" type="object"/>
<button name="button_bought" string="Sold" states="draft" type="object" icon="gtk-jump-to"/>
<button name="button_not_bought" string="Not sold" states="draft" type="object" icon="gtk-undo"/>
<button name="button_taken_away" string="Taken away" states="sold" type="object" icon="gtk-goto-last"/>
<button name="button_draft" string="Set to draft" states="sold,unsold" type="object" icon="gtk-convert"/>
<button name="button_unpaid" string="Set to draft" states="paid" type="object" icon="gtk-convert"/>
</group>
</page>
@ -369,28 +369,31 @@ Auction Management/Auction Dates/Reporting
<field name="res_model">auction.lots</field>
<field name="view_type">form</field>
<field name="domain">[('state','=','sold')]</field>
<field name="filter" eval="True"/>
</record>
<menuitem name="Objects" parent="auction_menu_root" id="auction_objects_menu"/>
<menuitem name="All objects" action="action_all_objects" parent="auction_objects_menu" id="auction_all_objects_menu"/>
<menuitem name="Sold Objects" parent="auction_all_objects_menu" action="action_all_objects_sold" id="menu_all_objects_sold1"/>
<menuitem name="Sold Objects" parent="auction_all_objects_menu" action="action_all_objects_sold" id="menu_all_objects_sold1" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="action_all_objects_to_sell">
<field name="res_model">auction.lots</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','&lt;&gt;','sold')]</field>
<field name="filter" eval="True"/>
</record>
<menuitem name="Objects to sell" parent="auction_all_objects_menu" action="action_all_objects_to_sell" id="menu_all_objects_to_sell"/>
<menuitem name="Objects to sell" parent="auction_all_objects_menu" action="action_all_objects_to_sell" id="menu_all_objects_to_sell" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="action_all_objects_unplanned">
<field name="res_model">auction.lots</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('auction_id','=', False),('state','=','draft')]</field>
<field name="filter" eval="True"/>
</record>
<menuitem name="Unplanned objects" parent="auction_all_objects_menu" action="action_all_objects_unplanned" id="menu_all_objects_unplanned1"/>
<menuitem name="Unplanned objects" parent="auction_all_objects_menu" action="action_all_objects_unplanned" id="menu_all_objects_unplanned1" groups="base.group_extended_menu"/>
<!-- for the sold object start-->
@ -400,12 +403,14 @@ Auction Management/Auction Dates/Reporting
<field name="res_model">auction.lots</field>
<field name="view_type">form</field>
<field name="domain">[('state','=','unsold')]</field>
<field name="filter" eval="True"/>
</record>
<menuitem
name="Unsold Objects"
parent="auction_all_objects_menu"
action="action_all_objects_unsold"
id="menu_all_objects_unsold"/>
id="menu_all_objects_unsold"
groups="base.group_extended_menu"/>
@ -449,11 +454,11 @@ Auction Management/Auction Dates/Reporting
</field>
<field name="state" readonly="1"/>
<group colspan="2" col="4">
<button name="button_bought" string="Sold" states="draft" type="object"/>
<button name="button_not_bought" string="Not sold" states="draft" type="object"/>
<button name="button_draft" string="Set to draft" states="sold,unsold" type="object"/>
<button name="button_taken_away" string="Taken away" states="sold" type="object"/>
</group>
<button name="button_bought" string="Sold" states="draft" type="object" icon="gtk-jump-to" />
<button name="button_not_bought" string="Not sold" states="draft" type="object" icon="gtk-undo"/>
<button name="button_draft" string="Set to draft" states="sold,unsold" type="object" icon="gtk-convert"/>
<button name="button_taken_away" string="Taken away" states="sold" type="object" icon="gtk-goto-last"/>
</group>
</page>
<page string="Statements">
<field name="statement_id" domain="[('state','=','draft')]" colspan="4" nolabel="1"
@ -479,8 +484,9 @@ Auction Management/Auction Dates/Reporting
<field name="res_model">report.unclassified.objects</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="filter" eval="True"/>
</record>
<menuitem name="Unclassified objects" parent="auction_all_objects_menu" action="action_unclassified_objects" id="menu_all_objects_unclassified"/>
<menuitem name="Unclassified objects" parent="auction_all_objects_menu" action="action_unclassified_objects" id="menu_all_objects_unclassified" groups="base.group_extended_menu"/>
<record model="ir.ui.view" id="v12">
<field name="name">Auction.deposit.tree</field>

View File

@ -66,9 +66,12 @@ def _values(self,cr,uid, datas,context={}):
def _makeInvoices(self, cr, uid, data, context):
order_obj = pooler.get_pool(cr.dbname).get('auction.lots')
newinv = []
pool = pooler.get_pool(cr.dbname)
order_obj = pool.get('auction.lots')
mod_obj = pool.get('ir.model.data')
result = mod_obj._get_id(cr, uid, 'account', 'view_account_invoice_filter')
id = mod_obj.read(cr, uid, result, ['res_id'])
lots= order_obj.browse(cr,uid,data['ids'])
invoice_number=data['form']['number']
for lot in lots:
@ -84,7 +87,8 @@ def _makeInvoices(self, cr, uid, data, context):
'res_model': 'account.invoice',
'view_id': False,
'context': "{'type':'in_refund'}",
'type': 'ir.actions.act_window'
'type': 'ir.actions.act_window',
'search_view_id': id['res_id']
}
return {}

View File

@ -64,7 +64,11 @@ def _values(self,cr,uid, datas,context={}):
def _makeInvoices(self, cr, uid, data, context):
order_obj = pooler.get_pool(cr.dbname).get('auction.lots')
pool = pooler.get_pool(cr.dbname)
order_obj = pool.get('auction.lots')
mod_obj = pool.get('ir.model.data')
result = mod_obj._get_id(cr, uid, 'account', 'view_account_invoice_filter')
id = mod_obj.read(cr, uid, result, ['res_id'])
newinv = []
ids = order_obj.seller_trans_create(cr, uid, data['ids'],context)
cr.commit()
@ -76,7 +80,8 @@ def _makeInvoices(self, cr, uid, data, context):
'res_model': 'account.invoice',
'view_id': False,
'context': "{'type':'out_refund'}",
'type': 'ir.actions.act_window'
'type': 'ir.actions.act_window',
'search_view_id': id['res_id']
}
return {}

View File

@ -22,11 +22,11 @@
import ir
from osv import fields,osv
from osv import fields, osv
import netsvc
import pooler
import string
import time,copy
import time, copy
from tools.translate import _
class audittrail_rule(osv.osv):

View File

@ -49,10 +49,16 @@ class res_partner_contact(osv.osv):
'function_id':fields.related('job_ids','function_id',type='many2one', relation='res.partner.function', string='Main Function'),
'job_id':fields.related('job_ids',type='many2one', relation='res.partner.job', string='Main Job'),
'email': fields.char('E-Mail', size=240),
'comment' : fields.text('Notes', translate=True),
'photo' : fields.binary('Image'),
}
_defaults = {
'active' : lambda *a: True,
}
_order = "name,first_name"
def name_get(self, cr, user, ids, context={}):
#will return name and first_name.......
if not len(ids):
@ -117,20 +123,20 @@ class res_partner_job(osv.osv):
_description ='Contact Partner Function'
_order = 'sequence_contact'
_columns = {
'name': fields.related('address_id','partner_id', type='many2one', relation='res.partner', string='Partner'),
'address_id':fields.many2one('res.partner.address','Address'),
'name': fields.related('address_id','partner_id', type='many2one', relation='res.partner', string='Partner', help="You may enter Address first,Partner will be linked automatically if any."),
'address_id':fields.many2one('res.partner.address','Address', help='Address which is linked to the Partner'),
'contact_id':fields.many2one('res.partner.contact','Contact', required=True, ondelete='cascade'),
'function_id': fields.many2one('res.partner.function','Partner Function'),
'function_id': fields.many2one('res.partner.function','Partner Function', help="Function of this contact with this partner"),
'sequence_contact':fields.integer('Contact Seq.',help='Order of importance of this address in the list of addresses of the linked contact'),
'sequence_partner':fields.integer('Partner Seq.',help='Order of importance of this job title in the list of job title of the linked partner'),
'email': fields.char('E-Mail', size=240),
'phone': fields.char('Phone', size=64),
'fax': fields.char('Fax', size=64),
'email': fields.char('E-Mail', size=240, help="Job E-Mail"),
'phone': fields.char('Phone', size=64, help="Job Phone no."),
'fax': fields.char('Fax', size=64, help="Job FAX no."),
'extension': fields.char('Extension', size=64, help='Internal/External extension phone number'),
'other': fields.char('Other', size=64, help='Additional phone field'),
'date_start' : fields.date('Date Start'),
'date_stop' : fields.date('Date Stop'),
'state' : fields.selection([('past', 'Past'),('current', 'Current')], 'State', required=True),
'date_start' : fields.date('Date Start',help="Start date of job(Joining Date)"),
'date_stop' : fields.date('Date Stop', help="Last date of job"),
'state' : fields.selection([('past', 'Past'),('current', 'Current')], 'State', required=True, help="Status of Address"),
}
_defaults = {

View File

@ -1,4 +1,4 @@
<?xml version="1.0" ?>
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Create the functions -->

View File

@ -1,4 +1,4 @@
<?xml version="1.0" ?>
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
@ -32,29 +32,36 @@
<page string="General">
<newline/>
<separator string="General Information" colspan="4"/>
<field name="mobile" select="2"/>
<field name="title" select="1" />
<field name="website"/>
<field name="email"/>
<field name="lang_id"/>
<field name="active"/>
<field name="partner_id" invisible="1" select="2"/>
<field name="function_id" invisible="1" select="2"/>
<field name="job_id" invisible="1" select="2" />
<field name="job_ids" colspan="4" nolabel="1" mode="tree,form">
<group string="Partner" colspan="2" col="2">
<field name="partner_id" invisible="1" select="2"/>
<field name="title" select="1" />
<field name="function_id" invisible="1" select="2"/>
<field name="lang_id"/>
<field name="active"/>
</group>
<group string="Communication" colspan="2" col="2">
<field name="mobile" select="2"/>
<field name="email" widget="email"/>
<field name="website"/>
</group>
<field name="job_ids" colspan="4" nolabel="1" mode="tree,form">
<form string="Functions and Addresses">
<field name="function_id"/>
<field name="address_id"/>
<field name="name"/>
<field name="sequence_contact"/>
<field name="phone"/>
<field name="fax"/>
<field name="extension"/>
<field name="other"/>
<field name="email" widget="email"/>
<field name="date_start" />
<field name="date_stop" />
<field name="state" />
<group string="Partner" colspan="2" col="4">
<field name="name" colspan="4"/>
<field name="address_id" colspan="4"/>
<field name="function_id" colspan="4"/>
<field name="date_start" />
<field name="date_stop" />
<field name="state" />
<field name="sequence_contact" />
</group>
<group string="Communication" colspan="2" col="2">
<field name="phone"/>
<field name="fax"/>
<field name="email" widget="email"/>
<field name="extension"/>
<field name="other"/>
</group>
</form>
<tree string="Functions and Addresses">
<field name="sequence_contact" string="Seq."/>
@ -74,6 +81,12 @@
<field name="country_id"/>
<field name="birthdate" select="1" />
</page>
<page string="Notes">
<field name="comment" nolabel="1"/>
</page>
<page string="Picture">
<field name="photo" nolabel="1" colspan="2" widget="image"/>
</page>
</notebook>
</form>
</field>
@ -101,21 +114,20 @@
<field name="address" mode="form,tree" colspan="4" nolabel="1" select="1" position="replace">
<field name="address" mode="form,tree" colspan="4" nolabel="1" select="1">
<form string="Address">
<field name="type" select="2" colspan="4"/>
<newline/>
<field name="street" select="2"/>
<field name="street2"/>
<newline/>
<field name="zip" select="2"/>
<field name="city" select="2"/>
<newline/>
<field name="country_id" select="2" completion="1"/>
<field name="state_id" select="2"/>
<newline/>
<field name="phone"/>
<field name="fax"/>
<field name="email" widget="email"/>
<newline/>
<group string="Postal Address" colspan="2" col="2">
<field name="type" select="2" />
<field name="street" select="2"/>
<field name="street2"/>
<field name="zip" select="2"/>
<field name="city" select="2"/>
<field name="country_id" select="2" completion="1"/>
<field name="state_id" select="2"/>
</group>
<group string="Communication" colspan="2" col="2">
<field name="phone"/>
<field name="fax"/>
<field name="email" widget="email"/>
</group>
<field name="job_ids" mode="tree,form" nolabel="1" colspan="4">
<tree string="Contacts" editable="top">
<field name="sequence_partner"/>
@ -128,15 +140,19 @@
<field name="email"/>
</tree>
<form string="Contacts">
<group string="Partner" colspan="2" col="2">
<field name="sequence_partner"/>
<field name="name"/>
<field name="sequence_partner"/>
<field name="contact_id"/>
<field name="function_id"/>
</group>
<group string="Communication" colspan="2" col="2">
<field name="phone"/>
<field name="fax"/>
<field name="email" widget="email"/>
<field name="extension"/>
<field name="other"/>
<field name="email" widget="email"/>
</group>
</form>
</field>
</form>

View File

@ -22,7 +22,7 @@
{
'name': 'Module Recorder',
'name': 'Module Record',
'version': '1.0',
'category': 'Generic Modules/Base',
'description': """
@ -39,10 +39,8 @@ This should help you to easily create reusable and publishable modules
for custom configurations and demo/testing data.
How to use it:
1. Start the recording
2. Do stuff in your Open ERP client
3. Stop the recording session
4. Export to a reusable module
Run Administration/Customization/Module Creation/Export Customizations As a Module wizard.
Select datetime critearea of recording and objects to be recorded and Record module.
""",
'author': 'Tiny',
'website': 'http://www.openerp.com',

View File

@ -39,7 +39,7 @@ class recording_objects_proxy(objects_proxy):
pool = pooler.get_pool(args[0])
mod = pool.get('ir.module.record')
if mod and mod.recording:
if args[4] not in ('default_get','read','fields_view_get','fields_get','search','search_count','name_search','name_get','get','request_get', 'get_sc'):
if args[4] in ('copy','write','unlink','create'):
if _old_args is not None:
args[5].update(_old_args)
if args[5]:
@ -198,6 +198,8 @@ class base_module_record(osv.osv):
if mod_fields[key]['type'] == 'many2one':
if type(data[key])==type(True) or type(data[key])==type(1):
result[key]=data[key]
elif not data[key]:
result[key] = False
else:
result[key]=data[key][0]

View File

@ -1,57 +1,19 @@
<?xml version="1.0"?>
<openerp>
<data>
<wizard
id="wizard_base_module_record"
string="Record module"
model="ir.module.module"
multi="True"
name="base_module_record.module_record"/>
<menuitem
parent="base.menu_custom"
name="Module Creation"
id="menu_wizard_base_mod_rec"/>
<menuitem
parent="menu_wizard_base_mod_rec"
name="Module Recorder"
id="menu_wizard_base_mod_rec_rec"/>
<menuitem
parent="menu_wizard_base_mod_rec_rec"
name="Start Recording"
type="wizard"
action="wizard_base_module_record"
id="menu_wizard_base_module_record"/>
<menuitem
parent="menu_wizard_base_mod_rec_rec"
name="Stop Recording"
type="wizard"
action="wizard_base_module_record"
id="menu_wizard_base_module_record_stop"/>
<wizard
id="wizard_base_module_save"
string="Save Recorded Module"
model="ir.module.module"
multi="True"
name="base_module_record.module_save"/>
<menuitem
parent="menu_wizard_base_mod_rec_rec"
name="Save Recorded Module"
type="wizard"
action="wizard_base_module_save"
id="menu_wizard_base_module_save"/>
<wizard
id="wizard_base_module_record_objects"
string="Export Customizations As a Module"
model="ir.module.module"
multi="True"
name="base_module_record.module_record_objects"/>
<menuitem
parent="menu_wizard_base_mod_rec"
name="Export Customizations As a Module"

View File

@ -20,7 +20,6 @@
#
##############################################################################
import base_module_record
import base_module_save
import base_module_record_objects
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,110 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import osv
import pooler
intro_stop_form = '''<?xml version="1.0"?>
<form string="Module Recording">
<separator string="Recording Information" colspan="4"/>
<label string="Open ERP recording is stopped. Don't forget to save the recorded module." colspan="4" align="0.0"/>
<label string="You can continue the recording session by relauching the 'start recording' wizard." colspan="4" align="0.0"/>
</form>'''
intro_start_form = '''<?xml version="1.0"?>
<form string="Recording Stopped">
<separator string="Recording information" colspan="4"/>
<label string="The module recorder allows you to record every operation made in the Open ERP client and save them as a module. You will be able to install this module on any database to reuse and/or publish it." colspan="4" align="0.0"/>
<field name="continue"/>
</form>'''
intro_start_fields = {
'continue': {'string':'Continue Previous Session', 'type':'boolean'}
}
def _stop_recording(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
mod = pool.get('ir.module.record')
mod.recording = 0
return {}
def _start_recording(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
mod = pool.get('ir.module.record')
mod.recording = 1
if not data['form']['continue']:
mod.recording_data = []
mod.depends = {}
return {}
def _check_recording(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
mod = pool.get('ir.module.record')
if mod.recording:
return 'stop'
return 'start'
class base_module_publish(wizard.interface):
states = {
'init': {
'actions': [],
'result': {
'type':'choice',
'next_state':_check_recording,
}
},
'start': {
'actions': [],
'result': {
'type':'form',
'arch':intro_start_form,
'fields': intro_start_fields,
'state':[
('end', 'Cancel', 'gtk-cancel'),
('start_confirm', 'Start Recording', 'gtk-ok'),
]
}
},
'start_confirm': {
'actions': [_start_recording],
'result': {
'type':'state',
'state': 'end'
}
},
'stop': {
'actions': [_stop_recording],
'result': {
'type':'form',
'arch':intro_stop_form,
'fields': {},
'state':[
('end', 'Continue', 'gtk-ok'),
]
}
}
}
base_module_publish('base_module_record.module_record')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -72,9 +72,9 @@ class report_creator(osv.osv):
#
# Should Call self.fields_get !
#
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False):
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
if (not context) or 'report_id' not in context:
return super(report_creator, self).fields_view_get(cr, user, view_id, view_type, context, toolbar)
return super(report_creator, self).fields_view_get(cr, user, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
report = self.browse(cr, user, context['report_id'])
models = {}
for model in report.model_ids:

View File

@ -41,7 +41,7 @@
<field name="model_ids" colspan="4" context="{'model_ids':model_ids}"/>
<separator string="State" colspan="4"/>
<field name="state"/>
<button string="Create Menu" name="%(wizard_menu_create)d" type="action" colspan="2"/>
<button string="Create Menu" name="%(wizard_menu_create)d" type="action" colspan="2" icon="gtk-justify-fill"/>
</page><page string="View parameters">
<separator string="Used View" colspan="4"/>
<field name="view_type1"/>
@ -74,7 +74,7 @@
</tree>
</field>
</page><page string="Filters on Fields">
<button string="Add filter" name="%(wizard_set_filter_fields)d" type="action"/>
<button string="Add filter" name="%(wizard_set_filter_fields)d" type="action" icon="gtk-add"/>
<field name="filter_ids" nolabel="1" colspan="4">
<tree string="Filters">
<field name="name"/>

View File

@ -32,9 +32,9 @@ OpenOffice.
'author': 'Tiny',
'website': 'http://www.openerp.com',
'depends': ['base'],
'init_xml': [],
'init_xml': ['base_report_data.xml'],
'update_xml': ['base_report_designer_wizard.xml'],
'demo_xml': ['base_report_data.xml'],
'demo_xml': [],
'installable': True,
'active': False,
'certificate': '0056379010493',

View File

@ -7,5 +7,14 @@
<field eval="[(6,0,[ref('base.user_root')])]" name="users"/>
<field eval="&quot;&quot;&quot;OpenOfficeReportDesigner&quot;&quot;&quot;" name="name"/>
</record>
<record id="ir_model_access_openofficereportdesigner0" model="ir.model.access">
<field name="model_id" ref="base.model_ir_actions_report_xml"/>
<field eval="1" name="perm_read"/>
<field eval="&quot;&quot;&quot;OpenOfficeReportDesigner&quot;&quot;&quot;" name="name"/>
<field eval="1" name="perm_unlink"/>
<field eval="1" name="perm_write"/>
<field eval="1" name="perm_create"/>
<field name="group_id" ref="res_groups_openofficereportdesigner0"/>
</record>
</data>
</openerp>

View File

@ -649,16 +649,16 @@
<xsl:otherwise>
<xsl:choose>
<xsl:when test="($fontWeight='bold') and ($fontStyle='italic')">
<xsl:text>Times-BoldItalic</xsl:text>
<xsl:text>Helvetica-BoldOblique</xsl:text>
</xsl:when>
<xsl:when test="($fontWeight='bold') and not ($fontStyle='italic')">
<xsl:text>Times-Bold</xsl:text>
<xsl:text>Helvetica-Bold</xsl:text>
</xsl:when>
<xsl:when test="not($fontWeight='bold') and ($fontStyle='italic')">
<xsl:text>Times-Italic</xsl:text>
<xsl:text>Helvetica-Oblique</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>Times-Roman</xsl:text>
<xsl:text>Helvetica</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
@ -666,7 +666,7 @@
</xsl:when>
<xsl:otherwise>
<!--Use this as default -->
<xsl:text>Times-Roman</xsl:text>
<xsl:text>Helvetica</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

View File

@ -650,16 +650,16 @@
<xsl:otherwise>
<xsl:choose>
<xsl:when test="($fontWeight='bold') and ($fontStyle='italic')">
<xsl:text>Times-BoldItalic</xsl:text>
<xsl:text>Helvetica-BoldOblique</xsl:text>
</xsl:when>
<xsl:when test="($fontWeight='bold') and not ($fontStyle='italic')">
<xsl:text>Times-Bold</xsl:text>
<xsl:text>Helvetica-Bold</xsl:text>
</xsl:when>
<xsl:when test="not($fontWeight='bold') and ($fontStyle='italic')">
<xsl:text>Times-Italic</xsl:text>
<xsl:text>Helvetica-Oblique</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>Times-Roman</xsl:text>
<xsl:text>Helvetica</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
@ -667,7 +667,7 @@
</xsl:when>
<xsl:otherwise>
<!--Use this as default -->
<xsl:text>Times-Roman</xsl:text>
<xsl:text>Helvetica</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

View File

@ -86,9 +86,9 @@ class board_board(osv.osv):
return id
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False):
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
res = {}
res = super(board_board, self).fields_view_get(cr, user, view_id, view_type, context, toolbar)
res = super(board_board, self).fields_view_get(cr, user, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
vids = self.pool.get('ir.ui.view.custom').search(cr, user, [('user_id','=',user), ('ref_id','=',view_id)])
if vids:

View File

@ -57,7 +57,7 @@
<field name="arch" type="xml">
<form string="Dashboard">
<field name="name" select="1"/>
<button colspan="2" name="%(wizard_board_create_menu)d" string="Create Menu" type="action"/>
<button colspan="2" name="%(wizard_board_create_menu)d" string="Create Menu" type="action" icon="gtk-justify-fill"/>
<field colspan="4" name="line_ids">
<tree string="Dashboard View">
<field name="name"/>

View File

@ -36,7 +36,7 @@
<button
string="My board"
name="%(open_board_auction)d"
icon="gtk-ok"
icon="terp-partner"
type="action"
colspan="4"
/>

View File

@ -30,7 +30,7 @@
<button
string="Menu"
name="%(base.action_menu_admin)d"
icon="gtk-ok"
icon="gtk-justify-fill"
type="action"
colspan="4"/>

View File

@ -27,8 +27,8 @@
'category': 'Board/CRM',
'description': """
This module implements a dashboard for CRM that includes:
* My Leads (list)
* Leads by Stage (graph)
* My Prospects (list)
* Prospects by Stage (graph)
* My Meetings (list)
* Sales Pipeline by Stage (graph)
* My Cases (list)

View File

@ -5,11 +5,11 @@
Board for statistical view of the sections
-->
<record model="ir.ui.view" id="view_crm_lead_stage_graph1">
<field name="name">Leads By Stage - Graph</field>
<field name="name">Prospects By Stage - Graph</field>
<field name="model">report.crm.case.section.stage</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Leads By Stage" type="pie">
<graph string="Prospects By Stage" type="pie">
<field name="stage_id"/>
<field name="nbr" operator="+"/>
<field name="state" group="True"/>
@ -43,7 +43,7 @@
<field name="view_type">form</field>
<field name="view_mode">graph,tree,form</field>
<field name="view_id" ref="view_crm_lead_stage_graph1"/>
<field name="domain">[('section_id', '=', 'Leads'),('state','!=','done'),('state','!=','cancel')]</field>
<field name="domain">[('section_id', '=', 'Prospects'),('state','!=','done'),('state','!=','cancel')]</field>
</record>
<act_window name="Jobs Requests Of The Month by Applied Job"
@ -54,8 +54,8 @@
view_id="view_crm_case_categ_graph"
id="act_jobs_categ"/>
<act_window name="Leads Of The Month By User"
domain="[('section_id', '=', 'Leads'),('name','=',time.strftime('%Y-%m-01')),('state','!=','cancel')]"
<act_window name="Prospects Of The Month By User"
domain="[('section_id', '=', 'Prospects'),('name','=',time.strftime('%Y-%m-01')),('state','!=','cancel')]"
res_model="report.crm.case.user"
view_type="form"
view_mode="graph,tree,form"
@ -77,7 +77,7 @@
width="250"/>
<action
string="Leads By Stage"
string="Prospects By Stage"
name="%(act_leads_state)d"
height="200"
colspan="4"/>
@ -91,7 +91,7 @@
<action
string="Leads Of The Month By User"
string="Prospects Of The Month By User"
name="%(act_leads_month_user)d"
colspan="4"/>

View File

@ -22,7 +22,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm_configuration.crm_case_tree_view_leads"/>
<field name="domain">[('section_id.name', '=', 'Leads'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
<field name="domain">[('section_id.name', '=', 'Prospects'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<record model="ir.actions.act_window" id="act_my_meetings">
@ -45,7 +45,7 @@
<field name="view_type">form</field>
<field name="view_mode">graph,tree,form</field>
<field name="view_id" ref="view_crm_lead_stage_graph1"/>
<field name="domain">[('section_id.name', '=', 'Leads'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
<field name="domain">[('section_id.name', '=', 'Prospects'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<record model="ir.actions.act_window" id="act_sales_pipeline">
@ -75,7 +75,7 @@
<child1>
<action
string="My Leads"
string="My Prospects"
name="%(act_my_leads)d"
colspan="4"
height="150"
@ -97,7 +97,7 @@
<child2>
<action
string="My Leads By Stage"
string="My Prospects By Stage"
name="%(act_my_leads_stage)d"
colspan="4"/>

View File

@ -61,7 +61,7 @@
</child1>
<child2>
<button colspan="4" icon="gtk-ok" name="%(open_board_project)d" string="My tasks board" type="action"/>
<button colspan="4" icon="terp-partner" name="%(open_board_project)d" string="My tasks board" type="action"/>
<action colspan="4" name="%(report_analytic_planning.action_account_analytic_planning_stat_my_manager_form)d" string="My project's planning"/>

View File

@ -19,7 +19,7 @@
</child1>
<child2>
<action colspan="4" name="%(report_sale.action_order_category_tree_all)d" string="Sales of the month" view_mode="graph,tree"/>
<action colspan="4" name="%(report_sale.action_order_category_tree_all)d" string="Average Sales by Category of Products(this month)" view_mode="graph,tree"/>
<action colspan="4" name="%(report_crm.action_report_crm_case_user_tree_month)d" string="Cases of the month" view_mode="graph,tree"/>
</child2>
</hpaned>

View File

@ -27,7 +27,7 @@
'category': 'Generic Modules/CRM & SRM',
'description': """The generic Open ERP Customer Relationship Management
system enables a group of people to intelligently and efficiently manage
leads, opportunities, tasks, issues, requests, bugs, campaign, claims, etc.
prospects, opportunities, tasks, issues, requests, bugs, campaign, claims, etc.
It manages key tasks such as communication, identification, prioritization,
assignment, resolution and notification.

View File

@ -21,13 +21,19 @@
##############################################################################
import time
import tools
from osv import fields,osv,orm
import re
import os
import mx.DateTime
import base64
from tools.translate import _
import tools
from osv import fields,osv,orm
from osv.orm import except_orm
MAX_LEVEL = 15
AVAILABLE_STATES = [
('draft','Draft'),
@ -64,6 +70,7 @@ class crm_case_section(osv.osv):
'reply_to': fields.char('Reply-To', size=64, help="The email address put in the 'Reply-To' of all emails sent by Open ERP about cases in this section"),
'parent_id': fields.many2one('crm.case.section', 'Parent Section'),
'child_ids': fields.one2many('crm.case.section', 'parent_id', 'Child Sections'),
"gateway_ids" : fields.one2many("crm.email.gateway",'section_id',"Email Gateway")
}
_defaults = {
'active': lambda *a: 1,
@ -197,6 +204,101 @@ class crm_case_section(osv.osv):
return res
crm_case_section()
class crm_email_gateway(osv.osv):
_name = "crm.email.gateway"
_description = "Email Gateway"
_rec_name="login"
_columns = {
'pop': fields.char('POP Server Name',size=64,required=True ,help="POP Server Name Of Email gateway"),
'login': fields.char('User',size=64,required=True,help="User Login Id of Email gateway"),
'password': fields.char('Password',size=64,required=True,help="User Password Of Email gateway"),
'email': fields.char('Email Id',size=64,help="Default eMail in case of any trouble."),
'mailgateway':fields.selection([("fetchmail","Using Fetchmail"),("postfix","Using Postfix")],"EMail gateway", readonly=True),
'section_id':fields.many2one('crm.case.section',"Section"),
'path':fields.char("Path ",size=255,required= True,help ="Path of script file of Email gateway"),
'port':fields.integer("Port" , help="Port Number "),
'ssl':fields.boolean('Use Secure Authentication',help ="Use Secure Authentication"),
}
_defaults = {
'path': lambda *a: tools.config['addons_path']+"/crm/scripts/openerp-mailgate/openerp-mailgate.py",
'port':lambda * a:110,
'mailgateway':lambda * a:'fetchmail',
}
def _get_fetchmail_path(self, cr):
return os.path.join(tools.config['root_path'], '.fetchmail', cr.dbname)
def fetch_mail(self, cr, uid, section_ids=[], context={}):
path = self._get_fetchmail_path(cr)
sect_obj = self.pool.get("crm.case.section")
if not len(section_ids):
section_ids = sect_obj.search(cr, uid, [])
for section in sect_obj.browse(cr, uid, section_ids):
fetch_file = path + "/" +section.name
if os.path.isfile(fetch_file):
try :
os.system("fetchmail -f %s" %(fetch_file))
except Exception, e:
import netsvc
netsvc.Logger().notifyChannel('fetchmail', netsvc.LOG_ERROR, "%s" % e)
return True
def make_fetchmail(self, cr, uid, section_ids=[], context={}):
sect_obj = self.pool.get("crm.case.section")
user_obj = self.pool.get("res.users")
for section in sect_obj.browse(cr, uid, section_ids, context):
user = user_obj.browse(cr,uid,uid)
path = self._get_fetchmail_path(cr)
if not os.path.isdir(path):
try:
os.makedirs(path)
except:
raise except_orm(_('Permission Denied !'), _('You do not permissions to write on the server side.'))
fmail_path = path + "/" +section.name
fmail = open(fmail_path , 'w')
os.chmod(fmail_path,0710)
for mailgateway in section.gateway_ids:
mdatext = '%s -u %d -p %s -s %d -d %s '%(mailgateway.path,uid,user.password,mailgateway.section_id.id,cr.dbname)
if mailgateway.email:
mdatext += ' -m %s'%(mailgateway.email)
if section.reply_to:
mdatext += ' -e %s'%(section.reply_to)
text = "\npoll %s user '%s' password '%s'"%(mailgateway.pop,mailgateway.login,mailgateway.password)
if mailgateway.port:
text += ' port %d' % (mailgateway.port)
if mailgateway.ssl:
text += ' ssl'
text += " mda '%s'"%(mdatext)
fmail.write(text)
fmail.close()
def create(self, cr, uid, vals, context=None):
res = super(crm_email_gateway, self).create(cr, uid, vals, context=context)
self.make_fetchmail(cr, uid, [vals['section_id']])
return res
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True):
res = super(crm_email_gateway, self).write(cr, uid, ids, vals, context)
section_ids = []
for gateway in self.browse(cr, uid, ids, context):
if gateway.section_id.id not in section_ids:
section_ids.append(gateway.section_id.id)
self.make_fetchmail(cr, uid, section_ids)
return res
def unlink(self, cr, uid, ids, context={}, check=True):
section_ids = []
for gateway in self.browse(cr, uid, ids, context):
if gateway.section_id.id not in section_ids:
section_ids.append(gateway.section_id.id)
res = super(crm_email_gateway, self).unlink(cr, uid,ids, context=context)
self.make_fetchmail(cr, uid, section_ids)
return res
crm_email_gateway()
class crm_case_categ(osv.osv):
_name = "crm.case.categ"
_description = "Category of case"
@ -228,7 +330,8 @@ class crm_case_rule(osv.osv):
('deadline','Deadline'),
('date','Date'),
], 'Trigger Date', size=16),
'trg_date_range': fields.integer('Delay after trigger date'),
'trg_date_range': fields.integer('Delay after trigger date',help="Delay After Trigger Date, specifies you can put a negative number " \
"if you need a delay before the trigger date, like sending a reminder 15 minutes before a meeting."),
'trg_date_range_type': fields.selection([('minutes', 'Minutes'),('hour','Hours'),('day','Days'),('month','Months')], 'Delay type'),
'trg_section_id': fields.many2one('crm.case.section', 'Section'),
@ -247,17 +350,21 @@ class crm_case_rule(osv.osv):
'act_section_id': fields.many2one('crm.case.section', 'Set section to'),
'act_user_id': fields.many2one('res.users', 'Set responsible to'),
'act_priority': fields.selection([('','')] + AVAILABLE_PRIORITIES, 'Set priority to'),
'act_email_cc': fields.char('Add watchers (Cc)', size=250, help="These people will receive a copy of the futur communication between partner and users by email"),
'act_email_cc': fields.char('Add watchers (Cc)', size=250, help="These people will receive a copy of the future communication between partner and users by email"),
'act_remind_partner': fields.boolean('Remind Partner', help="Check this if you want the rule to send a reminder by email to the partner."),
'act_remind_user': fields.boolean('Remind responsible', help="Check this if you want the rule to send a reminder by email to the user."),
'act_remind_attach': fields.boolean('Remind with attachment', help="Check this if you want that all documents attached to the case be attached to the reminder email sent."),
'act_mail_to_user': fields.boolean('Mail to responsible'),
'act_mail_to_partner': fields.boolean('Mail to partner'),
'act_mail_to_watchers': fields.boolean('Mail to watchers (Cc)'),
'act_mail_to_email': fields.char('Mail to these emails', size=128),
'act_mail_body': fields.text('Mail body')
'act_mail_to_user': fields.boolean('Mail to responsible',help="Check this if you want the rule to send an email to the responsible person."),
'act_mail_to_partner': fields.boolean('Mail to partner',help="Check this if you want the rule to send an email to the partner."),
'act_mail_to_watchers': fields.boolean('Mail to watchers (CC)',help="Check this if you want the rule to mark CC(mail to any other person defined in actions)."),
'act_mail_to_email': fields.char('Mail to these emails', size=128,help="Email-id of the persons whom mail is to be sent"),
'act_mail_body': fields.text('Mail body',help="Content of mail"),
'regex_name' : fields.char('Regular Expression on Case Name', size=128),
'regex_history' : fields.char('Regular Expression on Case History', size=128),
'server_action_id' : fields.many2one('ir.actions.server','Server Action',help="Describes the action name." \
"eg:on which object which ation to be taken on basis of which condition"),
}
_defaults = {
'active': lambda *a: 1,
@ -334,23 +441,27 @@ class crm_case(osv.osv):
'priority': fields.selection(AVAILABLE_PRIORITIES, 'Priority'),
'active': fields.boolean('Active'),
'description': fields.text('Your action'),
'section_id': fields.many2one('crm.case.section', 'Section', required=True, select=True),
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id)]"),
'section_id': fields.many2one('crm.case.section', 'Section', required=True, select=True, help='Section to which Case belongs to. Define Responsible user and Email account for mail gateway.'),
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id)]", help='Category related to the section.Subdivide the CRM cases independently or section-wise.'),
'planned_revenue': fields.float('Planned Revenue'),
'planned_cost': fields.float('Planned Costs'),
'probability': fields.float('Probability (%)'),
'email_from': fields.char('Partner Email', size=128),
'email_cc': fields.char('Watchers Emails', size=252),
'email_from': fields.char('Partner Email', size=128, help="These people will receive email."),
'email_cc': fields.char('Watchers Emails', size=252 , help="These people will receive a copy of the future" \
" communication between partner and users by email"),
'email_last': fields.function(_email_last, method=True,
string='Latest E-Mail', type='text'),
'partner_id': fields.many2one('res.partner', 'Partner'),
'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact', domain="[('partner_id','=',partner_id)]"),
'som': fields.many2one('res.partner.som', 'State of Mind'),
'som': fields.many2one('res.partner.som', 'State of Mind', help="The minds states allow to define a value scale which represents" \
"the partner mentality in relation to our services.The scale has" \
"to be created with a factor for each level from 0 (Very dissatisfied) to 10 (Extremely satisfied)."),
'date': fields.datetime('Date'),
'create_date': fields.datetime('Created' ,readonly=True),
'date_deadline': fields.datetime('Deadline'),
'date_closed': fields.datetime('Closed', readonly=True),
'canal_id': fields.many2one('res.partner.canal', 'Channel'),
'canal_id': fields.many2one('res.partner.canal', 'Channel',help="The channels represent the different communication modes available with the customer." \
" With each commercial opportunity, you can indicate the canall which is this opportunity source."),
'user_id': fields.many2one('res.users', 'Responsible'),
'history_line': fields.one2many('crm.case.history', 'case_id', 'Communication', readonly=1),
'log_ids': fields.one2many('crm.case.log', 'case_id', 'Logs History', readonly=1),
@ -429,6 +540,28 @@ class crm_case(osv.osv):
)
ok = ok and (not action.trg_priority_from or action.trg_priority_from>=case.priority)
ok = ok and (not action.trg_priority_to or action.trg_priority_to<=case.priority)
reg_name = action.regex_name
result_name = True
if reg_name:
ptrn = re.compile(str(reg_name))
_result = ptrn.search(str(case.name))
if not _result:
result_name = False
regex_n = not reg_name or result_name
ok = ok and regex_n
reg_history = action.regex_history
result_history = True
if reg_history:
ptrn = re.compile(str(reg_history))
if case.history_line:
_result = ptrn.search(str(case.history_line[0].description))
if not _result:
result_history = False
regex_h = not reg_history or result_history
ok = ok and regex_h
if not ok:
continue
@ -466,6 +599,9 @@ class crm_case(osv.osv):
ok = action.trg_date_type=='none'
if ok:
if action.server_action_id:
context.update({'active_id':case.id,'active_ids':[case.id]})
self.pool.get('ir.actions.server').run(cr, uid, [action.server_action_id.id], context)
write = {}
if action.act_state:
case.state = action.act_state
@ -515,7 +651,7 @@ class crm_case(osv.osv):
return True
def format_body(self, body):
return (body or u'').encode('utf8', 'replace')
return body and tools.ustr(body.encode('ascii', 'replace')) or ''
def format_mail(self, case, body):
data = {
@ -610,13 +746,13 @@ class crm_case(osv.osv):
def remind_user(self, cr, uid, ids, context={}, attach=False,
destination=True):
for case in self.browse(cr, uid, ids):
if not case.section_id.reply_to:
raise osv.except_osv(_('Error!'),("Reply TO is not specified in Section"))
if not case.email_from:
raise osv.except_osv(_('Error!'),("Partner Email is not specified in Case"))
if case.section_id.reply_to and case.email_from:
src = case.email_from
if not src:
raise osv.except_osv(_('Error!'),
_("No E-Mail ID Found for the Responsible Partner or missing reply address in section!"))
dest = case.section_id.reply_to
body = case.email_last or case.description
if not destination:
@ -633,7 +769,7 @@ class crm_case(osv.osv):
attach_to_send = map(lambda x: (x['datas_fname'], base64.decodestring(x['datas'])), attach_to_send)
# Send an email
tools.email_send(
flag = tools.email_send(
src,
dest,
"Reminder: [%s] %s" % (str(case.id), case.name, ),
@ -642,7 +778,10 @@ class crm_case(osv.osv):
tinycrm=str(case.id),
attach=attach_to_send
)
if flag:
raise osv.except_osv(_('Email!'),("Email Successfully Sent"))
else:
raise osv.except_osv(_('Email Fail!'),("Email is not sent successfully"))
return True
def add_reply(self, cursor, user, ids, context=None):
@ -802,7 +941,7 @@ class crm_case_log(osv.osv):
_description = "Case Communication History"
_order = "id desc"
_columns = {
'name': fields.char('Action', size=64),
'name': fields.char('Status', size=64),
'som': fields.many2one('res.partner.som', 'State of Mind'),
'date': fields.datetime('Date'),
'canal_id': fields.many2one('res.partner.canal', 'Channel'),

View File

@ -66,6 +66,17 @@
<field eval="'_check'" name="function"/>
<field eval="'()'" name="args"/>
</record>
<record id="ir_cron_crm_email_gateway_action" model="ir.cron">
<field name="name">Check Email (Fetchmail)</field>
<field name="interval_number">5</field>
<field name="interval_type">minutes</field>
<field name="numbercall">-1</field>
<field eval="False" name="doall"/>
<field eval="'crm.email.gateway'" name="model"/>
<field eval="'fetch_mail'" name="function"/>
<field eval="'()'" name="args"/>
</record>
</data>
</openerp>

View File

@ -3,6 +3,8 @@
<data>
<menuitem icon="terp-crm" id="menu_crm" name="CRM &amp; SRM"/>
<menuitem id="menu_crm_configuration" name="Configuration" parent="crm.menu_crm" sequence="0"/>
<wizard id="wizard_crm_send_mail" model="crm.case.history" name="crm.send.mail" string="Send Mail" menu="False"/>
<wizard id="wizard_crm_new_send_mail" model="crm.case" name="crm.new.send.mail" string="Send New Mail" menu="False"/>
<record id="res_partner_events-wopartner-view" model="ir.ui.view">
<field name="name">res.partner.events.form</field>
@ -37,7 +39,32 @@
<field name="parent_id" select="2"/>
<field name="allow_unlink" select="2"/>
<field name="reply_to" select="2"/>
<label colspan="2" string="Complete this if you use the mail gateway."/>
<field name="gateway_ids" widget="one2many_list" nolabel="1" colspan="4">
<tree string="Email Gateway">
<field name="pop" />
<field name="login"/>
<field name="email" />
<field name="mailgateway"/>
</tree>
<form string="Email Gateway">
<field name="mailgateway"/>
<notebook colspan="4">
<page string="Server Setting">
<field name="pop" />
<field name="port" />
<field name="login" />
<field name="password" password="True"/>
</page>
<page string="Security Setting">
<field name="ssl" />
</page>
<page string="Email Gateway">
<field name="email" />
<field name="path" />
</page>
</notebook>
</form>
</field>
</page>
</notebook>
</form>
@ -125,6 +152,7 @@
<field name="trg_state_to" select="2"/>
<separator colspan="4" string="Conditions on Case Fields"/>
<field name="regex_name" string="Regex on Case Name" colspan="2"/>
<field name="trg_section_id" select="1"/>
<field name="trg_categ_id"/>
<field name="trg_user_id" select="2"/>
@ -142,6 +170,7 @@
<field name="trg_date_range_type" nolabel="1"/>
</group>
<separator colspan="4" string="Condition on Communication History"/>
<field name="regex_history" string="Regex on Communication History"/>
<field name="trg_max_history"/>
<separator colspan="4" string="Note"/>
<label align="0.0" string="The rule use a AND operator. The case must match all non empty fields so that the rule execute the action described in the 'Actions' tab." colspan="4"/>
@ -157,6 +186,8 @@
<field name="act_remind_partner"/>
<field name="act_remind_attach"/>
<field colspan="4" name="act_email_cc"/>
<separator colspan="4" string="Server Action to be Triggered"/>
<field name="server_action_id"/>
<!--
<field name="act_method" colspan="4" readonly="1"/>
-->
@ -180,6 +211,7 @@
<label align="0.0" string="%%(case_user)s = Responsible name" colspan="2"/>
<label align="0.0" string="%%(case_user_email)s = Responsible email" colspan="2"/>
<label align="0.0" string="%%(case_user_phone)s = Responsible phone" colspan="2"/>
<label align="0.0" string="%% = The &apos;%%&apos; Character" colspan="2"/>
</page>
</notebook>
</form>
@ -204,7 +236,6 @@
</record>
<menuitem action="crm_case_rule-act" id="menu_crm_case_rule-act" parent="crm.next_id_51"/>
<!-- Cases -->
<record id="crm_case_log_tree-view" model="ir.ui.view">
<field name="name">crm.case.log.tree</field>
@ -268,6 +299,12 @@
<field name="planned_revenue" sum="Planned revenue"/>
<field name="planned_cost" sum="Planned costs"/>
<field name="state"/>
<button name="case_close" states="open,draft,pending" string="Close" type="object" icon="gtk-close"/>
<button name="case_open" states="draft,pending" string="Open" type="object" icon="gtk-go-forward"/>
<button name="case_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-cancel"/>
<button name="case_pending" states="draft,open" string="Pending" type="object" icon="gtk-media-pause"/>
<button name="case_escalate" states="open,draft,pending" string="Escalate" type="object" icon="gtk-go-up"/>
<button name="case_reset" states="done,cancel" string="Reset to Draft" type="object" icon="gtk-convert"/>
</tree>
</field>
</record>
@ -291,49 +328,27 @@
<field colspan="3" name="partner_address_id" on_change="onchange_partner_address_id(partner_address_id, email_from)" select="2"/>
<newline/>
<field colspan="3" name="email_from" select="2"/>
<button name="remind_partner" states="open,pending" string="Send Reminder" type="object"/>
<button name="remind_partner" states="open,pending" string="Send Reminder" type="object" icon="gtk-go-forward"/>
<field name="user_id" select="1"/>
<button name="remind_user" states="open,pending" string="Send Reminder" type="object"/>
</group>
<separator colspan="4"/>
<field colspan="2" mode="tree,form" name="history_line" nolabel="1">
<form string="Communication history">
<group col="6" colspan="4">
<field name="date" select="1"/>
<field name="email" select="1"/>
<field name="canal_id" select="2"/>
</group>
<newline/>
<field colspan="4" name="description" nolabel="1" select="2"/>
</form>
<tree string="Communication history">
<field name="note"/>
</tree>
</field>
<group col="2" colspan="2" expand="1">
<field name="canal_id"/>
<button colspan="2" name="add_reply" states="open" string="Add Last Mail for Replying" type="object"/>
<field colspan="2" name="description" nolabel="1" select="2"/>
<button name="case_log_reply" states="open" string="Send Partner &amp; Historize" type="object"/>
<button name="case_log" states="open" string="Historize" type="object"/>
<button name="remind_user" states="open,pending" string="Send Reminder" type="object" icon="gtk-go-forward"/>
</group>
<separator colspan="4" string="Description"/>
<field name="description" colspan="4" nolabel="1"/>
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state" select="1"/>
<button name="case_close" states="open,draft,pending" string="Close" type="object"/>
<button name="case_open" states="draft,pending" string="Open" type="object"/>
<button name="case_cancel" states="draft,open,pending" string="Cancel" type="object"/>
<button name="case_pending" states="draft,open" string="Pending" type="object"/>
<button name="case_escalate" states="open,draft,pending" string="Escalate" type="object"/>
<button name="case_reset" states="done,cancel" string="Reset to Draft" type="object"/>
<button name="case_close" states="open,draft,pending" string="Close" type="object" icon="gtk-close"/>
<button name="case_open" states="draft,pending" string="Open" type="object" icon="gtk-go-forward"/>
<button name="case_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-cancel"/>
<button name="case_pending" states="draft,open" string="Pending" type="object" icon="gtk-media-pause"/>
<button name="case_escalate" states="open,draft,pending" string="Escalate" type="object" icon="gtk-go-up"/>
<button name="case_reset" states="done,cancel" string="Reset to Draft" type="object" icon="gtk-convert"/>
</group>
</page>
<page string="Extra Info">
<page string="History">
<field name="id" select="1"/>
<field name="active" select="2"/>
<field colspan="4" name="email_cc"/>
<field name="categ_id" on_change="onchange_categ_id(categ_id)" select="2"/>
<field name="som" select="2"/>
<separator colspan="4" string="Dates"/>
@ -348,8 +363,6 @@
<separator colspan="4" string="References"/>
<field colspan="4" name="ref"/>
<field colspan="4" name="ref2"/>
</page>
<page string="History">
<field colspan="4" name="log_ids" nolabel="1">
<form string="Actions">
<separator colspan="4" string="Action Information"/>
@ -361,16 +374,61 @@
</form>
</field>
</page>
<page string="Emails">
<group colspan="4">
<field colspan="4" name="email_cc" string="CC"/>
</group>
<field name="history_line" colspan="4" nolabel="1" mode="form,tree">
<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"/>
<button colspan="4" string="Reply to Last Email" name="%(wizard_crm_send_mail)d" context="{'mail':'reply'}" icon="gtk-undo" type="action"/>
</form>
<tree string="Communication history">
<field name="description"/>
<field name="email"/>
<field name="date"/>
</tree>
</field>
<button colspan="4" string="Send New Email" name="%(wizard_crm_new_send_mail)d" context="{'mail':'new'}" icon="gtk-go-forward" type="action"/>
</page>
</notebook>
</form>
</field>
</record>
<record id="view_crm_case_filter" model="ir.ui.view">
<field name="name">crm.case.select</field>
<field name="model">crm.case</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Case">
<group col='6' colspan='4'>
<filter icon="gtk-execute" string="My Cases" domain="[('user_id','=',uid)]" separator="1" help="Cases Related to Current User"/>
<field name="state" select="1">
<filter icon="terp-crm" domain="[('state','=','draft')]" help="Draft Cases"/>
<filter icon="terp-crm" domain="[('state','=','open')]" help="Open Cases"/>
<filter icon="terp-crm" domain="[('state','=','pending')]" help="Pending Cases"/>
</field>
<separator orientation="vertical"/>
<field name="name" select='1'/>
<field name="user_id" select="1" widget="selection"/>
</group>
</search>
</field>
</record>
<record id="crm_case_categ0-act" model="ir.actions.act_window">
<field name="name">All Cases</field>
<field name="res_model">crm.case</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm_case_tree-view"/>
<field name="search_view_id" ref="view_crm_case_filter"/>
</record>
<menuitem action="crm_case_categ0-act" id="menu_crm_case_categ0-act" parent="crm.next_id_52"/>
@ -379,9 +437,10 @@
<field name="res_model">crm.case</field>
<field name="view_type">form</field>
<field name="domain">[('state','&lt;&gt;','done'),('state','&lt;&gt;','cancel'),('state','&lt;&gt;','pending')]</field>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="view_crm_case_filter"/>
</record>
<menuitem action="crm_case_categ0-act_open" id="menu_crm_case_categ0-act_open" parent="crm.menu_crm_case_categ0-act"/>
<menuitem action="crm_case_categ0-act_open" id="menu_crm_case_categ0-act_open" parent="crm.menu_crm_case_categ0-act" groups="base.group_extended_menu"/>
<record id="crm_case_categ0-act_my" model="ir.actions.act_window">
<field name="name">My cases</field>
@ -389,19 +448,20 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar</field>
<field name="domain">[('user_id','=',uid)]</field>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="view_crm_case_filter"/>
</record>
<menuitem action="crm_case_categ0-act_my" id="menu_crm_case_categ0-act_my" parent="crm.next_id_52"/>
<menuitem action="crm_case_categ0-act_my" id="menu_crm_case_categ0-act_my" parent="crm.next_id_52" groups="base.group_extended_menu"/>
<record id="crm_case_categ0-act_my_open" model="ir.actions.act_window">
<field name="name">My Open Cases</field>
<field name="res_model">crm.case</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar</field>
<field name="domain">[('user_id','=',uid),('state','&lt;&gt;','done'),('state','&lt;&gt;','cancel'),('state','&lt;&gt;','pending')]</field>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="view_crm_case_filter"/>
</record>
<menuitem action="crm_case_categ0-act_my_open" id="menu_crm_case_categ0-act_my_open" parent="crm.menu_crm_case_categ0-act_my"/>
<menuitem action="crm_case_categ0-act_my_open" id="menu_crm_case_categ0-act_my_open" parent="crm.menu_crm_case_categ0-act_my" groups="base.group_extended_menu"/>
<record id="crm_case_section_open_act" model="ir.actions.act_window">
<field name="name">crm.case.section.open</field>
@ -418,7 +478,6 @@
<field eval="True" name="object"/>
</record>
<record id="crm_case_history-view" model="ir.ui.view">
<field name="name">crm.case.history.form</field>
<field name="model">crm.case.history</field>
@ -492,8 +551,10 @@
<field name="model">crm.segmentation</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Partner Segmentation">
<notebook>
<form string="Partner Segmentation">
<field name="name" select="1"/>
<field name="exclusif"/>
<notebook colspan="4">
<page string="Segmentation">
<separator colspan="4" string="Segmentation Description"/>
<field name="name" select="1"/>
@ -504,9 +565,9 @@
<field colspan="4" name="description" select="2"/>
<field name="state"/>
<group col="3" colspan="2">
<button name="process_start" states="not running" string="Compute Segmentation" type="object"/>
<button name="process_stop" states="running" string="Stop Process" type="object"/>
<button name="process_continue" states="running" string="Continue Process" type="object"/>
<button name="process_start" states="not running" string="Compute Segmentation" type="object" icon="gtk-execute"/>
<button name="process_stop" states="running" string="Stop Process" type="object" icon="gtk-cancel"/>
<button name="process_continue" states="running" string="Continue Process" type="object" icon="gtk-go-forward"/>
</group>
</page>
<page string="Sales Purchase">
@ -561,6 +622,56 @@
<act_window domain="[('user_id', '=', active_id),('state','&lt;&gt;','done'),('state','&lt;&gt;','cancel'),('state','&lt;&gt;','pending')]" id="act_res_users_2_crm_case_opened" name="Open cases" res_model="crm.case" src_model="res.users" view_mode="tree,form,calendar" view_type="form"/>
<record id="crm_email_gateway_form" model="ir.ui.view">
<field name="name">crm.email.gateway.form</field>
<field name="model">crm.email.gateway</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Email Gateway">
<field name="section_id"/>
<field name="mailgateway"/>
<notebook colspan="4">
<page string="Server Setting">
<field name="pop" />
<field name="port" />
<field name="login" />
<field name="password" password="True"/>
</page>
<page string="Security Setting">
<field name="ssl" />
</page>
<page string="Email Gateway">
<field name="email" />
<field name="path" />
</page>
</notebook>
</form>
</field>
</record>
<record id="crm_email_gateway_tree" model="ir.ui.view">
<field name="name">crm.email.gateway.tree</field>
<field name="model">crm.email.gateway</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Gateway">
<field name="section_id"/>
<field name="mailgateway"/>
<field name="pop" />
<field name="login"/>
<field name="email" />
<field name="path" />
</tree>
</field>
</record>
<record id="crm_email_gateway_act" model="ir.actions.act_window">
<field name="name">Email Gateway</field>
<field name="res_model">crm.email.gateway</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm_email_gateway_tree"/>
</record>
<menuitem id="crm_email_gateway_menu" name="Email Gateway" parent="next_id_51" action="crm_email_gateway_act" />
</data>
</openerp>

View File

@ -2,6 +2,12 @@
<openerp>
<data>
<wizard id="wizard_case_section_menu" model="crm.case.section" name="crm.case.section.menu" string="Create menus for a case section"/>
<wizard string="Fetch mail"
model="crm.case.section"
name="crm.case.section.fetchmail"
id="wizard_crm_case_section_fetchmail"/>
<menuitem action="wizard_case_section_menu" id="menu_wizard_case_section_menu" parent="crm.menu_crm_configuration" type="wizard"/>
</data>

View File

@ -101,7 +101,8 @@ class email_parser(object):
'email_cc': self._decode_header(msg['Cc'] or ''),
'canal_id': self.canal_id,
'user_id': False,
'history_line': [(0, 0, {'name': 'Create','section_id': self.section_id,'canal_id': self.canal_id,'description': message['body'], 'email': msg['From'] })],
'description': message['body'],
'history_line': [(0, 0, {'description': message['body'], 'email': msg['From'] })],
}
try:
data.update(self.partner_get(self._decode_header(msg['From'])))
@ -154,7 +155,7 @@ class email_parser(object):
if part.get_content_maintype() == 'multipart':
continue
if part.get_content_maintype()=='text' and part.get_content_subtype() == 'plain':
if part.get_content_maintype()=='text' and part.get_content_subtype() in ('plain','html'):
buf = part.get_payload(decode=True)
if buf:
txt = buf.decode(part.get_charsets()[0] or 'ascii', 'replace')
@ -191,7 +192,8 @@ class email_parser(object):
body['body'] = body_data
data = {
'history_line': [(0, 0, {'name': 'Close','section_id': self.section_id,'canal_id': self.canal_id,'description': body['body'], 'email': msg['From']})],
'description': body['body'],
'history_line': [(0, 0, {'description': body['body'], 'email': msg['From']})],
}
act = 'case_close'
if 'state' in actions:
@ -246,7 +248,8 @@ class email_parser(object):
self.rpc('crm.case', act, [id])
body2 = '\n'.join(map(lambda l: '> '+l, (body or '').split('\n')))
data = {
'history_line': [(0, 0, {'name': 'Open','section_id': self.section_id,'canal_id': self.canal_id,'description': body, 'email': msg['From'][:84]})],
'description':body,
'history_line': [(0, 0, {'description': body, 'email': msg['From'][:84]})],
}
self.rpc('crm.case', 'write', [id], data)
return id

View File

@ -21,6 +21,9 @@
##############################################################################
import crm_wizard
import wizard_crm_send_email
import wizard_crm_new_send_email
import wizard_fetch_mail
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,101 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from mx.DateTime import now
import wizard
import netsvc
import ir
import pooler
import tools
from tools.translate import _
email_send_form = '''<?xml version="1.0"?>
<form string="Mass Mailing">
<field name="to"/>
<newline/>
<field name="cc"/>
<newline/>
<field name="subject"/>
<newline/>
<field name="text" />
</form>'''
email_send_fields = {
'to': {'string':"To", 'type':'char', 'size':64, 'required':True},
'cc': {'string':"CC", 'type':'char', 'size':128,},
'subject': {'string':'Subject', 'type':'char', 'size':128, 'required':True},
'text': {'string':'Message', 'type':'text_tag', 'required':True}
}
# this sends an email to ALL the addresses of the selected partners.
def _mass_mail_send(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
case_pool=pool.get('crm.case')
case = case_pool.browse(cr,uid,data['ids'])[0]
case_pool._history(cr, uid, [case], _('Send'), history=True, email=False)
case_pool.write(cr, uid, [case.id], {
'som': False,
'canal_id': False,
})
emails = [data['form']['to']] + (data['form']['cc'] or '').split(',')
emails = filter(None, emails)
body = data['form']['text']
if case.user_id.signature:
body += '\n\n%s' % (case.user_id.signature)
tools.email_send(
case.user_id.address_id.email,
emails,
data['form']['subject'],
case_pool.format_body(body),
reply_to=case.section_id.reply_to,
tinycrm=str(case.id)
)
return {}
def _get_info(self, cr, uid, data, context):
if not data['id']:
return {}
pool = pooler.get_pool(cr.dbname)
case = pool.get('crm.case').browse(cr,uid,data['ids'])[0]
if not case.email_from:
raise wizard.except_wizard(_('Error'),_('You must put a Partner eMail to use this action!'))
if not case.user_id:
raise wizard.except_wizard(_('Error'),_('You must define a responsible user for this case in order to use this action!'))
return {'to': case.email_from,'subject': '['+str(case.id)+'] '+case.name,'cc': case.email_cc or ''}
class wizard_send_mail(wizard.interface):
states = {
'init': {
'actions': [_get_info],
'result': {'type': 'form', 'arch': email_send_form, 'fields': email_send_fields, 'state':[('end','Cancel','gtk-cancel'), ('send','Send Email','gtk-go-forward')]}
},
'send': {
'actions': [_mass_mail_send],
'result': {'type': 'state', 'state':'end'}
}
}
wizard_send_mail('crm.new.send.mail')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,103 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from mx.DateTime import now
import wizard
import netsvc
import ir
import pooler
import tools
from tools.translate import _
email_send_form = '''<?xml version="1.0"?>
<form string="Mass Mailing">
<field name="to"/>
<newline/>
<field name="cc"/>
<newline/>
<field name="subject"/>
<newline/>
<field name="text" />
</form>'''
email_send_fields = {
'to': {'string':"To", 'type':'char', 'size':64, 'required':True},
'cc': {'string':"CC", 'type':'char', 'size':128,},
'subject': {'string':'Subject', 'type':'char', 'size':128, 'required':True},
'text': {'string':'Message', 'type':'text_tag', 'required':True}
}
# this sends an email to ALL the addresses of the selected partners.
def _mass_mail_send(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
case_pool=pool.get('crm.case')
hist_obj = pool.get('crm.case.history').browse(cr,uid,data['ids'])[0]
case = hist_obj.log_id.case_id
case_pool._history(cr, uid, [case], _('Send'), history=True, email=False)
case_pool.write(cr, uid, [case.id], {
'som': False,
'canal_id': False,
})
emails = [data['form']['to']] + (data['form']['cc'] or '').split(',')
emails = filter(None, emails)
body = data['form']['text']
if case.user_id.signature:
body += '\n\n%s' % (case.user_id.signature)
tools.email_send(
case.user_id.address_id.email,
emails,
data['form']['subject'],
case_pool.format_body(body),
reply_to=case.section_id.reply_to,
tinycrm=str(case.id)
)
return {}
def _get_info(self, cr, uid, data, context):
if not data['id']:
raise wizard.except_wizard(_('Error'),_('There is no mail to reply!'))
pool = pooler.get_pool(cr.dbname)
hist_obj = pool.get('crm.case.history').browse(cr,uid,data['ids'])[0]
case = hist_obj.log_id.case_id
if not case.email_from:
raise wizard.except_wizard(_('Error'),_('You must put a Partner eMail to use this action!'))
if not case.user_id:
raise wizard.except_wizard(_('Error'),_('You must define a responsible user for this case in order to use this action!'))
return {'to': case.email_from,'subject': '['+str(case.id)+'] '+case.name,'cc': case.email_cc or '', 'text': '> ' + case.description.replace('\n','\n> ')}
class wizard_send_mail(wizard.interface):
states = {
'init': {
'actions': [_get_info],
'result': {'type': 'form', 'arch': email_send_form, 'fields': email_send_fields, 'state':[('end','Cancel','gtk-cancel'), ('send','Send Email','gtk-go-forward')]}
},
'send': {
'actions': [_mass_mail_send],
'result': {'type': 'state', 'state':'end'}
}
}
wizard_send_mail('crm.send.mail')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,53 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import time
import pooler
import tools
import os
_email_form = '''<?xml version="1.0"?>
<form string="Email Gateway">
<label string="Fetch Email from Email Gate Way" />
</form>'''
_email_fields = {
}
def fetch_mail(self , cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
gateway_pool=pool.get('crm.email.gateway')
gateway_pool.fetch_mail(cr, uid, data['ids'], context=context)
return {}
class wiz_fetch_mail(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type': 'form', 'arch':_email_form, 'fields':_email_fields, 'state':[('run','Run','gtk-execute'),('end','Cancel','gtk-cancel')]}
},
'run': {
'actions': [fetch_mail],
'result': {'type': 'state', 'state': 'end'}
},
}
wiz_fetch_mail('crm.case.section.fetchmail')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -31,7 +31,7 @@ people to intelligently and efficiently manage tasks, issues,
and requests. It manages key tasks such as communication,
identification, prioritization, assignment, resolution and notification.
This module provide screens like: jobs hiring process, leads, business
This module provide screens like: jobs hiring process, prospects, business
opportunities, fund raising tracking, support & helpdesk, calendar of
meetings, eso.
""",

View File

@ -40,6 +40,8 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_bugs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view0">
<field name="sequence" eval="1"/>
@ -69,6 +71,9 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+'),(\'categ_id\',\'&lt;&gt;\','+str(categ3)+'),(\'state\',\'=\',\'draft\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_bugs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_all1">
<field name="sequence" eval="1"/>
@ -88,7 +93,7 @@
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_category_act_all1"/>
</record>
<menuitem id="menu_crm_case_categ0_act_all1" action="crm_case_category_act_all1" parent="menu_crm_case_categ_act0"/>
<menuitem id="menu_crm_case_categ0_act_all1" action="crm_case_category_act_all1" parent="menu_crm_case_categ_act0" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_all2">
<field name="name">Open Bugs</field>
@ -97,6 +102,9 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+'),(\'categ_id\',\'&lt;&gt;\','+str(categ3)+'),(\'stage_id\',\'&lt;&gt;\','+str(stage7)+'),(\'state\',\'=\',\'open\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_bugs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_all2">
<field name="sequence" eval="1"/>
@ -116,7 +124,7 @@
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_category_act_all2"/>
</record>
<menuitem id="menu_crm_case_categ0_act_all2" action="crm_case_category_act_all2" parent="menu_crm_case_categ_act0"/>
<menuitem id="menu_crm_case_categ0_act_all2" action="crm_case_category_act_all2" parent="menu_crm_case_categ_act0" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_all3">
<field name="name">Bugs With Patches Waiting Approval</field>
@ -125,6 +133,9 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+'),(\'categ_id\',\'&lt;&gt;\','+str(categ3)+'),(\'categ_id\',\'=\','+str(categ2)+'), (\'stage_id\',\'=\','+str(stage5)+'),(\'state\',\'=\',\'open\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_bugs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_all3">
<field name="sequence" eval="1"/>
@ -144,7 +155,7 @@
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_category_act_all3"/>
</record>
<menuitem id="menu_crm_case_categ0_act_all3" action="crm_case_category_act_all3" parent="menu_crm_case_categ0_act_all2"/>
<menuitem id="menu_crm_case_categ0_act_all3" action="crm_case_category_act_all3" parent="menu_crm_case_categ0_act_all2" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_all4">
<field name="name">Bugs Not Fixed</field>
@ -153,6 +164,9 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+'), (\'categ_id\',\'&lt;&gt;\','+str(categ3)+'),(\'categ_id\',\'=\','+str(categ1)+'), (\'stage_id\',\'&lt;&gt;\','+str(stage2)+'),(\'state\',\'=\',\'open\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_bugs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_all4">
<field name="sequence" eval="1"/>
@ -172,7 +186,7 @@
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_category_act_all4"/>
</record>
<menuitem id="menu_crm_case_categ0_act_all4" action="crm_case_category_act_all4" parent="menu_crm_case_categ0_act_all2"/>
<menuitem id="menu_crm_case_categ0_act_all4" action="crm_case_category_act_all4" parent="menu_crm_case_categ0_act_all2" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_all5">
<field name="name">Pending Bugs</field>
@ -181,6 +195,9 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+'),(\'categ_id\',\'&lt;&gt;\','+str(categ3)+'),(\'state\',\'=\',\'pending\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_bugs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_all5">
<field name="sequence" eval="1"/>
@ -200,7 +217,7 @@
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_category_act_all5"/>
</record>
<menuitem id="menu_crm_case_categ0_act_all5" action="crm_case_category_act_all5" parent="menu_crm_case_categ_act0"/>
<menuitem id="menu_crm_case_categ0_act_all5" action="crm_case_category_act_all5" parent="menu_crm_case_categ_act0" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_all6">
<field name="name">Planned For Future Release</field>
@ -209,6 +226,9 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+'),(\'categ_id\',\'&lt;&gt;\','+str(categ3)+'),(\'stage_id\',\'=\','+str(stage7)+'),(\'state\',\'=\',\'pending\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_bugs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_all6">
<field name="sequence" eval="1"/>
@ -228,8 +248,7 @@
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_category_act_all6"/>
</record>
<menuitem id="menu_crm_case_categ0_act_all6" action="crm_case_category_act_all6" parent="menu_crm_case_categ0_act_all5"/>
<menuitem id="menu_crm_case_categ0_act_all6" action="crm_case_category_act_all6" parent="menu_crm_case_categ0_act_all5" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_all7">
<field name="name">Waiting For Reporter Response</field>
@ -238,6 +257,9 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+'),(\'categ_id\',\'&lt;&gt;\','+str(categ3)+'),(\'stage_id\',\'=\','+str(stage5)+'),(\'state\',\'=\',\'pending\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_bugs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_all7">
<field name="sequence" eval="1"/>
@ -257,8 +279,7 @@
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_category_act_all7"/>
</record>
<menuitem id="menu_crm_case_categ0_act_all7" action="crm_case_category_act_all7" parent="menu_crm_case_categ0_act_all5"/>
<menuitem id="menu_crm_case_categ0_act_all7" action="crm_case_category_act_all7" parent="menu_crm_case_categ0_act_all5" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_all8">
<field name="name">Old Bugs</field>
@ -267,6 +288,9 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+'),(\'categ_id\',\'&lt;&gt;\','+str(categ3)+'),(\'state\',\'&lt;&gt;\',\'draft\'),(\'state\',\'&lt;&gt;\',\'open\'),(\'state\',\'&lt;&gt;\',\'pending\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_bugs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_all8">
<field name="sequence" eval="1"/>
@ -286,7 +310,7 @@
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_category_act_all8"/>
</record>
<menuitem id="menu_crm_case_categ0_act_all8" action="crm_case_category_act_all8" parent="menu_crm_case_categ_act0"/> <!--
<menuitem id="menu_crm_case_categ0_act_all8" action="crm_case_category_act_all8" parent="menu_crm_case_categ_act0" groups="base.group_extended_menu"/> <!--
MY BUGS
-->
<record model="ir.actions.act_window" id="crm_case_category_act_my0">
@ -296,6 +320,9 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+'),(\'user_id\',\'=\',uid)]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_bugs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_my0">
<field name="sequence" eval="1"/>
@ -315,15 +342,16 @@
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_category_act_my0"/>
</record>
<menuitem parent="menu_crm_case_bug_track" id="menu_crm_case_categ0_act_my0" action="crm_case_category_act_my0"/>
<menuitem parent="menu_crm_case_bug_track" id="menu_crm_case_categ0_act_my0" action="crm_case_category_act_my0" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_categ_act_new">
<record model="ir.actions.act_window" id="crm_case_categ_act_new">
<field name="name">New Bug</field>
<field name="res_model">crm.case</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" ref="crm_case_form_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view1_new">
<field name="sequence" eval="1"/>
@ -337,7 +365,7 @@
<field name="view_id" ref="crm_case_tree_view"/>
<field name="act_window_id" ref="crm_case_categ_act_new"/>
</record>
<menuitem id="menu_crm_case_categ_act_new" action="crm_case_categ_act_new" parent="menu_crm_case_bug_track"/>
<menuitem id="menu_crm_case_categ_act_new" action="crm_case_categ_act_new" parent="menu_crm_case_bug_track" sequence="50"/>
<record model="ir.actions.act_window" id="crm_case_category_act_my1">
<field name="name">My Open Bugs</field>
@ -346,6 +374,9 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+'),(\'user_id\',\'=\',uid),(\'state\',\'=\',\'open\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_bugs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_my1">
<field name="sequence" eval="1"/>
@ -365,7 +396,7 @@
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_category_act_my1"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_my0" id="menu_crm_case_categ0_act_my1" action="crm_case_category_act_my1"/>
<menuitem parent="menu_crm_case_categ0_act_my0" id="menu_crm_case_categ0_act_my1" action="crm_case_category_act_my1" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_my2">
<field name="name">My Bugs With Patches</field>
@ -374,6 +405,9 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+'),(\'user_id\',\'=\',uid),(\'categ_id\',\'=\','+str(categ2)+'), (\'stage_id\',\'=\','+str(stage5)+'),(\'state\',\'=\',\'open\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_bugs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_my2">
<field name="sequence" eval="1"/>
@ -393,7 +427,7 @@
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_category_act_my2"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_my1" id="menu_crm_case_categ0_act_my2" action="crm_case_category_act_my2"/>
<menuitem parent="menu_crm_case_categ0_act_my1" id="menu_crm_case_categ0_act_my2" action="crm_case_category_act_my2" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_my3">
<field name="name">My Bugs Not Fixed</field>
@ -402,6 +436,9 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+'),(\'user_id\',\'=\',uid),(\'categ_id\',\'=\','+str(categ1)+'), (\'stage_id\',\'&lt;&gt;\','+str(stage2)+'),(\'state\',\'=\',\'open\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_bugs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_my3">
<field name="sequence" eval="1"/>
@ -421,18 +458,20 @@
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_category_act_my3"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_my1" id="menu_crm_case_categ0_act_my3" action="crm_case_category_act_my3"/>
<menuitem parent="menu_crm_case_categ0_act_my1" id="menu_crm_case_categ0_act_my3" action="crm_case_category_act_my3" groups="base.group_extended_menu"/>
<!--
ALL FEATURE REQUESTS
-->
<record model="ir.actions.act_window" id="crm_case_category_act_f0">
<field name="name">All Feature Request</field>
<field name="name">All Feature Requests</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_tree_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+'),(\'categ_id\',\'=\','+str(categ3)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_feature_request_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_f0">
<field name="sequence" eval="1"/>
@ -461,6 +500,7 @@
<field name="view_mode">form,tree</field>
<field name="view_id" ref="crm_case_form_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+'),(\'categ_id\',\'=\','+str(categ3)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_f1">
<field name="sequence" eval="1"/>
@ -474,8 +514,7 @@
<field name="view_id" ref="crm_case_tree_view"/>
<field name="act_window_id" ref="crm_case_category_act_f1"/>
</record>
<menuitem parent="menu_crm_case_bug_track" id="menu_crm_case_category_act_f1" action="crm_case_category_act_f1"/>
<menuitem parent="menu_crm_case_category_act_f0" id="menu_crm_case_category_act_f1" action="crm_case_category_act_f1" sequence="50"/>
<record model="ir.actions.act_window" id="crm_case_category_act_f2">
<field name="name">Feature Requests Waiting Approval</field>
@ -484,6 +523,9 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+'), (\'categ_id\',\'=\','+str(categ3)+'), (\'state\',\'=\',\'draft\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_feature_request_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_f2">
<field name="sequence" eval="1"/>
@ -503,7 +545,7 @@
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_category_act_f2"/>
</record>
<menuitem parent="menu_crm_case_category_act_f0" id="menu_crm_case_categ0_act_f2" action="crm_case_category_act_f2"/>
<menuitem parent="menu_crm_case_category_act_f0" id="menu_crm_case_categ0_act_f2" action="crm_case_category_act_f2" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_f3">
<field name="name">Open Feature Requests</field>
<field name="res_model">crm.case</field>
@ -511,6 +553,9 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+'),(\'categ_id\',\'=\','+str(categ3)+'),(\'stage_id\',\'&lt;&gt;\','+str(stage7)+'),(\'state\',\'=\',\'open\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_feature_request_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_f3">
<field name="sequence" eval="1"/>
@ -530,7 +575,7 @@
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_category_act_f3"/>
</record>
<menuitem parent="menu_crm_case_category_act_f0" id="menu_crm_case_categ0_act_f3" action="crm_case_category_act_f3"/>
<menuitem parent="menu_crm_case_category_act_f0" id="menu_crm_case_categ0_act_f3" action="crm_case_category_act_f3" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_f4">
<field name="name">Pending Feature Requests</field>
@ -539,6 +584,9 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+'),(\'categ_id\',\'=\','+str(categ3)+'),(\'state\',\'=\',\'pending\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_feature_request_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_f4">
<field name="sequence" eval="1"/>
@ -558,7 +606,7 @@
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_category_act_f4"/>
</record>
<menuitem parent="menu_crm_case_category_act_f0" id="menu_crm_case_categ0_act_f4" action="crm_case_category_act_f4"/>
<menuitem parent="menu_crm_case_category_act_f0" id="menu_crm_case_categ0_act_f4" action="crm_case_category_act_f4" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_f5">
<field name="name">Planned For Future Release</field>
@ -567,6 +615,9 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+'),(\'categ_id\',\'=\','+str(categ3)+'),(\'state\',\'=\',\'pending\'),(\'stage_id\',\'=\','+str(stage7)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_feature_request_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_f5">
<field name="sequence" eval="1"/>
@ -586,7 +637,7 @@
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_category_act_f5"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_f4" id="menu_crm_case_categ0_act_f5" action="crm_case_category_act_f5"/>
<menuitem parent="menu_crm_case_categ0_act_f4" id="menu_crm_case_categ0_act_f5" action="crm_case_category_act_f5" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_f6">
<field name="name">Waiting For Reporter Response</field>
@ -595,6 +646,9 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+'),(\'categ_id\',\'=\','+str(categ3)+'),(\'state\',\'=\',\'pending\'),(\'stage_id\',\'=\','+str(stage5)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_feature_request_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_f6">
<field name="sequence" eval="1"/>
@ -614,7 +668,7 @@
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_category_act_f6"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_f4" id="menu_crm_case_categ0_act_f6" action="crm_case_category_act_f6"/>
<menuitem parent="menu_crm_case_categ0_act_f4" id="menu_crm_case_categ0_act_f6" action="crm_case_category_act_f6" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_f7">
<field name="name">Old Feature Requests</field>
@ -623,6 +677,9 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+'),(\'categ_id\',\'=\','+str(categ3)+'),(\'state\',\'&lt;&gt;\',\'draft\'),(\'state\',\'&lt;&gt;\',\'open\'),(\'state\',\'&lt;&gt;\',\'pending\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_feature_request_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_f7">
<field name="sequence" eval="1"/>
@ -642,7 +699,7 @@
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_category_act_f7"/>
</record>
<menuitem parent="menu_crm_case_category_act_f0" id="menu_crm_case_categ0_act_f7" action="crm_case_category_act_f7"/>
<menuitem parent="menu_crm_case_category_act_f0" id="menu_crm_case_categ0_act_f7" action="crm_case_category_act_f7" groups="base.group_extended_menu"/>
</data>
</openerp>

View File

@ -36,53 +36,23 @@
<field name="categ_id" on_change="onchange_categ_id(categ_id)"/>
<field name="priority" string="Severity"/>
<separator colspan="4"/>
<field name="history_line" colspan="2" nolabel="1" mode="tree,form">
<form string="Resolution 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="Resolution history">
<field name="description"/>
<field name="email"/>
<field name="date"/>
</tree>
</field>
<group col="2" colspan="2" expand="1">
<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 &amp; Historize" states="open"
type="object"/>
<button name="case_log" string="Historize" states="open"
type="object"/>
</group>
<newline/>
<separator string= "Description" colspan="4"/>
<field name="description" nolabel="1" colspan="4"/>
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state" />
<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_escalate" string="Escalate" states="open,draft,pending" type="object"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object"/>
<button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
<button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" icon="gtk-go-up"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
</group>
</page>
<page string="Internal Notes">
<separator string= "Notes" colspan="4"/>
<field name="note" nolabel="1"/>
</page>
<page string="Extra Info">
<field name="id" select="2"/>
<page string="History">
<field name="id" select="1"/>
<field name="active" />
<field name="email_cc" colspan="4"/>
<separator colspan="4" string="Dates"/>
<field name="create_date"/>
<field name="date_closed"/>
@ -95,8 +65,6 @@
<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"/>
@ -108,6 +76,29 @@
</form>
</field>
</page>
<page string="Emails">
<group colspan="4">
<field colspan="4" name="email_cc" string="CC"/>
</group>
<field name="history_line" colspan="4" nolabel="1" mode="form,tree">
<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"/>
<button colspan="4" string="Reply to Last Email" name="%(crm.wizard_crm_send_mail)d" context="{'mail':'reply'}" icon="gtk-undo" type="action"/>
</form>
<tree string="Communication history">
<field name="description"/>
<field name="email"/>
<field name="date"/>
</tree>
</field>
<button colspan="4" string="Send New Email" name="%(crm.wizard_crm_new_send_mail)d" context="{'mail':'new'}" icon="gtk-go-forward" type="action"/>
</page>
</notebook>
</form>
</field>
@ -127,10 +118,63 @@
<field name="category2_id" string="Version"/>
<field name="user_id"/>
<field name="state"/>
<button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
<button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" icon="gtk-go-up"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="crm_case_calendar_view">
<record id="view_crm_case_bugs_filter" model="ir.ui.view">
<field name="name">crm.case.bugs.select</field>
<field name="model">crm.case</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Bugs">
<group col="5" colspan="1">
<filter icon="gtk-execute" string="My Bugs" domain="[('user_id','=',uid)]" separator="1" help="Bugs Related to Current User"/>
<filter icon="gtk-execute" string="Fixed Bugs" domain="[('section_id.name','=','Bug Tracking'),('stage_id.name','=','Fixed')]" separator="1" help="All Fixed Bugs"/>
<filter icon="gtk-execute" string="Waiting Bugs" domain="[('section_id.name','=','Bug Tracking'),('stage_id.name','=','Awaiting Response')]" separator="1" help="All Waiting Bugs"/>
<filter icon="gtk-execute" string="Future Bugs" domain="[('section_id.name','=','Bug Tracking'),('stage_id.name','=','Future')]" separator="1" help="All Future Bugs"/>
</group>
<group col="4" colspan="4">
<field name="state" select="1">
<filter icon="terp-crm" domain="[('state','=','draft')]" help="Draft Bugs"/>
<filter icon="terp-crm" domain="[('state','=','open')]" help="Open Bugs"/>
<filter icon="terp-crm" domain="[('state','=','pending')]" help="Pending Bugs"/>
</field>
<field name="name" select='1'/>
<field name="user_id" select="1" widget="selection"/>
</group>
</search>
</field>
</record>
<record id="view_crm_case_feature_request_filter" model="ir.ui.view">
<field name="name">crm.case.feature.request.select</field>
<field name="model">crm.case</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Feature Request">
<group col='6' colspan='4'>
<filter icon="gtk-execute" string="My Feature Request" domain="[('user_id','=',uid)]" separator="1" help="Feature Requests Related to Current User"/>
<field name="state" select="1">
<filter icon="terp-crm" domain="[('state','=','draft')]" help="Draft Feature Request"/>
<filter icon="terp-crm" domain="[('state','=','open')]" help="Open Feature Request"/>
<filter icon="terp-crm" domain="[('state','=','pending')]" help="Pending Feature Request"/>
</field>
<separator orientation="vertical"/>
<field name="name" select='1'/>
<field name="user_id" select="1" widget="selection"/>
</group>
</search>
</field>
</record>
<record model="ir.ui.view" id="crm_case_calendar_view">
<field name="name">CRM - Bug Tracker Calendar</field>
<field name="model">crm.case</field>
<field name="type">calendar</field>

View File

@ -11,6 +11,8 @@
<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'))+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_claims_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_claim0">
<field name="sequence" eval="1"/>
@ -39,6 +41,9 @@
<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)]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_claims_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_claim_my1">
<field name="sequence" eval="1"/>
@ -58,7 +63,7 @@
<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"/>
<menuitem name="My Claims" id="menu_crm_case_category_act_claim_my1" action="crm_case_category_act_claim_my1" parent="menu_crm_case_claims" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_claim1">
<field name="name">Claims</field>
@ -66,6 +71,7 @@
<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'))+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_claim1">
<field name="sequence" eval="1"/>
@ -73,7 +79,7 @@
<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_claims"/>
<menuitem name="New Claim" id="menu_crm_case_categ0_act_claim" action="crm_case_category_act_claim1" parent="menu_crm_case_claims" sequence="50"/>
<record model="ir.actions.act_window" id="crm_case_category_act_claim_my2">
<field name="name">My Unclosed Claims</field>
@ -81,6 +87,9 @@
<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\',\'&lt;&gt;\',\'done\'),(\'state\',\'&lt;&gt;\',\'cancel\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_claims_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_claim_my2">
<field name="sequence" eval="1"/>
@ -100,13 +109,15 @@
<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"/>
<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" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_claim_my2_open">
<field name="name">My Open Claims</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form</field>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_claims'))+'),(\'user_id\',\'=\',uid),(\'state\',\'=\',\'open\')]'"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_claims_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_claim_my2_open">
<field name="sequence" eval="1"/>
@ -126,10 +137,10 @@
<field name="view_id" ref="crm_case_claims_form_view"/>
<field name="act_window_id" ref="crm_case_category_act_claim_my2_open"/>
</record>
<menuitem name="My Open Claims" id="menu_crm_case_categ0_act_claim_my2_open" action="crm_case_category_act_claim_my2" parent="menu_crm_case_categ0_act_claim_my2"/>
<menuitem name="My Open Claims" id="menu_crm_case_categ0_act_claim_my2_open" action="crm_case_category_act_claim_my2_open" parent="menu_crm_case_categ0_act_claim_my2" groups="base.group_extended_menu"/>
<!-- All Claims -->
<menuitem name="All Claims" id="menu_crm_case_categ_claim0" action="crm_case_categ_claim0" parent="menu_crm_case_claims"/>
<menuitem name="All Claims" id="menu_crm_case_categ_claim0" action="crm_case_categ_claim0" parent="menu_crm_case_claims" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_claim_all2">
<field name="name">All Unclosed Claims</field>
@ -137,6 +148,9 @@
<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\',\'&lt;&gt;\',\'done\'),(\'state\',\'&lt;&gt;\',\'cancel\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_claims_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_claim_all2">
<field name="sequence" eval="1"/>
@ -156,7 +170,7 @@
<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"/>
<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" groups="base.group_extended_menu"/>
</data>
</openerp>

View File

@ -18,6 +18,11 @@
<field name="date_closed"/>
<field name="planned_cost" string="Claim Cost"/>
<field name="state"/>
<button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
</tree>
</field>
</record>
@ -41,6 +46,7 @@
<field name="stage_id" select="1" nolabel="1"/>
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
</group>
<field name="case_id"/>
</group>
<notebook>
<page string="Claims Info">
@ -50,63 +56,33 @@
<field name="partner_mobile"/>
<newline/>
<field name="planned_cost" string="Claim Cost"/>
<field name="planned_revenue" string="Claim Revenue"/>
<newline/>
<field name="priority"/>
<field name="category2_id" string="Type of Action" select="1"/>
<field name="ref"/>
<field name="ref2"/>
<separator colspan="2" string="Claim Description"/>
<separator colspan="2" string="Action Description"/>
<field name="note" colspan="2" nolabel="1"/>
<field name="description" colspan="2" nolabel="1"/>
<label string="" colspan="2"/>
<group colspan="2">
<button name="case_log_reply"
string="Send Partner &amp; Historize" states="open"
type="object"/>
<button name="case_log" string="Historize" states="open"
type="object"/>
</group>
<separator colspan="4" string="Claim/Action Description"/>
<field name="description" colspan="4" nolabel="1"/>
<separator colspan="4" string="Status"/>
<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"/>
<button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
</group>
</page>
<page string="Extra Info" groups="base.group_extended">
<field name="id" select="2"/>
<page string="History">
<field name="id" select="1"/>
<field name="active"/>
<field name="email_cc"/>
<field name="canal_id"/>
<field name="som"/>
<separator colspan="4" string="Dates"/>
<field name="create_date"/>
<field name="date_closed"/>
<field name="date_action_last"/>
<field name="date_action_next"/>
<field name="som"/>
<separator colspan="4" string="History"/>
<field name="history_line" colspan="4" 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>
</page>
<page string="History">
<field name="log_ids" nolabel="1" colspan="4">
<form string="Actions">
<separator string="Action Information" colspan="4"/>
@ -118,6 +94,42 @@
</form>
</field>
</page>
<page string="Events">
<field name="child_ids" colspan="4" nolabel="1">
<tree string="Related Cases">
<field name="id"/>
<field name="date"/>
<field name="name"/>
<field name="partner_id"/>
<field name="user_id"/>
<field name="section_id"/>
<field name="state"/>
</tree>
</field>
</page>
<page string="Emails" groups="base.group_extended">
<group colspan="4">
<field colspan="4" name="email_cc" string="CC"/>
</group>
<field name="history_line" colspan="4" nolabel="1" mode="form,tree">
<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"/>
<button colspan="4" string="Reply to Last Email" name="%(crm.wizard_crm_send_mail)d" context="{'mail':'reply'}" icon="gtk-undo" type="action"/>
</form>
<tree string="Communication history">
<field name="description"/>
<field name="email"/>
<field name="date"/>
</tree>
</field>
<button colspan="4" string="Send New Email" name="%(crm.wizard_crm_new_send_mail)d" context="{'mail':'new'}" icon="gtk-go-forward" type="action"/>
</page>
</notebook>
</form>
</field>
@ -137,5 +149,29 @@
</field>
</record>
</data>
<record id="view_crm_case_claims_filter" model="ir.ui.view">
<field name="name">crm.case.claims.select</field>
<field name="model">crm.case</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Claims">
<group col="5" colspan="1">
<filter icon="gtk-execute" string="My Claims" domain="[('user_id','=',uid)]" separator="1" help="Claims Related to Current User"/>
<filter icon="gtk-execute" string="Fixed Claims" domain="[('section_id.name','=','Claims'),('stage_id.name','=','Fixed')]" separator="1" help="All Fixed Claims"/>
<filter icon="gtk-execute" string="Waiting Claims" domain="[('section_id.name','=','Claims'),('stage_id.name','=','Awaiting Response')]" separator="1" help="All Waiting Claims"/>
<filter icon="gtk-execute" string="Accepted Claims" domain="[('section_id.name','=','Claims'),('stage_id.name','=','Accepted as Claim')]" separator="1" help="All Accepted Claims"/>
</group>
<group col="4" colspan="4">
<field name="state" select="1">
<filter icon="terp-crm" domain="[('state','=','draft')]" help="Draft Claims"/>
<filter icon="terp-crm" domain="[('state','=','open')]" help="Open Claims"/>
<filter icon="terp-crm" domain="[('state','=','pending')]" help="Pending Claims"/>
</field>
<field name="name" select='1'/>
<field name="user_id" select="1" widget="selection"/>
</group>
</search>
</field>
</record>
</data>
</openerp>

View File

@ -68,12 +68,12 @@ class crm_cases(osv.osv):
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id)]"),
'category2_id': fields.many2one('crm.case.category2', 'Category Name', domain="[('section_id','=',section_id)]"),
'duration': fields.float('Duration'),
'note': fields.text('Note'),
'case_id': fields.many2one('crm.case', 'Related Case'),
'partner_name': fields.char('Employee Name', size=64),
'partner_name2': fields.char('Employee Email', size=64),
'partner_phone': fields.char('Phone', size=32),
'partner_mobile': fields.char('Mobile', size=32),
'child_ids': fields.one2many('crm.case', 'case_id', 'Events'),
}
def stage_next(self, cr, uid, ids, context={}):
@ -119,7 +119,7 @@ class crm_menu_config_wizard(osv.osv_memory):
_columns = {
'name': fields.char('Name', size=64),
'meeting': fields.boolean('Calendar of Meetings', help="Manages the calendar of meetings of the users."),
'lead': fields.boolean('Leads', help="Allows you to track and manage leads which are pre-sales requests or contacts, the very first contact with a customer request."),
'lead': fields.boolean('Prospect', help="Allows you to track and manage leads which are pre-sales requests or contacts, the very first contact with a customer request."),
'opportunity': fields.boolean('Business Opportunities', help="Tracks identified business opportunities for your sales pipeline."),
'jobs': fields.boolean('Jobs Hiring Process', help="Help you to organise the jobs hiring process: evaluation, meetings, email integration..."),
'document_ics': fields.boolean('Shared Calendar', help=" Will allow you to synchronise your Open ERP calendars with your phone, outlook, Sunbird, ical, ..."),

View File

@ -63,6 +63,20 @@
</field>
</record>
<!-- calendar view -->
<record id="crm_case_calendar_section-view" model="ir.ui.view">
<field name="name">crm.case.calendar.section</field>
<field name="model">crm.case</field>
<field name="type">calendar</field>
<field name="arch" type="xml">
<calendar color="section_id" date_start="date" date_stop="date_deadline" day_length="12" string="Cases">
<field name="name"/>
<field name="partner_id"/>
<field name="state"/>
</calendar>
</field>
</record>
# ------------------------------------------------------
# Stage
# ------------------------------------------------------

View File

@ -2,6 +2,12 @@
<openerp>
<data>
<wizard
string="History of Events"
name="crm.case.history.events"
model="crm.case"
id="wizard_case_history_event" />
<wizard
id="wizard_crm_partner_create"
keyword="client_action_multi"
@ -26,6 +32,13 @@
multi="True"
string="Convert To Opportunity"/>
<wizard
id="wizard_crm_reschedule_phone_call"
keyword="client_action_multi"
model="crm.case"
name="crm.case.reschedule_phone_call"
multi="True"
string="Schedule Phone Call" />
</data>
</openerp>

View File

@ -8,6 +8,8 @@
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="crm_configuration.crm_case_tree_view_fund"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support4)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_fund_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_fund_all1">
<field name="sequence" eval="1"/>
@ -37,6 +39,9 @@
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm_configuration.crm_case_tree_view_fund"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support4)+'),(\'user_id\',\'=\',uid)]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_fund_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_fund_my1">
<field name="sequence" eval="1"/>
@ -56,7 +61,7 @@
<field name="view_id" ref="crm_configuration.crm_case_form_view_fund"/>
<field name="act_window_id" ref="crm_case_category_act_fund_my1"/>
</record>
<menuitem name="My Funds" id="menu_crm_case_category_act_fund_my1" action="crm_case_category_act_fund_my1" parent="menu_crm_case_fund_raise"/>
<menuitem name="My Funds" id="menu_crm_case_category_act_fund_my1" action="crm_case_category_act_fund_my1" parent="menu_crm_case_fund_raise" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_fund1">
<field name="name">Funds</field>
@ -64,6 +69,7 @@
<field name="view_mode">form,graph</field>
<field name="view_id" ref="crm_configuration.crm_case_form_view_fund"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support4)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_fund1">
<field name="sequence" eval="2"/>
@ -77,7 +83,7 @@
<field name="view_id" ref="crm_configuration.crm_case_form_view_fund"/>
<field name="act_window_id" ref="crm_case_category_act_fund1"/>
</record>
<menuitem name="New Fund Opportunity" id="menu_crm_case_categ0_act_fund" action="crm_case_category_act_fund1" parent="menu_crm_case_category_act_fund_my1"/>
<menuitem name="New Fund Opportunity" id="menu_crm_case_categ0_act_fund" action="crm_case_category_act_fund1" parent="menu_crm_case_fund_raise" sequence="50"/>
<record model="ir.actions.act_window" id="crm_case_category_act_fund_my2">
<field name="name">My Funds Waiting Validation</field>
@ -85,6 +91,9 @@
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="crm_configuration.crm_case_tree_view_fund"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support4)+'),(\'user_id\',\'=\',uid),(\'state\',\'=\',\'draft\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_fund_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_fund_my2">
<field name="sequence" eval="1"/>
@ -104,7 +113,7 @@
<field name="view_id" ref="crm_configuration.crm_case_graph_view_fund"/>
<field name="act_window_id" ref="crm_case_category_act_fund_my2"/>
</record>
<menuitem name="My Funds Waiting Validation" id="menu_crm_case_categ0_act_fund_my2" action="crm_case_category_act_fund_my2" parent="menu_crm_case_category_act_fund_my1"/>
<menuitem name="My Funds Waiting Validation" id="menu_crm_case_categ0_act_fund_my2" action="crm_case_category_act_fund_my2" parent="menu_crm_case_category_act_fund_my1" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_fund_my3">
<field name="name">My Funds To Be Processed</field>
@ -112,6 +121,9 @@
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="crm_configuration.crm_case_tree_view_fund"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support4)+'),(\'user_id\',\'=\',uid),(\'state\',\'=\',\'open\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_fund_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_fund_my3">
<field name="sequence" eval="1"/>
@ -131,10 +143,10 @@
<field name="view_id" ref="crm_configuration.crm_case_graph_view_fund"/>
<field name="act_window_id" ref="crm_case_category_act_fund_my3"/>
</record>
<menuitem name="My Funds To Be Processed" id="menu_crm_case_categ0_act_fund_my3" action="crm_case_category_act_fund_my3" parent="menu_crm_case_category_act_fund_my1"/>
<menuitem name="My Funds To Be Processed" id="menu_crm_case_categ0_act_fund_my3" action="crm_case_category_act_fund_my3" parent="menu_crm_case_category_act_fund_my1" groups="base.group_extended_menu"/>
<!-- All Funds -->
<menuitem name="All Funds" id="menu_crm_case_categ0_act_fund_all1" action="crm_case_category_act_fund_all1" parent="menu_crm_case_fund_raise"/>
<menuitem name="All Funds" id="menu_crm_case_categ0_act_fund_all1" action="crm_case_category_act_fund_all1" parent="menu_crm_case_fund_raise" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_fund_all2">
<field name="name">All Funds Waiting Validation</field>
@ -142,6 +154,9 @@
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="crm_configuration.crm_case_tree_view_fund"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support4)+'),(\'state\',\'=\',\'draft\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_fund_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_fund_all2">
<field name="sequence" eval="1"/>
@ -161,7 +176,7 @@
<field name="view_id" ref="crm_configuration.crm_case_graph_view_fund"/>
<field name="act_window_id" ref="crm_case_category_act_fund_all2"/>
</record>
<menuitem name="All Funds Waiting Validation" id="menu_crm_case_categ0_act_fund_all2" action="crm_case_category_act_fund_all2" parent="menu_crm_case_categ0_act_fund_all1"/>
<menuitem name="All Funds Waiting Validation" id="menu_crm_case_categ0_act_fund_all2" action="crm_case_category_act_fund_all2" parent="menu_crm_case_categ0_act_fund_all1" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_fund_all3">
<field name="name">All Funds To Be Processed</field>
@ -169,6 +184,9 @@
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="crm_configuration.crm_case_tree_view_fund"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support4)+'),(\'state\',\'=\',\'open\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_fund_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_fund_all3">
<field name="sequence" eval="1"/>
@ -188,7 +206,7 @@
<field name="view_id" ref="crm_configuration.crm_case_graph_view_fund"/>
<field name="act_window_id" ref="crm_case_category_act_fund_all3"/>
</record>
<menuitem name="All Funds To Be Processed" id="menu_crm_case_categ0_act_fund_all3" action="crm_case_category_act_fund_all3" parent="menu_crm_case_categ0_act_fund_all1"/>
<menuitem name="All Funds To Be Processed" id="menu_crm_case_categ0_act_fund_all3" action="crm_case_category_act_fund_all3" parent="menu_crm_case_categ0_act_fund_all1" groups="base.group_extended_menu"/>
</data>
</openerp>

View File

@ -19,6 +19,12 @@
<field name="probability"/>
<field name="user_id"/>
<field name="state"/>
<button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-close"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
<button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" icon="gtk-go-up"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
</tree>
</field>
</record>
@ -49,63 +55,34 @@
<field name="planned_revenue"/>
<field name="probability"/>
<separator colspan="4" string="Description Information"/>
<field name="note" nolabel="1" colspan="4"/>
<field name="description" nolabel="1" colspan="4"/>
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state" select="2"/>
<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_escalate" string="Escalate" states="open,draft,pending" type="object"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object"/>
<button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-close"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
<button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" icon="gtk-go-up"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
</group>
</page>
<page string="Extra Info">
<field name="id" select="2"/>
<page string="History">
<field name="id" select="1"/>
<field name="active"/>
<field name="email_cc"/>
<field name="priority" string="Priority"/>
<newline/>
<field name="canal_id"/>
<field name="som"/>
<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="canal_id"/>
<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 &amp; 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"/>
@ -117,6 +94,29 @@
</form>
</field>
</page>
<page string="Emails">
<group colspan="4">
<field colspan="4" name="email_cc" string="CC"/>
</group>
<field name="history_line" colspan="4" nolabel="1" mode="form,tree">
<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"/>
<button colspan="4" string="Reply to Last Email" name="%(crm.wizard_crm_send_mail)d" context="{'mail':'reply'}" icon="gtk-undo" type="action"/>
</form>
<tree string="Communication history">
<field name="description"/>
<field name="email"/>
<field name="date"/>
</tree>
</field>
<button colspan="4" string="Send New Email" name="%(crm.wizard_crm_new_send_mail)d" context="{'mail':'new'}" icon="gtk-go-forward" type="action"/>
</page>
</notebook>
</form>
</field>
@ -145,5 +145,26 @@
</graph>
</field>
</record>
<record id="view_crm_case_fund_filter" model="ir.ui.view">
<field name="name">crm.case.fund.select</field>
<field name="model">crm.case</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Funds">
<group col='6' colspan='4'>
<filter icon="gtk-execute" string="My Funds" domain="[('user_id','=',uid)]" separator="1" help="Funds Related to Current User"/>
<field name="state" select="1">
<filter icon="terp-crm" domain="[('state','=','draft')]" help="Draft Funds"/>
<filter icon="terp-crm" domain="[('state','=','open')]" help="Open Funds"/>
<filter icon="terp-crm" domain="[('state','=','pending')]" help="Pending Funds"/>
</field>
<field name="name" select='1'/>
<field name="user_id" select="1" widget="selection"/>
</group>
</search>
</field>
</record>
</data>
</openerp>

View File

@ -10,6 +10,8 @@
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm.crm_case_tree-view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_help'))+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="search_view_id" ref="crm.view_crm_case_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_act111">
<field name="sequence" eval="1"/>
@ -37,6 +39,9 @@
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm.crm_case_tree-view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_help'))+'),(\'user_id\',\'=\',uid)]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm.view_crm_case_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_helpdesk_tree_view1">
<field name="sequence" eval="1"/>
@ -57,7 +62,7 @@
<field name="act_window_id" ref="crm_case_categ_help_act"/>
</record>
<menuitem parent="menu_help_support_main" id="menu_crm_case_helpdesk_my_act" action="crm_case_categ_help_act"/>
<menuitem parent="menu_help_support_main" id="menu_crm_case_helpdesk_my_act" action="crm_case_categ_help_act" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_categ_help_new_act">
<field name="name">New Helpdesk</field>
@ -65,6 +70,7 @@
<field name="view_mode">form,tree</field>
<field name="view_id" ref="crm.crm_case-view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_help'))+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_helpdesk_tree_view1">
<field name="sequence" eval="2"/>
@ -79,7 +85,7 @@
<field name="act_window_id" ref="crm_case_categ_help_new_act"/>
</record>
<menuitem parent="menu_help_support_main" id="menu_crm_case_categ_help_new_act" action="crm_case_categ_help_new_act" sequence="1"/>
<menuitem parent="menu_help_support_main" id="menu_crm_case_categ_help_new_act" action="crm_case_categ_help_new_act" sequence="50"/>
<record model="ir.actions.act_window" id="crm_case_helpdesk_act_my1">
<field name="name">My Unclosed Requests</field>
@ -87,6 +93,9 @@
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm.crm_case_tree-view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_help'))+'),(\'user_id\',\'=\',uid),(\'state\',\'&lt;&gt;\',\'done\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm.view_crm_case_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_helpdesk_tree_view_my1">
@ -110,7 +119,7 @@
<field name="act_window_id" ref="crm_case_helpdesk_act_my1"/>
</record>
<menuitem parent="menu_crm_case_helpdesk_my_act" id="menu_crm_case_helpdesk_act_my_helpdesk" action="crm_case_helpdesk_act_my1"/>
<menuitem parent="menu_crm_case_helpdesk_my_act" id="menu_crm_case_helpdesk_act_my_helpdesk" action="crm_case_helpdesk_act_my1" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_helpdesk_act_my2">
<field name="name">My helpdesk Propositions to Review</field>
@ -118,6 +127,9 @@
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm.crm_case_tree-view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_help'))+'),(\'user_id\',\'=\',uid),(\'state\',\'=\',\'draft\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm.view_crm_case_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_my2">
<field name="sequence" eval="1"/>
@ -137,7 +149,7 @@
<field name="view_id" ref="crm.crm_case-view"/>
<field name="act_window_id" ref="crm_case_helpdesk_act_my2"/>
</record>
<menuitem parent="menu_crm_case_helpdesk_my_act" id="menu_crm_case_helpdesk_act_myhelpdesk2" action="crm_case_helpdesk_act_my2"/>
<menuitem parent="menu_crm_case_helpdesk_my_act" id="menu_crm_case_helpdesk_act_myhelpdesk2" action="crm_case_helpdesk_act_my2" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_helpdesk_act_my1">
<field name="name">My Pending helpdesk Requests</field>
@ -145,6 +157,9 @@
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm.crm_case_tree-view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_help'))+'),(\'user_id\',\'=\',uid),(\'state\',\'=\',\'pending\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm.view_crm_case_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_my1">
<field name="sequence" eval="1"/>
@ -164,7 +179,7 @@
<field name="view_id" ref="crm.crm_case-view"/>
<field name="act_window_id" ref="crm_case_helpdesk_act_my1"/>
</record>
<menuitem parent="menu_crm_case_helpdesk_my_act" id="menu_crm_case_helpdesk_act_myhelpdesk1" action="crm_case_helpdesk_act_my1"/>
<menuitem parent="menu_crm_case_helpdesk_my_act" id="menu_crm_case_helpdesk_act_myhelpdesk1" action="crm_case_helpdesk_act_my1" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_helpdesk_act_my0">
<field name="name">My Open Helpdesk Requests</field>
@ -172,6 +187,9 @@
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm.crm_case_tree-view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_help'))+'),(\'user_id\',\'=\',uid),(\'state\',\'=\',\'open\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm.view_crm_case_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_my0">
<field name="sequence" eval="1"/>
@ -191,7 +209,7 @@
<field name="view_id" ref="crm.crm_case-view"/>
<field name="act_window_id" ref="crm_case_helpdesk_act_my0"/>
</record>
<menuitem parent="menu_crm_case_helpdesk_my_act" id="menu_crm_case_helpdesk_act_myhelpdesk0" action="crm_case_helpdesk_act_my0"/>
<menuitem parent="menu_crm_case_helpdesk_my_act" id="menu_crm_case_helpdesk_act_myhelpdesk0" action="crm_case_helpdesk_act_my0" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_helpdesk_act_myhelpdesk">
@ -200,6 +218,7 @@
<field name="view_mode">calendar,tree,form</field>
<field name="view_id" ref="crm.crm_case_calendar-view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_help'))+'),(\'state\',\'=\',\'done\'),(\'user_id\',\'=\',uid)]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_calendar_view_myhelpdesk">
<field name="sequence" eval="1"/>
@ -219,13 +238,13 @@
<field name="view_id" ref="crm.crm_case-view"/>
<field name="act_window_id" ref="crm_case_helpdesk_act_myhelpdesk"/>
</record>
<menuitem parent="menu_crm_case_helpdesk_my_act" id="menu_crm_case_helpdesk_act_myhelpdesk" action="crm_case_helpdesk_act_myhelpdesk"/>
<menuitem parent="menu_crm_case_helpdesk_my_act" id="menu_crm_case_helpdesk_act_myhelpdesk" action="crm_case_helpdesk_act_myhelpdesk" groups="base.group_extended_menu"/>
<!--
ALL Helpdesk REQUESTS
-->
<menuitem parent="menu_help_support_main" id="menu_crm_case_helpdesk_act_all" action="crm_case_helpdesk_act111"/>
<menuitem parent="menu_help_support_main" id="menu_crm_case_helpdesk_act_all" action="crm_case_helpdesk_act111" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_helpdesk_act_all3">
@ -234,6 +253,9 @@
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm.crm_case_tree-view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_help'))+'),(\'state\',\'&lt;&gt;\',\'done\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm.view_crm_case_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_all3">
<field name="sequence" eval="1"/>
@ -253,7 +275,7 @@
<field name="view_id" ref="crm.crm_case-view"/>
<field name="act_window_id" ref="crm_case_helpdesk_act_all3"/>
</record>
<menuitem parent="menu_crm_case_helpdesk_act_all" id="menu_crm_case_helpdesk_act_myhelpdesk_all3" action="crm_case_helpdesk_act_all3"/>
<menuitem parent="menu_crm_case_helpdesk_act_all" id="menu_crm_case_helpdesk_act_myhelpdesk_all3" action="crm_case_helpdesk_act_all3" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_helpdesk_act_all2">
<field name="name">All Helpdesk Propositions</field>
@ -261,6 +283,9 @@
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm.crm_case_tree-view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_help'))+'),(\'state\',\'=\',\'draft\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm.view_crm_case_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_all2">
<field name="sequence" eval="1"/>
@ -280,7 +305,7 @@
<field name="view_id" ref="crm.crm_case-view"/>
<field name="act_window_id" ref="crm_case_helpdesk_act_all2"/>
</record>
<menuitem parent="menu_crm_case_helpdesk_act_all" id="menu_crm_case_helpdesk_act_myhelpdesk_all2" action="crm_case_helpdesk_act_all2"/>
<menuitem parent="menu_crm_case_helpdesk_act_all" id="menu_crm_case_helpdesk_act_myhelpdesk_all2" action="crm_case_helpdesk_act_all2" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_helpdesk_act_all1">
<field name="name">All Pending Helpdesk Requests</field>
@ -288,6 +313,9 @@
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm.crm_case_tree-view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_help'))+'),(\'state\',\'=\',\'pending\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm.view_crm_case_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_all1">
<field name="sequence" eval="1"/>
@ -307,7 +335,7 @@
<field name="view_id" ref="crm.crm_case-view"/>
<field name="act_window_id" ref="crm_case_helpdesk_act_all1"/>
</record>
<menuitem parent="menu_crm_case_helpdesk_act_all" id="menu_crm_case_helpdesk_act_myhelpdesk_all1" action="crm_case_helpdesk_act_all1"/>
<menuitem parent="menu_crm_case_helpdesk_act_all" id="menu_crm_case_helpdesk_act_myhelpdesk_all1" action="crm_case_helpdesk_act_all1" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_helpdesk_act_all0">
@ -316,6 +344,9 @@
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm.crm_case_tree-view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_help'))+'),(\'state\',\'=\',\'open\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm.view_crm_case_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_all0">
<field name="sequence" eval="1"/>
@ -335,7 +366,7 @@
<field name="view_id" ref="crm.crm_case-view"/>
<field name="act_window_id" ref="crm_case_helpdesk_act_all0"/>
</record>
<menuitem parent="menu_crm_case_helpdesk_act_all" id="menu_crm_case_helpdesk_act_myhelpdesk_all0" action="crm_case_helpdesk_act_all0"/>
<menuitem parent="menu_crm_case_helpdesk_act_all" id="menu_crm_case_helpdesk_act_myhelpdesk_all0" action="crm_case_helpdesk_act_all0" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_helpdesk_act_allhelpdesk">
<field name="name">Calendar of Helpdesk</field>
@ -343,6 +374,7 @@
<field name="view_mode">calendar,tree,form</field>
<field name="view_id" ref="crm.crm_case_calendar-view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_help'))+'),(\'state\',\'=\',\'done\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_calendar_view_allhelpdesk">
<field name="sequence" eval="1"/>
@ -362,7 +394,7 @@
<field name="view_id" ref="crm.crm_case-view"/>
<field name="act_window_id" ref="crm_case_helpdesk_act_allhelpdesk"/>
</record>
<menuitem parent="menu_crm_case_helpdesk_act_all" id="menu_crm_case_helpdesk_act_myhelpdesk_allhelpdesk" action="crm_case_helpdesk_act_allhelpdesk"/>
<menuitem parent="menu_crm_case_helpdesk_act_all" id="menu_crm_case_helpdesk_act_myhelpdesk_allhelpdesk" action="crm_case_helpdesk_act_allhelpdesk" groups="base.group_extended_menu"/>
</data>

View File

@ -10,6 +10,8 @@
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support0)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_jobs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_act111">
<field name="sequence" eval="1"/>
@ -49,6 +51,9 @@
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'user_id\',\'=\',uid),(\'section_id\',\'=\','+str(section_support0)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_jobs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view1">
<field name="sequence" eval="1"/>
@ -74,7 +79,7 @@
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_categ0_act11"/>
</record>
<menuitem parent="menu_crm_case_job_req_main" id="menu_crm_case_categ0_act11" action="crm_case_categ0_act11"/>
<menuitem parent="menu_crm_case_job_req_main" id="menu_crm_case_categ0_act11" action="crm_case_categ0_act11" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_my_new3">
<field name="name">New Job Request</field>
@ -82,6 +87,7 @@
<field name="view_mode">form,tree</field>
<field name="view_id" ref="crm_case_form_view11"/>
<field name="domain" eval="'[(\'user_id\',\'=\',uid),(\'section_id\',\'=\','+str(section_support0)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_my3">
<field name="sequence" eval="2"/>
@ -107,6 +113,9 @@
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'user_id\',\'=\',uid),(\'state\',\'in\',(\'pending\',\'open\',\'draft\')),(\'section_id\',\'=\','+str(section_support0)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_jobs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_my3">
<field name="sequence" eval="1"/>
@ -132,7 +141,7 @@
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_categ0_act_my3"/>
</record>
<menuitem parent="menu_crm_case_categ0_act11" id="menu_crm_case_categ0_act_myjobs3" action="crm_case_categ0_act_my3"/>
<menuitem parent="menu_crm_case_categ0_act11" id="menu_crm_case_categ0_act_myjobs3" action="crm_case_categ0_act_my3" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_my2">
<field name="name">My Jobs Propositions to Review</field>
@ -140,6 +149,9 @@
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'user_id\',\'=\',uid),(\'state\',\'=\',\'draft\'),(\'section_id\',\'=\','+str(section_support0)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_jobs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_my2">
<field name="sequence" eval="1"/>
@ -169,7 +181,7 @@
parent="menu_crm_case_categ0_act_myjobs3"
id="menu_crm_case_categ0_act_myjobs2"
action="crm_case_categ0_act_my2"
groups="base.group_extended"/>
groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_my1">
<field name="name">My Pending Jobs Requests</field>
@ -177,6 +189,9 @@
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'user_id\',\'=\',uid),(\'state\',\'=\',\'pending\'),(\'section_id\',\'=\','+str(section_support0)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_jobs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_my1">
<field name="sequence" eval="1"/>
@ -204,7 +219,7 @@
</record>
<menuitem parent="menu_crm_case_categ0_act_myjobs3"
id="menu_crm_case_categ0_act_myjobs1" action="crm_case_categ0_act_my1"
groups="base.group_extended"/>
groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_my0">
<field name="name">My Open Jobs Requests</field>
@ -212,6 +227,9 @@
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'user_id\',\'=\',uid),(\'state\',\'=\',\'open\'),(\'section_id\',\'=\','+str(section_support0)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_jobs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_my0">
<field name="sequence" eval="1"/>
@ -239,7 +257,7 @@
</record>
<menuitem parent="menu_crm_case_categ0_act_myjobs3" id="menu_crm_case_categ0_act_myjobs0"
action="crm_case_categ0_act_my0"
groups="base.group_extended"/>
groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_myjobs">
<field name="name">Calendar Of My Interviews</field>
@ -247,6 +265,7 @@
<field name="view_mode">calendar,tree,form,graph</field>
<field name="view_id" ref="crm_case_calendar_view11"/>
<field name="domain" eval="'[(\'state\',\'=\',\'done\'),(\'user_id\',\'=\',uid),(\'section_id\',\'=\','+str(section_support0)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_calendar_view_myjobs">
<field name="sequence" eval="1"/>
@ -272,7 +291,7 @@
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_categ0_act_myjobs"/>
</record>
<menuitem parent="menu_crm_case_categ0_act11" id="menu_crm_case_categ0_act_myjobs_myjobs" action="crm_case_categ0_act_myjobs"/>
<menuitem parent="menu_crm_case_categ0_act11" id="menu_crm_case_categ0_act_myjobs_myjobs" action="crm_case_categ0_act_myjobs" groups="base.group_extended_menu"/>
<!--
ALL JOBS REQUESTS
@ -286,6 +305,9 @@
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'state\',\'&lt;&gt;\',\'done\'),(\'section_id\',\'=\','+str(section_support0)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_jobs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_all3">
<field name="sequence" eval="1"/>
@ -311,7 +333,7 @@
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_categ0_act_all3"/>
</record>
<menuitem parent="menu_crm_case_categ0_act111" id="menu_crm_case_categ0_act_myjobs_all3" action="crm_case_categ0_act_all3"/>
<menuitem parent="menu_crm_case_categ0_act111" id="menu_crm_case_categ0_act_myjobs_all3" action="crm_case_categ0_act_all3" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_all2">
<field name="name">All Jobs Propositions to Review</field>
@ -319,6 +341,9 @@
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'state\',\'=\',\'draft\'),(\'section_id\',\'=\','+str(section_support0)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_jobs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_all2">
<field name="sequence" eval="1"/>
@ -344,7 +369,7 @@
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_categ0_act_all2"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_myjobs_all3" id="menu_crm_case_categ0_act_myjobs_all2" action="crm_case_categ0_act_all2"/>
<menuitem parent="menu_crm_case_categ0_act_myjobs_all3" id="menu_crm_case_categ0_act_myjobs_all2" action="crm_case_categ0_act_all2" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_all1">
<field name="name">All Pending Jobs Requests</field>
@ -352,6 +377,9 @@
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'state\',\'=\',\'pending\'),(\'section_id\',\'=\','+str(section_support0)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_jobs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_all1">
<field name="sequence" eval="1"/>
@ -377,7 +405,7 @@
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_categ0_act_all1"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_myjobs_all3" id="menu_crm_case_categ0_act_myjobs_all1" action="crm_case_categ0_act_all1"/>
<menuitem parent="menu_crm_case_categ0_act_myjobs_all3" id="menu_crm_case_categ0_act_myjobs_all1" action="crm_case_categ0_act_all1" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_all0">
<field name="name">All Open Jobs Requests</field>
@ -385,6 +413,9 @@
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'state\',\'=\',\'open\'),(\'section_id\',\'=\','+str(section_support0)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_jobs_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_all0">
<field name="sequence" eval="1"/>
@ -410,7 +441,7 @@
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_categ0_act_all0"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_myjobs_all3" id="menu_crm_case_categ0_act_myjobs_all0" action="crm_case_categ0_act_all0"/>
<menuitem parent="menu_crm_case_categ0_act_myjobs_all3" id="menu_crm_case_categ0_act_myjobs_all0" action="crm_case_categ0_act_all0" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_alljobs">
<field name="name">Calendar Of Interviews</field>
@ -418,6 +449,7 @@
<field name="view_mode">calendar,tree,form,graph</field>
<field name="view_id" ref="crm_case_calendar_view11"/>
<field name="domain" eval="'[(\'state\',\'=\',\'done\'),(\'section_id\',\'=\','+str(section_support0)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_calendar_view_alljobs">
<field name="sequence" eval="1"/>
@ -443,7 +475,7 @@
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_categ0_act_alljobs"/>
</record>
<menuitem parent="menu_crm_case_categ0_act111" id="menu_crm_case_categ0_act_myjobs_alljobs" action="crm_case_categ0_act_alljobs"/>
<menuitem parent="menu_crm_case_categ0_act111" id="menu_crm_case_categ0_act_myjobs_alljobs" action="crm_case_categ0_act_alljobs" groups="base.group_extended_menu"/>
</data>
</openerp>

View File

@ -21,6 +21,11 @@
<field name="priority" string="Appreciation"/>
<field name="user_id"/>
<field name="state"/>
<button name="case_close" string="Candidate Hired" states="open,draft,pending" type="object" icon="terp-partner"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_cancel" string="Candidate Refused" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
</tree>
</field>
</record>
@ -35,7 +40,7 @@
<field name="name" string="Description" colspan="2"/>
<field name="section_id" colspan="1"/>
<field name="user_id" string="Responsible" select="2"/>
<button name="set_partner" string="Convert to Partner" icon="terp-sale"/>
<button name="set_partner" string="Convert to Partner" icon="terp-partner"/>
<newline/>
<label string="Stage: " align="1.0"/>
<group colspan="1" col="2">
@ -70,68 +75,63 @@
<separator colspan="4" string="Status"/>
<group col="8" colspan="4">
<field name="state" select="1"/>
<button name="case_close" string="Candidate Hired" states="open,draft,pending" type="object"/>
<button name="case_open" string="Open" states="draft,pending" type="object"/>
<button name="case_cancel" string="Candidate Refused" 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"/>
<button name="case_close" string="Candidate Hired" states="open,draft,pending" type="object" icon="terp-partner"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_cancel" string="Candidate Refused" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
</group>
</page><page string="Communication">
<separator colspan="4" string="Communication"/>
<group col="2" colspan="4" expand="1">
<field name="description" colspan="2" nolabel="1"/>
<button name="case_log_reply"
string="Send Candidate &amp; Historize" states="open"
type="object" icon="terp-crm"/>
<button name="case_log" string="Historize" states="open"
type="object" icon="gtk-go-forward"/>
</group>
<field name="history_line" colspan="4" 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"/>
</page>
<page string="Internal Notes">
<field name="description" nolabel="1" colspan="4"/>
</page>
<page string="History">
<field name="id" select="1"/>
<field name="active"/>
<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" string="References"/>
<field name="ref" colspan="4"/>
<field name="ref2" colspan="4"/>
<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>
<page string="Emails" groups="base.group_extended">
<group colspan="4">
<field colspan="4" name="email_cc" string="CC"/>
</group>
<field name="history_line" colspan="4" nolabel="1" mode="form,tree">
<form string="Communication history">
<group col="6" colspan="4">
<field name="date"/>
</tree>
</field>
</page>
<page string="Internal Notes">
<field name="note" nolabel="1" colspan="4"/>
</page>
<page string="Extra Info">
<field name="id" select="2"/>
<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" 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"/>
<field name="email"/>
<field name="canal_id"/>
</group>
<newline/>
<field name="description" colspan="4" nolabel="1"/>
<button colspan="4" string="Reply to Last Email" name="%(crm.wizard_crm_send_mail)d" context="{'mail':'reply'}" icon="gtk-undo" type="action"/>
</form>
<tree string="Communication history">
<field name="description"/>
<field name="email"/>
<field name="date"/>
</tree>
</field>
</page>
<button colspan="4" string="Send New Email" name="%(crm.wizard_crm_new_send_mail)d" context="{'mail':'new'}" icon="gtk-go-forward" type="action"/>
</page>
</notebook>
</form>
</field>
@ -150,5 +150,31 @@
</calendar>
</field>
</record>
<record id="view_crm_case_jobs_filter" model="ir.ui.view">
<field name="name">crm.case.jobs.select</field>
<field name="model">crm.case</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Jobs">
<group col="5" colspan="1">
<filter icon="gtk-execute" string="My Jobs" domain="[('user_id','=',uid)]" separator="1" help="Jobs Related to Current User"/>
<filter icon="gtk-execute" string="Initial Jobs" domain="[('section_id.name','=','Jobs'),('stage_id.name','=','Initial Jobs Demand')]" separator="1" help="All Initial Jobs"/>
<filter icon="gtk-execute" string="First Interview" domain="[('section_id.name','=','Jobs'),('stage_id.name','=','First Interview')]" separator="1" help="First Interview"/>
<filter icon="gtk-execute" string="Second Interview" domain="[('section_id.name','=','Jobs'),('stage_id.name','=','Second Interview')]" separator="1" help="Second Interview"/>
</group>
<group col="4" colspan="4">
<field name="state" select="1">
<filter icon="terp-crm" domain="[('state','=','draft')]" help="Draft Jobs"/>
<filter icon="terp-crm" domain="[('state','=','open')]" help="Open Jobs"/>
<filter icon="terp-crm" domain="[('state','=','pending')]" help="Pending Jobs"/>
</field>
<field name="name" select='1'/>
<field name="user_id" select="1" widget="selection"/>
</group>
</search>
</field>
</record>
</data>
</openerp>

View File

@ -3,8 +3,8 @@
<data noupdate="1">
<!-- CASE SECTION -->
<record model="crm.case.section" id="section_support2">
<field name="name">Leads</field>
<field name="code">leads</field>
<field name="name">Prospects</field>
<field name="code">prospects</field>
</record>
<!-- CASE CATEGORY(categ_id) -->

View File

@ -6,11 +6,13 @@
<!-- MENU -->
<record model="ir.actions.act_window" id="crm_case_category_act_leads_all">
<field name="name">All Leads</field>
<field name="name">All Prospects</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm_case_tree_view_leads"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support2)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_leads_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_leads_all">
<field name="sequence" eval="1"/>
@ -24,15 +26,18 @@
<field name="view_id" ref="crm_case_form_view_leads"/>
<field name="act_window_id" ref="crm_case_category_act_leads_all"/>
</record>
<menuitem parent="menu_presale" name="Leads" id="menu_crm_case_categ0_act_leads" action="crm_case_category_act_leads_all"/>
<menuitem parent="menu_crm_case_categ0_act_leads" id="menu_crm_case_categ0_act_leads_all" action="crm_case_category_act_leads_all"/>
<menuitem parent="menu_presale" name="Prospects" id="menu_crm_case_categ0_act_leads" action="crm_case_category_act_leads_all"/>
<menuitem parent="menu_crm_case_categ0_act_leads" id="menu_crm_case_categ0_act_leads_all" action="crm_case_category_act_leads_all" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_leads_all1">
<field name="name">Current Leads</field>
<field name="name">Current Prospects</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm_case_tree_view_leads"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support2)+'),(\'state\',\'&lt;&gt;\',\'done\'),(\'state\',\'&lt;&gt;\',\'cancel\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_leads_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_leads_all1">
<field name="sequence" eval="1"/>
@ -46,14 +51,17 @@
<field name="view_id" ref="crm_case_form_view_leads"/>
<field name="act_window_id" ref="crm_case_category_act_leads_all1"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_leads_all" id="menu_crm_case_categ0_act_leads_all1" action="crm_case_category_act_leads_all1"/>
<menuitem parent="menu_crm_case_categ0_act_leads_all" id="menu_crm_case_categ0_act_leads_all1" action="crm_case_category_act_leads_all1" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_leads_unassigned">
<field name="name">Unassigned Leads</field>
<field name="name">Unassigned Prospects</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm_case_tree_view_leads"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support2)+'),(\'state\',\'&lt;&gt;\',\'done\'),(\'state\',\'&lt;&gt;\',\'cancel\'),(\'user_id\',\'=\',False)]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_leads_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_leads_unassigned">
<field name="sequence" eval="1"/>
@ -70,14 +78,18 @@
<menuitem
parent="menu_crm_case_categ0_act_leads_all"
id="menu_crm_case_categ0_act_leads_unassigned"
action="crm_case_category_act_leads_unassigned"/>
action="crm_case_category_act_leads_unassigned"
groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_leads_all2">
<field name="name">All Draft Leads</field>
<field name="name">All Draft Prospects</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm_case_tree_view_leads"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support2)+'),(\'state\',\'=\',\'draft\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_leads_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_leads_all2">
<field name="sequence" eval="1"/>
@ -91,14 +103,17 @@
<field name="view_id" ref="crm_case_form_view_leads"/>
<field name="act_window_id" ref="crm_case_category_act_leads_all2"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_leads_all1" id="menu_crm_case_categ0_act_leads_all2" action="crm_case_category_act_leads_all2"/>
<menuitem parent="menu_crm_case_categ0_act_leads_all1" id="menu_crm_case_categ0_act_leads_all2" action="crm_case_category_act_leads_all2" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_leads_all3">
<field name="name">All Open Leads</field>
<field name="name">All Prospects to Qualify</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm_case_tree_view_leads"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support2)+'),(\'state\',\'=\',\'open\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_leads_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_leads_all3">
<field name="sequence" eval="1"/>
@ -112,14 +127,17 @@
<field name="view_id" ref="crm_case_form_view_leads"/>
<field name="act_window_id" ref="crm_case_category_act_leads_all3"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_leads_all1" id="menu_crm_case_categ0_act_leads_all3" action="crm_case_category_act_leads_all3"/>
<menuitem parent="menu_crm_case_categ0_act_leads_all1" id="menu_crm_case_categ0_act_leads_all3" action="crm_case_category_act_leads_all3" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_leads_all4">
<field name="name">All Pending Leads</field>
<field name="name">All Pending Prospects</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm_case_tree_view_leads"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support2)+'),(\'state\',\'=\',\'pending\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_leads_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_leads_all4">
<field name="sequence" eval="1"/>
@ -133,15 +151,18 @@
<field name="view_id" ref="crm_case_form_view_leads"/>
<field name="act_window_id" ref="crm_case_category_act_leads_all4"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_leads_all1" id="menu_crm_case_categ0_act_leads_all4" action="crm_case_category_act_leads_all4"/>
<menuitem parent="menu_crm_case_categ0_act_leads_all1" id="menu_crm_case_categ0_act_leads_all4" action="crm_case_category_act_leads_all4" groups="base.group_extended_menu"/>
<!-- =================================================================== -->
<record model="ir.actions.act_window" id="crm_case_category_act_leads_my">
<field name="name">My Leads</field>
<field name="name">My Prospects</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm_case_tree_view_leads"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support2)+'),(\'user_id\',\'=\',uid)]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_leads_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_leads_my">
<field name="sequence" eval="1"/>
@ -155,15 +176,16 @@
<field name="view_id" ref="crm_case_form_view_leads"/>
<field name="act_window_id" ref="crm_case_category_act_leads_my"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_leads" id="menu_crm_case_categ0_act_leads_my" action="crm_case_category_act_leads_my"/>
<menuitem parent="menu_crm_case_categ0_act_leads" id="menu_crm_case_categ0_act_leads_my" action="crm_case_category_act_leads_my" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_leads_my_new">
<field name="name">New Lead</field>
<field name="name">New Prospect</field>
<field name="res_model">crm.case</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" ref="crm_case_form_view_leads"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support2)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_leads_new">
<field name="sequence" eval="2"/>
@ -180,11 +202,14 @@
<menuitem parent="menu_crm_case_categ0_act_leads" id="menu_crm_case_category_act_leads_my_new" action="crm_case_category_act_leads_my_new" sequence="50"/>
<record model="ir.actions.act_window" id="crm_case_category_act_leads_my1">
<field name="name">My Current Leads</field>
<field name="name">My Current Prospects</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm_case_tree_view_leads"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support2)+'),(\'user_id\',\'=\',uid),(\'state\',\'&lt;&gt;\',\'done\'),(\'state\',\'&lt;&gt;\',\'cancel\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_leads_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_leads_my1">
<field name="sequence" eval="1"/>
@ -198,14 +223,17 @@
<field name="view_id" ref="crm_case_form_view_leads"/>
<field name="act_window_id" ref="crm_case_category_act_leads_my1"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_leads_my" id="menu_crm_case_categ0_act_leads_my1" action="crm_case_category_act_leads_my1"/>
<menuitem parent="menu_crm_case_categ0_act_leads_my" id="menu_crm_case_categ0_act_leads_my1" action="crm_case_category_act_leads_my1" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_leads_my3">
<field name="name">My Open Leads</field>
<field name="name">My Prospects to Qualify</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm_case_tree_view_leads"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support2)+'),(\'user_id\',\'=\',uid),(\'state\',\'=\',\'open\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_leads_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_leads_my3">
<field name="sequence" eval="1"/>
@ -219,14 +247,17 @@
<field name="view_id" ref="crm_case_form_view_leads"/>
<field name="act_window_id" ref="crm_case_category_act_leads_my3"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_leads_my1" id="menu_crm_case_categ0_act_leads_my3" action="crm_case_category_act_leads_my3"/>
<menuitem parent="menu_crm_case_categ0_act_leads_my1" id="menu_crm_case_categ0_act_leads_my3" action="crm_case_category_act_leads_my3" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_leads_my4">
<field name="name">My Pending Leads</field>
<field name="name">My Pending Prospects</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm_case_tree_view_leads"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support2)+'),(\'user_id\',\'=\',uid),(\'state\',\'=\',\'pending\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_leads_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_leads_my4">
<field name="sequence" eval="1"/>
@ -240,18 +271,20 @@
<field name="view_id" ref="crm_case_form_view_leads"/>
<field name="act_window_id" ref="crm_case_category_act_leads_my4"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_leads_my1" id="menu_crm_case_categ0_act_leads_my4" action="crm_case_category_act_leads_my4"/>
<menuitem parent="menu_crm_case_categ0_act_leads_my1" id="menu_crm_case_categ0_act_leads_my4" action="crm_case_category_act_leads_my4" groups="base.group_extended_menu"/>
<!-- REPORTS -->
<menuitem name="Leads" id="menu_action_report_crm_case_lead" parent="report_crm.next_id_64"/>
<menuitem name="Prospects" id="menu_action_report_crm_case_lead" parent="report_crm.next_id_64"/>
<record model="ir.actions.act_window" id="action_report_crm_case_lead_user">
<field name="res_model">report.crm.case.user</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support2)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<menuitem name="Cases by Leads and User" parent="menu_action_report_crm_case_lead" action="action_report_crm_case_lead_user" id="menu_action_report_crm_case_lead_user"/>
<menuitem name="Cases by Prospects and User" parent="menu_action_report_crm_case_lead" action="action_report_crm_case_lead_user" id="menu_action_report_crm_case_lead_user"/>
<record model="ir.actions.act_window" id="action_report_crm_case_lead_categ">
@ -259,22 +292,25 @@
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support2)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<menuitem parent="menu_action_report_crm_case_lead" name="Cases by Leads and Type" action="action_report_crm_case_lead_categ" id="menu_action_report_crm_case_lead_categ"/>
<menuitem parent="menu_action_report_crm_case_lead" name="Cases by Prospects and Type" action="action_report_crm_case_lead_categ" id="menu_action_report_crm_case_lead_categ"/>
<record model="ir.actions.act_window" id="action_report_crm_case_lead_stage">
<field name="res_model">report.crm.case.section.stage</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support2)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<menuitem name="Cases by Leads and Stage" parent="menu_action_report_crm_case_lead" action="action_report_crm_case_lead_stage" id="menu_action_report_crm_case_lead_stage"/>
<menuitem name="Cases by Prospects and Stage" parent="menu_action_report_crm_case_lead" action="action_report_crm_case_lead_stage" id="menu_action_report_crm_case_lead_stage"/>
<record model="ir.actions.act_window" id="action_report_crm_case_lead_categ_stage">
<field name="res_model">report.crm.case.section.categ.stage</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support2)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<menuitem name="Cases by Section, Category and Stage" parent="menu_action_report_crm_case_lead" action="action_report_crm_case_lead_categ_stage" id="menu_action_report_crm_case_lead_categ_stage"/>
@ -283,6 +319,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support2)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<menuitem name="Cases by Section, Category and Type" parent="menu_action_report_crm_case_lead" action="action_report_crm_case_lead_categ_categ2" id="menu_action_report_crm_case_lead_categ_categ2"/>

View File

@ -3,31 +3,31 @@
<data>
# ------------------------------------------------------
# Leads
# Prospects
# ------------------------------------------------------
<record model="ir.ui.view" id="crm_case_form_view_leads">
<field name="name">CRM - Leads Form</field>
<field name="name">CRM - Prospects Form</field>
<field name="model">crm.case</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Leads Form">
<form string="Prospects Form">
<group colspan="4" col="7">
<field name="name" select="1" string="Lead Subject"/>
<field name="name" select="1" string="Prospect Subject"/>
<field name="section_id" colspan="1"/>
<label string="Stage: " align="1.0"/>
<group colspan="1" col="2">
<field name="stage_id" select="1" nolabel="1"/>
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
</group>
<button string="Convert to Partner" icon="terp-crm" name="%(wizard_crm_partner_create)d" type="action" attrs="{'invisible':[('partner_id','!=',False)]}"/>
<label string="Stage: " align="1.0"/>
<group colspan="1" col="2">
<field name="stage_id" select="1" nolabel="1"/>
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
</group>
<button string="Convert to Partner" icon="terp-partner" name="%(wizard_crm_partner_create)d" type="action" attrs="{'invisible':[('partner_id','!=',False)]}"/>
<field name="user_id" select="2"/>
<field name="categ_id" select="1" on_change="onchange_categ_id(categ_id)" string="Lead Source"/>
<field name="categ_id" select="1" on_change="onchange_categ_id(categ_id)" string="Prospect Source"/>
<field name="category2_id" string="Campaign Type" select="1"/>
<button string="Convert to Opportunity" name="%(wizard_crm_opportunity_set)d" icon="gtk-go-forward" type="action"/>
<button string="Convert to Opportunity" name="%(wizard_crm_opportunity_set)d" icon="gtk-index" type="action"/>
</group>
<notebook colspan="4">
<page string="Leads">
<page string="Prospects">
<separator string="Prospect Information" colspan="4"/>
<field name="partner_name" string="Prospect Name"/>
<field name="partner_name2" string="Contact Name"/>
@ -40,69 +40,40 @@
<field name="priority" string="Priority"/>
<newline/>
<separator colspan="4" string="Lead Details"/>
<field name="note" nolabel="1" colspan="4"/>
<separator colspan="4" string="Prospect Details"/>
<field name="description" nolabel="1" colspan="4"/>
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state" select="2"/>
<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_escalate" string="Escalate" states="open,draft,pending" type="object"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object"/>
<button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-close"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
<button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" icon="gtk-go-up"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
</group>
</page>
<page string="Extra Info" groups="base.group_extended">
<field name="id" select="2"/>
<page string="History">
<field name="id" select="1"/>
<field name="active" select="2"/>
<field name="email_cc" colspan="2"/>
<newline/>
<field name="planned_revenue"/>
<field name="planned_cost"/>
<field name="probability"/>
<newline/>
<field name="canal_id"/>
<field name="som"/>
<separator colspan="4" string="Dates"/>
<field name="create_date"/>
<field name="date_closed"/>
<field name="date_action_last"/>
<field name="date"/>
<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="canal_id"/>
<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 Prospect &amp; 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"/>
@ -114,40 +85,108 @@
</form>
</field>
</page>
<page string="Events">
<field name="child_ids" colspan="4" nolabel="1">
<tree string="Related Cases">
<field name="id"/>
<field name="date"/>
<field name="name"/>
<field name="partner_id"/>
<field name="user_id"/>
<field name="section_id"/>
<field name="state"/>
</tree>
</field>
</page>
<page string="Emails">
<group colspan="4">
<field colspan="4" name="email_cc" string="CC"/>
</group>
<field name="history_line" colspan="4" nolabel="1" mode="form,tree">
<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"/>
<button colspan="4" string="Reply to Last Email" name="%(crm.wizard_crm_send_mail)d" context="{'mail':'reply'}" icon="gtk-go-forward" type="action"/>
</form>
<tree string="Communication history">
<field name="description"/>
<field name="email"/>
<field name="date"/>
</tree>
</field>
<button colspan="4" string="Send New Email" name="%(crm.wizard_crm_new_send_mail)d" context="{'mail':'new'}" icon="gtk-go-forward" type="action"/>
</page>
</notebook>
</form>
</field>
</record>
<record model="ir.ui.view" id="crm_case_tree_view_leads">
<field name="name">CRM - Leads Tree</field>
<field name="name">CRM - Prospects Tree</field>
<field name="model">crm.case</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Leads Tree" colors="red:state=='open'">
<tree string="Prospects Tree" colors="red:state=='open'">
<field name="id"/>
<field name="name" string="Lead Subject"/>
<field name="name" string="Prospect Subject"/>
<field name="partner_phone"/>
<field name="partner_name2" string="Contact Name"/>
<field name="stage_id"/>
<field name="categ_id" string="Lead Source"/>
<field name="categ_id" string="Prospects Source"/>
<field name="category2_id" string="Campaign Type"/>
<field name="user_id"/>
<field name="state"/>
<button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-close"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
<button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" icon="gtk-go-up"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="crm_case_calendar_view_leads">
<field name="name">CRM - Leads Calendar</field>
<field name="name">CRM - Prospects 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="Meeting For Leads Generation" date_start="date" color="user_id" date_delay="duration">
<calendar string="Meeting For Prospects Generation" date_start="date" color="user_id" date_delay="duration">
<field name="name"/>
<field name="partner_name"/>
<field name="partner_name2"/>
</calendar>
</field>
</record>
<record id="view_crm_case_leads_filter" model="ir.ui.view">
<field name="name">crm.case.leads.select</field>
<field name="model">crm.case</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Prospects">
<group col="5" colspan="1">
<filter icon="gtk-execute" string="My Prospects" domain="[('user_id','=',uid)]" separator="1" help="Prospects Related to Current User"/>
<filter icon="gtk-execute" string="Assigned Prospects" domain="[('section_id.name','=','Prospects'),('stage_id.name','=','Assigned')]" separator="1" help="All Assigned Prospects"/>
<filter icon="gtk-execute" string="In Process Prospects" domain="[('section_id.name','=','Prospects'),('stage_id.name','=','In Process')]" separator="1" help="In Process Prospects"/>
<filter icon="gtk-execute" string="Converted Prospects" domain="[('section_id.name','=','Prospects'),('stage_id.name','=','Converted')]" separator="1" help="Converted Prospects"/>
</group>
<group col="4" colspan="4">
<field name="state" select="1">
<filter icon="terp-crm" domain="[('state','=','draft')]" help="Draft Prospects"/>
<filter icon="terp-crm" domain="[('state','=','open')]" help="Open Prospects"/>
<filter icon="terp-crm" domain="[('state','=','pending')]" help="Pending Prospects"/>
</field>
<field name="name" select='1'/>
<field name="user_id" select="1" widget="selection"/>
</group>
</search>
</field>
</record>
</data>
</openerp>

View File

@ -12,7 +12,7 @@
<field name="partner_id" ref="base.res_partner_maxtor"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Meeting to discuss project plan and hash out the details of implementation &quot;" name="note"/>
<field eval="&quot;Meeting to discuss project plan and hash out the details of implementation &quot;" name="description"/>
<field eval="&quot;open&quot;" name="state"/>
<field name="section_id" ref="crm_configuration.section_support1"/>
<field eval="time.strftime('%Y-%m-03 10:20:03')" name="date"/>
@ -49,7 +49,7 @@
<field name="partner_id" ref="base.res_partner_3"/>
<field eval="&quot;1&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Meeting to discuss project plan and hash out the details of implementation &quot;" name="note"/>
<field eval="&quot;Meeting to discuss project plan and hash out the details of implementation &quot;" name="description"/>
<field eval="&quot;done&quot;" name="state"/>
<field name="section_id" ref="crm_configuration.section_support1"/>
<field eval="time.strftime('%Y-%m-12 15:55:05')" name="date"/>

View File

@ -7,12 +7,13 @@
name="Schedule a Meeting"
res_model="crm.case"
src_model="res.partner"
view_mode="calendar,tree,form"
view_mode="calendar,tree,form,gantt"
context="{'default_partner_id': active_id, 'default_duration': 4.0}"
domain="[('section_id','=','Meetings')]"/>
<record model="ir.actions.act_window" id="crm_case_categ_meet_create_partner">
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support1'))+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_meet_partner">
@ -33,12 +34,19 @@
<field name="view_id" ref="crm_case_form_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meet_create_partner"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_gantt_meet_partner">
<field name="sequence" eval="3"/>
<field name="view_mode">gantt</field>
<field name="view_id" ref="crm_case_gantt_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meet_create_partner"/>
</record>
<record model="ir.actions.act_window" id="crm_case_categ_meet">
<field name="res_model">crm.case</field>
<field name="view_mode">calendar,tree,form</field>
<field name="view_mode">calendar,tree,form,gantt</field>
<field name="view_id" ref="crm_case_calendar_view"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="search_view_id" ref="view_crm_case_meetings_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_meet">
<field name="sequence" eval="1"/>
@ -58,6 +66,12 @@
<field name="view_id" ref="crm_case_form_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meet"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_gantt_meet">
<field name="sequence" eval="1"/>
<field name="view_mode">gantt</field>
<field name="view_id" ref="crm_case_gantt_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meet"/>
</record>
<menuitem parent="crm.menu_crm" name="Calendar" id="menu_crm_case_category_act_meetings"/>
<!--
@ -65,9 +79,12 @@
-->
<record model="ir.actions.act_window" id="crm_case_categ_meetmy">
<field name="res_model">crm.case</field>
<field name="view_mode">calendar,tree,form,graph</field>
<field name="view_mode">calendar,tree,form,graph,gantt</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="domain" eval="'[(\'user_id\',\'=\',uid)]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="view_crm_case_meetings_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_meet_my">
<field name="sequence" eval="1"/>
@ -87,6 +104,12 @@
<field name="view_id" ref="crm_case_form_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meetmy"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_gantt_meet_my">
<field name="sequence" eval="1"/>
<field name="view_mode">gantt</field>
<field name="view_id" ref="crm_case_gantt_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meetmy"/>
</record>
<menuitem name="My Meetings" id="menu_crm_case_categ_meet_my" action="crm_case_categ_meetmy" parent="menu_crm_case_category_act_meetings"/>
<record model="ir.actions.act_window" id="crm_case_category_act_meetings">
@ -94,7 +117,7 @@
<field name="res_model">crm.case</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="context" eval="{'default_section_id':ref('section_support1')}"/>
<field name="context" eval="{'default_state':'open','default_section_id':ref('section_support1')}"/>
<field name="view_id" ref="crm_case_form_view_meet"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_meetings">
@ -124,9 +147,10 @@
<field name="name">Next Meetings</field>
<field name="res_model">crm.case</field>
<field name="view_type">form</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_mode">tree,calendar,form,gantt</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="domain" eval="[('state','in',('pending','draft','open')),('date','>=',time.strftime('%Y-%m-%d'))]"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_view_meetall3">
<field name="sequence" eval="2"/>
@ -146,6 +170,11 @@
<field name="view_id" ref="crm_case_form_view_meet"/>
<field name="act_window_id" ref="crm_case_category_act_meetall3"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_gantt_view_meetall3">
<field name="sequence" eval="2"/>
<field name="view_mode">gantt</field>
<field name="view_id" ref="crm_case_gantt_view_meet"/>
<field name="act_window_id" ref="crm_case_category_act_meetall3"/>
</record>
</data>
</openerp>

View File

@ -21,88 +21,82 @@
<field name="case_id" on_change="onchange_case_id(case_id, name, partner_id)"/>
</group>
<notebook colspan="4">
<page string="Meeting">
<field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)" />
<field name="partner_address_id" on_change="onchange_partner_address_id(partner_address_id, email_from)"/>
<field name="email_from"/>
<newline/>
<field name="categ_id" select="2" on_change="onchange_categ_id(categ_id)"/>
<field name="category2_id" select="1" string="Location"/>
<separator string="Description" colspan="4"/>
<field name="note" nolabel="1" colspan="4" />
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state" select="2"/>
<button name="case_open" string="Confirm Meeting" states="draft,cancel,pending" type="object"/>
<button name="case_cancel" string="Cancel Meeting" states="draft,open,pending" type="object"/>
<button name="case_reset" string="Reset to Unconfirmed" states="done,open,cancel" type="object"/>
</group>
</page>
<page string="Extra Info">
<group colspan="4">
<field name="id" select="2"/>
<field name="active" select="2"/>
<newline/>
<field name="email_cc" colspan="1"/>
<field name="date_deadline" select="2" string="Deadlines"/>
<field name="priority" select="2"/>
<newline/>
<field name="planned_revenue"/>
<field name="planned_cost"/>
<field name="probability"/>
<separator colspan="4" string="Dates"/>
<field name="create_date"/>
<field name="date_closed"/>
<field name="date_action_last"/>
<field name="date_action_next"/>
</group>
<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="canal_id"/>
<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 &amp; 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>
<page string="Meeting">
<field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)" />
<field name="partner_address_id" on_change="onchange_partner_address_id(partner_address_id, email_from)"/>
<field name="email_from"/>
<newline/>
<field name="categ_id" select="2" on_change="onchange_categ_id(categ_id)"/>
<field name="category2_id" select="1" string="Location"/>
<separator string="Description" colspan="4"/>
<field name="description" nolabel="1" colspan="4"/>
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state" select="2"/>
<button name="case_open" string="Confirm Meeting" states="draft,cancel,pending" type="object" icon="terp-crm"/>
<button name="case_cancel" string="Cancel Meeting" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="case_reset" string="Reset to Unconfirmed" states="done,open,cancel" type="object" icon="gtk-convert"/>
</group>
</page>
<page string="History">
<group colspan="4">
<field name="id" select="1"/>
<field name="active" select="2"/>
<newline/>
<field name="date_deadline" select="2" string="Deadlines"/>
<field name="priority" select="2"/>
<newline/>
<field name="planned_revenue"/>
<field name="planned_cost"/>
<field name="probability"/>
<newline/>
<field name="canal_id"/>
<field name="som"/>
<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" string="References"/>
<field name="ref" colspan="4"/>
<field name="ref2" colspan="4"/>
</group>
<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>
<page string="Emails" groups="base.group_extended">
<group colspan="4">
<field colspan="4" name="email_cc" string="CC"/>
</group>
<field name="history_line" colspan="4" nolabel="1" mode="form,tree">
<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"/>
<button colspan="4" string="Reply to Last Email" name="%(crm.wizard_crm_send_mail)d" context="{'mail':'reply'}" icon="gtk-undo" type="action"/>
</form>
<tree string="Communication history">
<field name="description"/>
<field name="email"/>
<field name="date"/>
</tree>
</field>
<button colspan="4" string="Send New Email" name="%(crm.wizard_crm_new_send_mail)d" context="{'mail':'new'}" icon="gtk-go-forward" type="action"/>
</page>
</notebook>
</form>
</field>
@ -122,6 +116,9 @@
<field name="category2_id" string="Type"/>
<field name="user_id"/>
<field name="state"/>
<button name="case_open" string="Confirm Meeting" states="draft,cancel,pending" type="object" icon="terp-crm"/>
<button name="case_cancel" string="Cancel Meeting" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="case_reset" string="Reset to Unconfirmed" states="done,open,cancel" type="object" icon="gtk-convert"/>
</tree>
</field>
</record>
@ -138,5 +135,40 @@
</calendar>
</field>
</record>
</data>
<record id="crm_case_gantt_view_meet" model="ir.ui.view">
<field name="name">CRM - Meetings Gantt</field>
<field name="model">crm.case</field>
<field name="type">gantt</field>
<field name="arch" type="xml">
<gantt color="user_id" date_delay="duration" date_start="date" string="Meetings">
<level object="crm.case" link="id" domain="[]">
<field name="name"/>
<field name="partner_id"/>
</level>
</gantt>
</field>
</record>
<record id="view_crm_case_meetings_filter" model="ir.ui.view">
<field name="name">crm.case.meetings.select</field>
<field name="model">crm.case</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Meetings">
<group col="5" colspan="1">
<filter icon="gtk-execute" string="My Meetings" domain="[('user_id','=',uid)]" help="Meetings Related to Current User"/>
</group>
<group col="4" colspan="4">
<field name="state" select="1">
<filter icon="terp-crm" domain="[('state','=','draft')]" help="Draft Meetings"/>
<filter icon="terp-crm" domain="[('state','=','open')]" help="Open Meetings"/>
<filter icon="terp-crm" domain="[('state','=','pending')]" help="Pending Meetings"/>
</field>
<field name="name" select='1'/>
<field name="user_id" select="1" widget="selection"/>
</group>
</search>
</field>
</record>
</data>
</openerp>

View File

@ -6,15 +6,11 @@
<record model="ir.actions.act_window" id="crm_case_category_act_oppor11">
<field name="name">All Opportunities</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,form,calendar,graph</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_view_oppor11">
<field name="sequence" eval="3"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor11"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_opportunities_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_oppor11">
<field name="sequence" eval="1"/>
@ -38,14 +34,17 @@
<!-- MENU -->
<menuitem parent="menu_crm_case_opp" id="menu_crm_case_categ0_act_oppor11" action="crm_case_category_act_oppor11"/>
<menuitem parent="menu_crm_case_opp" id="menu_crm_case_categ0_act_oppor11" action="crm_case_category_act_oppor11" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_oppor1">
<field name="name">All Open Opportunities</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+'),(\'state\',\'=\',\'open\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_opportunities_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_oppor1">
<field name="sequence" eval="1"/>
@ -53,12 +52,6 @@
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor1"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_view_oppor1">
<field name="sequence" eval="2"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor1"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_oppor1">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
@ -71,15 +64,18 @@
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_category_act_oppor1"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_oppor11" id="menu_crm_case_categ0_act_oppor1" action="crm_case_category_act_oppor1"/>
<menuitem parent="menu_crm_case_categ0_act_oppor11" id="menu_crm_case_categ0_act_oppor1" action="crm_case_category_act_oppor1" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_oppor_all2">
<field name="name">All Unassigned Opportunities</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+'),(\'state\',\'=\',\'pending\'),(\'user_id\',\'=\',False)]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_opportunities_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_oppor_all2">
<field name="sequence" eval="1"/>
@ -87,12 +83,6 @@
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor_all2"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_view_oppor_all2">
<field name="sequence" eval="2"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor_all2"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_oppor_all2">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
@ -105,22 +95,18 @@
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_category_act_oppor_all2"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_oppor11" id="menu_crm_case_categ0_act_oppor_all2" action="crm_case_category_act_oppor_all2"/>
<menuitem parent="menu_crm_case_categ0_act_oppor11" id="menu_crm_case_categ0_act_oppor_all2" action="crm_case_category_act_oppor_all2" groups="base.group_extended_menu"/>
<!-- ======================================================== -->
<record model="ir.actions.act_window" id="crm_case_category_act_oppor22">
<field name="name">My Opportunities</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_calendar_view_oppor"/>
<field name="view_mode">tree,form,graph</field>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+'),(\'user_id\',\'=\',uid)]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_view_oppor22">
<field name="sequence" eval="2"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor22"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_opportunities_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_oppor22">
<field name="sequence" eval="1"/>
@ -140,15 +126,16 @@
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_category_act_oppor22"/>
</record>
<menuitem parent="menu_crm_case_opp" id="menu_crm_case_categ0_act_oppor22" action="crm_case_category_act_oppor22"/>
<menuitem parent="menu_crm_case_opp" id="menu_crm_case_categ0_act_oppor22" action="crm_case_category_act_oppor22" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_oppor">
<field name="name">Opportunity</field>
<field name="res_model">crm.case</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree,calendar</field>
<field name="view_mode">form,tree</field>
<field name="view_id" ref="crm_case_form_view_oppor"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_oppor">
<field name="sequence" eval="1"/>
@ -162,11 +149,6 @@
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_cal_view_oppor">
<field name="sequence" eval="3"/>
<field name="view_mode">calendar</field>
<field name="act_window_id" ref="crm_case_category_act_oppor"/>
</record>
<menuitem name="New Opportunity"
parent="menu_crm_case_opp"
id="menu_crm_case_categ0_act_oppor"
@ -176,9 +158,12 @@
<record model="ir.actions.act_window" id="crm_case_category_act_oppor2">
<field name="name">My Open Opportunities</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+'),(\'state\',\'=\',\'open\'),(\'user_id\',\'=\',uid)]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_opportunities_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_oppor2">
<field name="sequence" eval="1"/>
@ -186,12 +171,6 @@
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor2"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_view_oppor2">
<field name="sequence" eval="2"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor2"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_oppor2">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
@ -204,14 +183,17 @@
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_category_act_oppor2"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_oppor22" id="menu_crm_case_categ0_act_oppor2" action="crm_case_category_act_oppor2"/>
<menuitem parent="menu_crm_case_categ0_act_oppor22" id="menu_crm_case_categ0_act_oppor2" action="crm_case_category_act_oppor2" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_category_act_oppor_my2">
<field name="name">My Pending Opportunities</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+'),(\'state\',\'=\',\'pending\'),(\'user_id\',\'=\',uid)]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_opportunities_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_oppor_my2">
<field name="sequence" eval="1"/>
@ -219,12 +201,6 @@
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor_my2"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_view_oppor_my2">
<field name="sequence" eval="2"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor_my2"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_oppor_my2">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
@ -237,7 +213,7 @@
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_category_act_oppor_my2"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_oppor22" id="menu_crm_case_categ0_act_oppor_my2" action="crm_case_category_act_oppor_my2"/>
<menuitem parent="menu_crm_case_categ0_act_oppor22" id="menu_crm_case_categ0_act_oppor_my2" action="crm_case_category_act_oppor_my2" groups="base.group_extended_menu"/>
<!-- REPORTS -->
<record model="ir.actions.act_window" id="action_report_crm_case_oppor_user">
@ -245,6 +221,7 @@
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<menuitem name="Opportunity" parent="report_crm.next_id_64" id="menu_action_report_crm_case_oppor"/>
<menuitem name="Cases by Opportunities and User" parent="menu_action_report_crm_case_oppor" action="action_report_crm_case_oppor_user" id="menu_action_report_crm_case_oppor_user"/>
@ -254,6 +231,7 @@
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<menuitem name="Cases by Opportunities and Type" parent="menu_action_report_crm_case_oppor" action="action_report_crm_case_oppor_categ" id="menu_action_report_crm_case_oppor_categ"/>
@ -262,6 +240,7 @@
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<menuitem name="Cases by Opportunities and Stage" parent="menu_action_report_crm_case_oppor" action="action_report_crm_case_oppor_stage" id="menu_action_report_crm_case_oppor_stage"/>
@ -270,6 +249,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<menuitem name="Cases by Opportunities, Category and Stage" parent="menu_action_report_crm_case_oppor" action="action_report_crm_case_oppor_categ_stage" id="menu_action_report_crm_case_oppor_categ_stage"/>
@ -278,6 +258,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<menuitem name="Cases by Opportunities, Category and Type" parent="menu_action_report_crm_case_oppor" action="action_report_crm_case_oppor_categ_categ2" id="menu_action_report_crm_case_oppor_categ_categ2"/>

View File

@ -16,14 +16,16 @@
<field name="name" select="1" string="Opportunity" colspan="2"/>
<field name="section_id" colspan="1"/>
<field name="user_id" select="2" string="Responsible"/>
<button string="Schedule a Phone Call"
name="%(wizard_crm_reschedule_phone_call)d" icon="gtk-redo" type="action" />
<newline/>
<label string="Sales Stage: " align="1.0"/>
<group colspan="1" col="2">
<field name="stage_id" select="1" nolabel="1"/>
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
</group>
<field name="date" string="Next Meeting"/>
<field name="duration"/>
<field name="date" string="Deadline"/>
<field name="id" select="1"/>
<button string="Schedule Meeting" icon="terp-crm" name="%(wizard_crm_meeting)d" type="action"/>
</group>
<notebook colspan="4">
@ -39,65 +41,34 @@
<field name="planned_cost"/>
<field name="probability"/>
<separator colspan="4" string="Description Information"/>
<field name="note" nolabel="1" colspan="4"/>
<field name="description" nolabel="1" colspan="4"/>
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state" select="2"/>
<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_escalate" string="Escalate" states="open,draft,pending" type="object"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object"/>
<button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-close"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
<button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" icon="gtk-go-up"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
</group>
</page>
<page string="Extra Info" groups="base.group_extended">
<field name="id" select="2"/>
<page string="History">
<field name="active"/>
<field name="email_cc" colspan="4"/>
<field name="canal_id"/>
<field name="som"/>
<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="canal_id"/>
<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 &amp; 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"/>
@ -109,6 +80,42 @@
</form>
</field>
</page>
<page string="Events">
<field name="child_ids" colspan="4" nolabel="1">
<tree string="Related Cases">
<field name="id"/>
<field name="date"/>
<field name="name"/>
<field name="partner_id"/>
<field name="user_id"/>
<field name="section_id"/>
<field name="state"/>
</tree>
</field>
</page>
<page string="Emails">
<group colspan="4">
<field colspan="4" name="email_cc" string="CC"/>
</group>
<field name="history_line" colspan="4" nolabel="1" mode="form,tree">
<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"/>
<button colspan="4" string="Reply to Last Email" name="%(crm.wizard_crm_send_mail)d" context="{'mail':'reply'}" icon="gtk-undo" type="action"/>
</form>
<tree string="Communication history">
<field name="description"/>
<field name="email"/>
<field name="date"/>
</tree>
</field>
<button colspan="4" string="Send New Email" name="%(crm.wizard_crm_new_send_mail)d" context="{'mail':'new'}" icon="gtk-go-forward" type="action"/>
</page>
</notebook>
</form>
</field>
@ -125,22 +132,40 @@
<field name="partner_id" string="Partner"/>
<field name="planned_revenue"/>
<field name="probability"/>
<field name="date" string="Next Meeting"/>
<field name="date" string="Deadline"/>
<field name="user_id"/>
<field name="state"/>
<button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-close"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
<button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" icon="gtk-go-up"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="crm_case_calendar_view_oppor">
<field name="name">CRM - Opportunities Calendar</field>
<record id="view_crm_case_opportunities_filter" model="ir.ui.view">
<field name="name">crm.case.opportunities.select</field>
<field name="model">crm.case</field>
<field name="type">calendar</field>
<field name="priority" eval="2"/>
<field name="type">search</field>
<field name="arch" type="xml">
<calendar string="Opportunities" date_start="date" color="user_id" date_delay="duration">
<field name="name"/>
<field name="partner_id"/>
</calendar>
<search string="Search Opportunities">
<group col="5" colspan="1">
<filter icon="gtk-execute" string="My Opportunities" domain="[('user_id','=',uid)]" separator="1" help="Opportunities Related to Current User"/>
<filter icon="gtk-execute" string="Prospecting" domain="[('section_id.name','=','Opportunities'),('stage_id.name','=','Prospecting')]" separator="1" help="All Prospecting Prospects"/>
<filter icon="gtk-execute" string="Proposition" domain="[('section_id.name','=','Opportunities'),('stage_id.name','=','Value Proposition')]" separator="1" help="Value Proposition Prospects"/>
<filter icon="gtk-execute" string="Analysis" domain="[('section_id.name','=','Opportunities'),('stage_id.name','=','Needs Analysis')]" separator="1" help="Needs Analysis Prospects"/>
</group>
<group col="4" colspan="4">
<field name="state" select="1">
<filter icon="terp-crm" domain="[('state','=','draft')]" help="Draft Opportunities"/>
<filter icon="terp-crm" domain="[('state','=','open')]" help="Open Opportunities"/>
<filter icon="terp-crm" domain="[('state','=','pending')]" help="Pending Opportunities"/>
</field>
<field name="name" select='1'/>
<field name="user_id" select="1" widget="selection"/>
</group>
</search>
</field>
</record>
</data>

View File

@ -22,6 +22,7 @@
<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'))+')]'"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_phonecalls_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone0">
<field name="sequence" eval="1"/>
@ -50,6 +51,8 @@
<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'))+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_inbound_phonecalls_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_incoming0">
<field name="sequence" eval="1"/>
@ -78,6 +81,7 @@
<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'))+')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_incoming1">
<field name="sequence" eval="2"/>
@ -91,7 +95,7 @@
<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"/>
<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" sequence="50"/>
<record model="ir.actions.act_window" id="crm_case_categ_phone_incoming2">
<field name="name">Planned Calls</field>
@ -99,7 +103,10 @@
<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'))+'), (\'state\',\'=\',\'\open\')]'"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+'), (\'categ_id\',\'=\','+str(ref('categ_phone1'))+'), (\'state\',\'=\',\'open\')]'"/>
<field name="context" eval="{'default_state':'open'}"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_inbound_phonecalls_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_incoming2">
<field name="sequence" eval="1"/>
@ -119,7 +126,7 @@
<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"/>
<menuitem name="Planned Calls" id="menu_crm_case_categ_phone_incoming2" parent="menu_crm_case_categ_phone_incoming0" action="crm_case_categ_phone_incoming2" groups="base.group_extended_menu"/>
################################################################
<record model="ir.actions.act_window" id="crm_case_categ_phone_outgoing0">
@ -129,6 +136,7 @@
<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'))+')]'"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_outbound_phonecalls_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_outgoing0">
<field name="sequence" eval="1"/>
@ -170,7 +178,7 @@
<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"/>
<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" sequence="50"/>
<record model="ir.actions.act_window" id="crm_case_categ_phone_outgoing2">
<field name="name">Planned Calls</field>
@ -178,7 +186,9 @@
<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'))+'), (\'state\',\'=\',\'open\')]'"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+'), (\'categ_id\',\'=\','+str(ref('categ_phone2'))+'), (\'state\',\'=\',\'draft\')]'"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_outbound_phonecalls_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_outgoing2">
<field name="sequence" eval="1"/>
@ -198,7 +208,7 @@
<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"/>
<menuitem name="Planned Calls" id="menu_crm_case_categ_phone_outgoing2" parent="menu_crm_case_categ_phone_outgoing0" action="crm_case_categ_phone_outgoing2" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="crm_case_categ_phone_outgoing4">
<field name="name">Calls Not Held</field>
@ -207,6 +217,8 @@
<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'))+'), (\'state\',\'=\',\'pending\')]'"/>
<field name="filter" eval="True"/>
<field name="search_view_id" ref="crm_configuration.view_crm_case_outbound_phonecalls_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_outgoing4">
<field name="sequence" eval="1"/>
@ -226,7 +238,7 @@
<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"/>
<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" groups="base.group_extended_menu"/>
</data>
</openerp>

View File

@ -19,6 +19,11 @@
<field name="date" string="Date"/>
<field name="user_id" string="Assigned to"/>
<field name="state"/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_pending" string="Not Held" states="open" type="object" icon="gtk-undo"/>
<button name="case_close" string="Held" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
</tree>
</field>
</record>
@ -29,14 +34,22 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Claims">
<group colspan="4" col="6">
<group colspan="4" col="7">
<field name="name" string="Subject"/>
<field name="section_id" colspan="1"/>
<field name="user_id" string="Assigned to" select="2"/>
<button string="Convert to Partner" icon="terp-crm" name="%(wizard_crm_partner_create)d" type="action" attrs="{'invisible':[('partner_id','!=',False)]}"/>
<newline/>
<field name="date" string="Date"/>
<field name="date" string="Planned Date"/>
<field name="duration"/>
<field name="case_id" on_change="onchange_case_id(case_id, name, partner_id)"/>
<field name="case_id" on_change="onchange_case_id(case_id, name, partner_id)"
context="{'default_name':name,'default_section_id':section_id,'default_user_id':user_id,'default_duration':duration,
'default_partner_id':partner_id,'default_partner_address_id':partner_address_id,'default_partner_phone':partner_phone,
'default_partner_mobile':partner_mobile,'default_categ_id':categ_id}"/>
<button string="Convert to Opportunity" name="%(wizard_crm_opportunity_set)d" icon="gtk-index" type="action"/>
<label string='' colspan='6' />
<button string="Schedule a Phone Call"
name="%(wizard_crm_reschedule_phone_call)d" icon="gtk-redo" type="action" />
</group>
<notebook colspan="4">
<page string="General">
@ -51,20 +64,19 @@
<field name="som"/>
<field name="priority" string="Relevant"/>
<separator string= "Description" colspan="4"/>
<field name="note" nolabel="1" colspan="4"/>
<field name="description" nolabel="1" colspan="4"/>
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state" select="1"/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object"/>
<button name="case_open" string="Open" states="draft,pending" type="object"/>
<button name="case_pending" string="Not Held" states="open" type="object"/>
<button name="case_close" string="Held" states="open,draft,pending" type="object"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object"/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_pending" string="Not Held" states="open" type="object" icon="gtk-undo"/>
<button name="case_close" string="Held" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
</group>
</page>
<page string="Extra Info" groups="base.group_extended">
<field name="id" select="2" colspan="4"/>
<field name="email_cc"/>
<page string="History">
<field name="id" select="1"/>
<field name="canal_id"/>
<separator colspan="4" string="Dates"/>
<field name="create_date"/>
@ -74,38 +86,9 @@
<field name="planned_cost"/>
<field name="planned_revenue"/>
<field name="probability"/>
<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">
<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 &amp; 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"/>
@ -117,8 +100,31 @@
</form>
</field>
</page>
</notebook>
</form>
<page string="Emails" groups="base.group_extended">
<group colspan="4">
<field colspan="4" name="email_cc" string="CC"/>
</group>
<field name="history_line" colspan="4" nolabel="1" mode="form,tree">
<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"/>
<button colspan="4" string="Reply to Last Email" name="%(crm.wizard_crm_send_mail)d" context="{'mail':'reply'}" icon="gtk-undo" type="action"/>
</form>
<tree string="Communication history">
<field name="description"/>
<field name="email"/>
<field name="date"/>
</tree>
</field>
<button colspan="4" string="Send New Email" name="%(crm.wizard_crm_new_send_mail)d" context="{'mail':'new'}" icon="gtk-go-forward" type="action"/>
</page>
</notebook>
</form>
</field>
</record>
@ -134,6 +140,79 @@
<field name="categ_id"/>
</calendar>
</field>
</record>
</record>
<record id="view_crm_case_phonecalls_filter" model="ir.ui.view">
<field name="name">crm.case.phonecalls.select</field>
<field name="model">crm.case</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Phonecalls">
<group col="4" colspan="1">
<filter icon="gtk-execute" string="My Phonecalls" domain="[('user_id','=',uid)]" separator="1" help="Phonecalls Related to Current User"/>
<filter icon="gtk-execute" string="Inbound Phonecalls" domain="[('section_id.name','=','Phone Calls'),('categ_id.name','=','Inbound')]" separator="1" help="All Inbound Phonecalls"/>
<filter icon="gtk-execute" string="Outbound Phonecalls" domain="[('section_id.name','=','Phone Calls'),('categ_id.name','=','Outbound')]" separator="1" help="All Outbound Phonecalls"/>
</group>
<group col="4" colspan="4">
<field name="state" select="1">
<filter icon="terp-crm" domain="[('state','=','draft')]" help="Draft Phonecalls"/>
<filter icon="terp-crm" domain="[('state','=','open')]" help="Open Phonecalls"/>
<filter icon="terp-crm" domain="[('state','=','pending')]" help="Pending Phonecalls"/>
</field>
<field name="name" select='1'/>
<field name="user_id" select="1" widget="selection"/>
</group>
</search>
</field>
</record>
<record id="view_crm_case_inbound_phonecalls_filter" model="ir.ui.view">
<field name="name">crm.case.inbound.phonecalls.select</field>
<field name="model">crm.case</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Inbound Phonecalls">
<group col="4" colspan="1">
<filter icon="gtk-execute" string="My Inbound Phonecalls" domain="[('user_id','=',uid),('categ_id.name','=','Inbound')]" separator="1" help="Inbound Phonecalls Related to Current User"/>
<filter icon="gtk-execute" string="Planned" domain="[('section_id.name','=','Phone Calls'),('stage_id.name','=','Planned')]" separator="1" help="All Planned Inbound Phonecalls"/>
<filter icon="gtk-execute" string="Not Held" domain="[('section_id.name','=','Phone Calls'),('stage_id.name','=','Not Held')]" separator="1" help="All Not Held Inbound Phonecalls"/>
</group>
<group col="4" colspan="4">
<field name="state" select="1">
<filter icon="terp-crm" domain="[('state','=','draft')]" help="Draft Inbound Phonecalls"/>
<filter icon="terp-crm" domain="[('state','=','open')]" help="Open Inbound Phonecalls"/>
<filter icon="terp-crm" domain="[('state','=','pending')]" help="Pending Inbound Phonecalls"/>
</field>
<field name="name" select='1'/>
<field name="user_id" select="1" widget="selection"/>
</group>
</search>
</field>
</record>
<record id="view_crm_case_outbound_phonecalls_filter" model="ir.ui.view">
<field name="name">crm.case.outbound.phonecalls.select</field>
<field name="model">crm.case</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Outbound Phonecalls">
<group col="4" colspan="1">
<filter icon="gtk-execute" string="My Outbound Phonecalls" domain="[('user_id','=',uid),('categ_id.name','=','Outbound')]" separator="1" help="Outbound Phonecalls Related to Current User"/>
<filter icon="gtk-execute" string="Planned" domain="[('section_id.name','=','Phone Calls'),('stage_id.name','=','Planned')]" separator="1" help="All Planned Outbound Phonecalls"/>
<filter icon="gtk-execute" string="Not Held" domain="[('section_id.name','=','Phone Calls'),('stage_id.name','=','Not Held')]" separator="1" help="All Not Held Outbound Phonecalls"/>
</group>
<group col="4" colspan="4">
<field name="state" select="1">
<filter icon="terp-crm" domain="[('state','=','draft')]" help="Draft Outbound Phonecalls"/>
<filter icon="terp-crm" domain="[('state','=','open')]" help="Open Outbound Phonecalls"/>
<filter icon="terp-crm" domain="[('state','=','pending')]" help="Pending Outbound Phonecalls"/>
</field>
<field name="name" select='1'/>
<field name="user_id" select="1" widget="selection"/>
</group>
</search>
</field>
</record>
</data>
</openerp>

View File

@ -19,7 +19,7 @@
<record id="process_node_leads0" model="process.node">
<field name="model_id" ref="crm.model_crm_case"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Leads&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Prospects&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Very first contact with new prospect&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_contractprocess0"/>
<field eval="&quot;&quot;&quot;object.state in ('draft', 'open', 'pending', 'done', 'cancel')&quot;&quot;&quot;" name="model_states"/>
@ -63,8 +63,8 @@
<record id="process_transition_leadopportunity0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Lead Opportunity&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Creating business opportunities from leads&quot;&quot;&quot;" name="note"/>
<field eval="&quot;&quot;&quot;Prospect Opportunity&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Creating business opportunities from prospects&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_opportunities0"/>
<field model="process.node" name="source_node_id" ref="process_node_leads0"/>
</record>
@ -72,7 +72,7 @@
<record id="process_transition_leadpartner0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Lead Partner&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Prospect Partner&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Prospect is converting to business partner&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_partner0"/>
<field model="process.node" name="source_node_id" ref="process_node_leads0"/>

View File

@ -26,7 +26,7 @@ import tools.sql
AVAILABLE_STATES = [
('draft','Draft'),
('open','Open'),
('cancel', 'Canceled'),
('cancel', 'Cancelled'),
('done', 'Closed'),
('pending','Pending')
]

View File

@ -23,4 +23,6 @@
import meeting_planify
import wizard_partner_create
import wizard_opportunity_set
import schedule_phone_call
import wizard_history_event
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -50,14 +50,48 @@ class make_meeting(wizard.interface):
def _makeMeeting(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
case_obj = pool.get('crm.case')
new_id = case_obj.write(cr, uid, data['id'], {
sec_obj = pool.get('crm.case.section')
meeting_id = sec_obj.search(cr, uid, [('code','=','Mtngs')])
if not meeting_id:
raise wizard.except_wizard(_('Error !'),
_('You did not installed the Meetings when you configured the crm_configuration module.' \
'\nyou must create a section with the code \'Mtngs\'.'
))
for case in case_obj.browse(cr, uid, data['ids']):
new_id=case_obj.copy(cr, uid, case.id)
modif = {
'date': data['form']['date'],
'duration': data['form']['duration']
}, context=context)
case_obj._history(cr, uid, case_obj.browse(cr, uid, [data['id']]), _('meeting'))
return {}
'duration': data['form']['duration'],
'case_id': case.id,
}
if meeting_id:
modif['section_id']=meeting_id[0]
new_id = case_obj.write(cr, uid, [new_id], modif, context=context)
# case_obj._history(cr, uid, case_obj.browse(cr, uid, data['ids']), _('meeting'))
data_obj = pool.get('ir.model.data')
result = data_obj._get_id(cr, uid, 'crm_configuration', 'view_crm_case_meetings_filter')
id = data_obj.read(cr, uid, result, ['res_id'])
id1 = data_obj._get_id(cr, uid, 'crm_configuration', 'crm_case_calendar_view_meet')
id2 = data_obj._get_id(cr, uid, 'crm_configuration', 'crm_case_form_view_meet')
id3 = data_obj._get_id(cr, uid, 'crm_configuration', 'crm_case_tree_view_meet')
if id1:
id1 = data_obj.browse(cr, uid, id1, context=context).res_id
if id2:
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
if id3:
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
return {
'domain':"[('section_id','=','Meetings')]",
'name': _('Meetings'),
'view_type': 'form',
'view_mode': 'calendar,form,tree',
'res_model': 'crm.case',
'view_id': False,
'views': [(id1,'calendar'),(id2,'form'),(id3,'tree'),(False,'graph')],
'type': 'ir.actions.act_window',
'search_view_id': id['res_id']
}
states = {
'init': {

View File

@ -0,0 +1,128 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from mx.DateTime import now
import wizard
import netsvc
import ir
import pooler
import time
from tools.translate import _
case_form = """<?xml version="1.0"?>
<form string="Schedule Phone Call">
<separator string="Phone Call Description" colspan="2" />
<newline />
<field name='user_id' />
<field name='deadline' />
<newline />
<field name='note' colspan="4"/>
<newline />
<field name='section_id' />
<field name='category_id' domain="[('section_id','=',section_id)]"/>
</form>"""
case_fields = {
'user_id' : {'string' : 'Assign To', 'type' : 'many2one', 'relation' : 'res.users'},
'deadline' : {'string' : 'Planned Date', 'type' : 'datetime', 'required' : True},
'note' : {'string' : 'Goals', 'type' : 'text'},
'category_id' : {'string' : 'Category', 'type' : 'many2one', 'relation' : 'crm.case.categ', 'required' : True},
'section_id' : {'string' : 'Section', 'type' : 'many2one', 'relation' : 'crm.case.section', 'required' : True},
}
class reschedule_phone_call(wizard.interface):
def _default_values(self, cr, uid, data, context):
case_obj = pooler.get_pool(cr.dbname).get('crm.case')
sec_obj = pooler.get_pool(cr.dbname).get('crm.case.section')
sec_id = sec_obj.search(cr, uid, [('code', '=', 'Phone')])
if not sec_id:
raise wizard.except_wizard(_('Error !'),
_('You did not installed the Phone Calls when you configured the crm_configuration module.' \
'\nyou must create a section with the code \'Phone\'.'
))
categ_id=pooler.get_pool(cr.dbname).get('crm.case.categ').search(cr, uid, [('name','=','Outbound')])
case = case_obj.browse(cr, uid, data['ids'][0])
return {
'user_id' : case.user_id and case.user_id.id,
'category_id' : categ_id and categ_id[0] or case.categ_id and case.categ_id.id,
'deadline' : time.strftime('%Y-%m-%d %H:%M:%S'),
'section_id' : sec_id and sec_id[0],
'note' : case.description
}
def _doIt(self, cr, uid, data, context):
form = data['form']
pool = pooler.get_pool(cr.dbname)
mod_obj = pool.get('ir.model.data')
result = mod_obj._get_id(cr, uid, 'crm_configuration', 'view_crm_case_phonecalls_filter')
res = mod_obj.read(cr, uid, result, ['res_id'])
case_obj = pool.get('crm.case')
# Select the view
data_obj = pool.get('ir.model.data')
id2 = data_obj._get_id(cr, uid, 'crm_configuration', 'crm_case_phone_tree_view')
id3 = data_obj._get_id(cr, uid, 'crm_configuration', 'crm_case_phone_form_view')
if id2:
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
if id3:
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
# We duplicate the current object
for id in data['ids']:
new_case = case_obj.copy(cr, uid, id, {'case_id':id,'user_id':form['user_id'],'categ_id':form['category_id'],'description':form['note'],'date' : form['deadline'], 'section_id' : form['section_id']}, context=context)
# Don't forget to cancel the current object,
for case in case_obj.browse(cr, uid, data['ids']):
if case.section_id.code == 'Phone':
case_obj.write(cr, uid, [case.id], {'state' : 'cancel'})
value = {
'domain': "[('section_id','=',%d)]"%form['section_id'],
'name': _('Phone Call'),
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'crm.case',
# 'view_id': id2,
'views': [(id2,'tree'),(id3,'form'),(False,'calendar'),(False,'graph')],
'type': 'ir.actions.act_window',
'search_view_id': res['res_id']
}
return value
states = {
'init': {
'actions': [_default_values],
'result': {'type': 'form', 'arch': case_form, 'fields': case_fields,
'state' : [('end', 'Cancel','gtk-cancel'),('order', 'Schedule Phone Call','gtk-go-forward')]}
},
'order': {
'actions': [],
'result': {'type': 'action', 'action': _doIt, 'state': 'end'}
}
}
reschedule_phone_call('crm.case.reschedule_phone_call')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,55 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import pooler
import time
def _open_history_event(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
data_obj = pool.get('ir.model.data')
result = data_obj._get_id(cr, uid, 'crm', 'view_crm_case_filter')
id = data_obj.read(cr, uid, result, ['res_id'])
id2 = data_obj._get_id(cr, uid, 'crm_configuration', 'crm_case_calendar_section-view')
if id2:
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
return {
'name': 'History : ' + pooler.get_pool(cr.dbname).get(data['model']).browse(cr,uid,data['ids'])[0].name,
'view_type': 'form',
"view_mode": 'calendar, tree, form',
'view_id' : False,
'views': [(id2,'calendar'),(False,'form'),(False,'tree'),(False,'graph')],
'res_model': 'crm.case',
'type': 'ir.actions.act_window',
'domain': "[('case_id','=',%d)]" % (data['id']),
'search_view_id': id['res_id']
}
class case_history_event(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type': 'action', 'action': _open_history_event, 'state':'end'}
}
}
case_history_event('crm.case.history.events')

View File

@ -28,18 +28,38 @@ import ir
import pooler
from tools.translate import _
partner_form = """<?xml version="1.0"?>
<form string="Convert To Partner">
<label string="Are you sure you want to create a partner based on this prospect ?" colspan="4"/>
<label string="You may have to verify that this partner does not exist already." colspan="4"/>
<newline />
<field name="action"/>
<group attrs="{'invisible':[('action','=','create')]}">
<field name="partner_id" attrs="{'required':[('action','=','exist')]}"/>
</group>
</form>"""
partner_fields = {
'action': {'type':'selection',
'selection':[('exist','Link to an existing partner'),('create','Create a new partner')],
'string':'Action', 'required':True, 'default': lambda *a:'create'},
'partner_id' : {'type':'many2one', 'relation':'res.partner', 'string':'Partner'},
}
case_form = """<?xml version="1.0"?>
<form string="Convert To Opportunity">
<field name="name"/>
<field name="partner_id"/>
<newline/>
<field name="planned_revenue"/>
<field name="probability"/>
</form>"""
case_fields = {
'name': {'type':'char', 'size':64, 'string':'Opportunity Summary'},
'name': {'type':'char', 'size':64, 'string':'Opportunity Summary', 'required':True},
'planned_revenue': {'type':'float', 'digits':(16,2), 'string': 'Expected Revenue'},
'probability': {'type':'float', 'digits':(16,2), 'string': 'Success Probability'},
'partner_id' : {'type':'many2one', 'relation':'res.partner', 'string':'Partner'},
}
@ -50,51 +70,118 @@ class make_opportunity(wizard.interface):
case_obj = pool.get('crm.case')
for case in case_obj.browse(cr, uid, data['ids']):
if not case.partner_id:
raise wizard.except_wizard(_('Warning !'),
_('You must assign a partner to this lead before converting to opportunity.\n' \
'You can use the convert to partner button.'))
return {'name': case.name, 'probability': case.probability or 20.0, 'planned_revenue':case.planned_revenue}
return 'create_partner'
return {'name': case.name, 'probability': case.probability or 20.0,
'planned_revenue':case.planned_revenue, 'partner_id':case.partner_id.id}
def _selectChoice(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
case_obj = pool.get('crm.case')
for case in case_obj.browse(cr, uid, data['ids']):
if not case.partner_id:
return 'create_partner'
return 'opportunity'
def _makeOrder(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
section_obj = pool.get('crm.case.section')
data_obj = pool.get('ir.model.data')
result = data_obj._get_id(cr, uid, 'crm_configuration', 'view_crm_case_opportunities_filter')
res = data_obj.read(cr, uid, result, ['res_id'])
section_obj = pool.get('crm.case.section')
id = section_obj.search(cr, uid, [('code','=','oppor')], context=context)
if not id:
raise wizard.except_wizard(_('Error !'),
_('You did not installed the opportunities tracking when you configured the crm_configuration module.' \
'\nI can not convert the lead to an opportunity, you must create a section with the code \'oppor\'.'
'\nYou can not convert the prospect to an opportunity, you must create a section with the code \'oppor\'.'
))
id = id[0]
id2 = data_obj._get_id(cr, uid, 'crm_configuration', 'crm_case_form_view_oppor')
id3 = data_obj._get_id(cr, uid, 'crm_configuration', 'crm_case_tree_view_oppor')
if id2:
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
if id3:
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
case_obj = pool.get('crm.case')
case_obj._history(cr, uid, case_obj.browse(cr, uid, [data['id']]), 'convert')
case_obj.write(cr, uid, data['ids'], {
new_pros=case_obj.copy(cr, uid, data['id'])
# case_obj._history(cr, uid, case_obj.browse(cr, uid, [new_pros]), 'convert')
case_obj.write(cr, uid, [new_pros], {
'section_id': id,
'name': data['form']['name'],
'planned_revenue': data['form']['planned_revenue'],
'probability': data['form']['probability'],
'partner_id': data['form']['partner_id'],
'case_id':data['id'],
'state':'open',
})
case_obj.write(cr, uid, [data['id']], {
'partner_id': data['form']['partner_id'],
'state':'done',
})
value = {
'domain': "[]",
'domain': "[('section_id','=',%d)]"%(id),
'name': _('Opportunity'),
'view_type': 'form',
'view_mode': 'form,tree',
'res_model': 'crm.case',
'res_id': int(data['ids'][0]),
'res_id': int(new_pros),
'view_id': False,
'views': [(id2,'form'),(False,'tree'),(False,'calendar'),(False,'graph')],
'views': [(id2,'form'),(id3,'tree'),(False,'calendar'),(False,'graph')],
'type': 'ir.actions.act_window',
'search_view_id': res['res_id']
}
return value
def _makePartner(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
case_obj = pool.get('crm.case')
partner_obj = pool.get('res.partner')
contact_obj = pool.get('res.partner.address')
if data['form']['action']=='create':
for case in case_obj.browse(cr, uid, data['ids']):
partner_id = partner_obj.search(cr, uid, [('name', '=', case.partner_name or case.name)])
if partner_id:
raise wizard.except_wizard(_('Warning !'),_('A partner is already existing with the same name.'))
else:
partner_id = partner_obj.create(cr, uid, {
'name': case.partner_name or case.name,
'user_id': case.user_id.id,
'comment': case.description,
})
contact_id = contact_obj.create(cr, uid, {
'partner_id': partner_id,
'name': case.partner_name2,
'phone': case.partner_phone,
'mobile': case.partner_mobile,
'email': case.email_from
})
else:
partner = partner_obj.browse(cr,uid,data['form']['partner_id'])
partner_id=partner.id
contact_id=partner.address and partner.address[0].id
case_obj.write(cr, uid, data['ids'], {
'partner_id': partner_id,
'partner_address_id': contact_id
})
return {}
states = {
'init': {
'actions': [],
'result': {'type':'choice','next_state':_selectChoice}
},
'create_partner': {
'actions': [],
'result': {'type': 'form', 'arch': partner_form, 'fields': partner_fields,
'state' : [('end', 'Cancel', 'gtk-cancel'),('create', 'Continue', 'gtk-go-forward')]}
},
'create': {
'actions': [],
'result': {'type': 'action', 'action': _makePartner, 'state':'opportunity' }
},
'opportunity': {
'actions': [_selectopportunity],
'result': {'type': 'form', 'arch': case_form, 'fields': case_fields,
'state' : [('end', 'Cancel', 'gtk-cancel'),('confirm', 'Create Opportunity', 'gtk-go-forward')]}

View File

@ -30,13 +30,13 @@ from tools.translate import _
case_form = """<?xml version="1.0"?>
<form string="Convert To Partner">
<label string="Are you sure you want to create a partner based on this lead ?" colspan="4"/>
<label string="Are you sure you want to create a partner based on this prospect ?" colspan="4"/>
<label string="You may have to verify that this partner does not exist already." colspan="4"/>
<field name="close"/>
<!--field name="close"/-->
</form>"""
case_fields = {
'close': {'type':'boolean', 'string':'Close Lead'}
'close': {'type':'boolean', 'string':'Close Prospect'}
}
@ -48,11 +48,14 @@ class make_partner(wizard.interface):
for case in case_obj.browse(cr, uid, data['ids']):
if case.partner_id:
raise wizard.except_wizard(_('Warning !'),
_('A partner is already defined on this lead.'))
_('A partner is already defined on this prospect.'))
return {}
def _makeOrder(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
mod_obj = pool.get('ir.model.data')
result = mod_obj._get_id(cr, uid, 'base', 'view_res_partner_filter')
res = mod_obj.read(cr, uid, result, ['res_id'])
case_obj = pool.get('crm.case')
partner_obj = pool.get('res.partner')
contact_obj = pool.get('res.partner.address')
@ -64,7 +67,7 @@ class make_partner(wizard.interface):
partner_id = partner_obj.create(cr, uid, {
'name': case.partner_name or case.name,
'user_id': case.user_id.id,
'comment': case.note,
'comment': case.description,
})
contact_id = contact_obj.create(cr, uid, {
'partner_id': partner_id,
@ -90,6 +93,7 @@ class make_partner(wizard.interface):
'res_id': int(partner_id),
'view_id': False,
'type': 'ir.actions.act_window',
'search_view_id': res['res_id']
}
return value

View File

@ -65,9 +65,11 @@
<form string="Questionnaires">
<field name="name" select="1" />
<newline/>
<field name="description" select="1" />
<separator string="Questions List" colspan="4"/>
<field name="questions_ids" colspan="4" nolabel="1"/>
<newline/>
<field name="questions_ids" colspan="4"/>
<separator string="Description" colspan="4"/>
<field name="description" colspan="4" select="1" nolabel="1"/>
</form>
</field>
</record>
@ -139,7 +141,7 @@
<field name="arch" type="xml">
<notebook position="inside">
<page string="Profiling">
<button string="Use a questionnaire" name="%(wizard_open_questionnaire)d" type="action" colspan="1"/>
<button string="Use a questionnaire" name="%(wizard_open_questionnaire)d" type="action" colspan="1" icon="gtk-justify-fill"/>
<newline/>
<field name="answers_ids" colspan="4" nolabel="1"/>
</page>
@ -164,9 +166,9 @@
<field name="description" select="2" colspan="4"/>
<field name="state"/>
<group col="3" colspan="2">
<button name="process_start" states="not running" string="Compute Segmentation" type="object"/>
<button name="process_stop" states="running" string="Stop Process" type="object"/>
<button name="process_continue" states="running" string="Continue Process" type="object"/>
<button name="process_start" states="not running" string="Compute Segmentation" type="object" icon="gtk-apply"/>
<button name="process_stop" states="running" string="Stop Process" type="object" icon="gtk-stop"/>
<button name="process_continue" states="running" string="Continue Process" type="object" icon="gtk-go-forward"/>
</group>
</page>
<page string="Sales Purchase">

View File

@ -2,7 +2,7 @@
<openerp>
<data>
<record id="crm_configuration.menu_crm_case_categ0_act_leads" model="ir.ui.menu">
<field eval="&quot;Leads Tracking&quot;" name="name"/>
<field eval="&quot;Prospects Tracking&quot;" name="name"/>
<field eval="&quot;terp-account&quot;" name="icon"/>
<field eval="False" name="parent_id"/>
</record>
@ -10,7 +10,7 @@
<record id="ir_ui_view_sc_myleads0" model="ir.ui.view_sc">
<field ref="crm_configuration.menu_crm_case_categ0_act_leads_my" name="res_id"/>
<field eval="&quot;ir.ui.menu&quot;" name="resource"/>
<field eval="&quot;My Leads&quot;" name="name"/>
<field eval="&quot;My Prospects&quot;" name="name"/>
<field name="user_id" ref="base.user_root"/>
</record>

View File

@ -164,9 +164,11 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('invoice_state','=','2binvoiced'),('state','=','done'),('type','=','out')]</field>
<field name="filter" eval="True"/>
<field name="context">{'contact_display': 'partner'}</field>
<field name="search_view_id" ref="stock.view_stock_delivery_filter"/>
</record>
<menuitem action="action_picking_tree4" id="menu_action_picking_tree3" parent="stock.menu_action_picking_tree"/>
<menuitem action="action_picking_tree4" id="menu_action_picking_tree3" parent="stock.menu_action_picking_tree" groups="base.group_extended_menu"/>
<record id="action_picking_tree5" model="ir.actions.act_window">
<field name="name">Generate Draft Invoices On Receptions</field>
@ -175,8 +177,11 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('invoice_state','=','2binvoiced'),('state','=','done'),('type','=','in')]</field>
<field name="filter" eval="True"/>
<field name="context">{'contact_display': 'partner'}</field>
<field name="search_view_id" ref="stock.view_stock_delivery_filter"/>
</record>
<menuitem action="action_picking_tree5" id="menu_action_picking_tree5" parent="stock.menu_action_picking_tree4"/>
<menuitem action="action_picking_tree5" id="menu_action_picking_tree5" parent="stock.menu_action_picking_tree4" groups="base.group_extended_menu"/>
</data>
</openerp>

View File

@ -131,7 +131,7 @@ class event(osv.osv):
'register_prospect': fields.function(_get_prospect, method=True, string='Unconfirmed Registrations'),
'date_begin': fields.datetime('Beginning date', required=True),
'date_end': fields.datetime('Ending date', required=True),
'state': fields.selection([('draft','Draft'),('confirm','Confirmed'),('done','Done'),('cancel','Canceled')], 'Status', readonly=True, required=True),
'state': fields.selection([('draft','Draft'),('confirm','Confirmed'),('done','Done'),('cancel','Cancelled')], 'Status', readonly=True, required=True),
'mail_auto_registr':fields.boolean('Mail Auto Register',help='Check this box if you want to use the automatic mailing for new registration'),
'mail_auto_confirm':fields.boolean('Mail Auto Confirm',help='Check this box if you want ot use the automatic confirmation emailing or the reminder'),
'mail_registr':fields.text('Registration Email',help='This email will be sent when someone subscribes to the event.'),

View File

@ -73,10 +73,10 @@
<separator string="Status" colspan="4"/>
<field name="state" select="1"/>
<group col="4" colspan="2">
<button string="Confirm Event" name="button_confirm" states="draft" type="object"/>
<button string="Cancel Event" name="button_cancel" states="draft,confirm" type="object"/>
<button string="Event Done" name="button_done" states="confirm" type="object"/>
<button string="Set To Draft" name="button_draft" states="confirm,cancel,done" type="object"/>
<button string="Confirm Event" name="button_confirm" states="draft" type="object" icon="gtk-apply"/>
<button string="Cancel Event" name="button_cancel" states="draft,confirm" type="object" icon="gtk-cancel"/>
<button string="Event Done" name="button_done" states="confirm" type="object" icon="gtk-jump-to"/>
<button string="Set To Draft" name="button_draft" states="confirm,cancel,done" type="object" icon="gtk-convert"/>
</group>
</page>
<page string="Mailing">
@ -119,44 +119,47 @@
</record>
<!-- Events Organisation/CONFIGURATION/EVENTS -->
<record model="ir.actions.act_window" id="action_new_event_form">
<record model="ir.actions.act_window" id="action_event_view">
<field name="name">Events</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">event.event</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="All Events" id="menu_event_event" action="action_event_view" parent="menu_event_main" />
<record model="ir.actions.act_window" id="action_new_event_form">
<field name="name">New event</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">event.event</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
</record>
<menuitem parent="menu_event_main" id="menu_event_new_event" action="action_new_event_form" />
<record model="ir.actions.act_window" id="action_event_view">
<field name="name">Events</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">event.event</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="All Events" id="menu_event_event" action="action_event_view" parent="menu_event_main"/>
<menuitem parent="menu_event_event" id="menu_event_new_event" action="action_new_event_form" />
<record model="ir.actions.act_window" id="action_event_view_draft">
<field name="name">Draft Events</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">event.event</field>
<field name="domain">[('state','=','draft')]</field>
<field name="filter" eval="True"/>
</record>
<menuitem
parent="menu_event_event"
id="menu_event_event_draft"
action="action_event_view_draft" />
action="action_event_view_draft" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="action_event_view_confirm">
<field name="name">Confirmed Events</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">event.event</field>
<field name="domain">[('state','=','confirm')]</field>
<field name="filter" eval="True"/>
</record>
<menuitem parent="menu_event_event"
id="menu_event_event_confirm"
action="action_event_view_confirm" />
action="action_event_view_confirm" groups="base.group_extended_menu"/>
<!-- EVENTS/REGISTRATIONS/EVENTS -->
@ -189,7 +192,7 @@
<field name="nb_register"/>
<group colspan="2">
<field name="user_id" select="1"/>
<button name="remind_user" string="Send Reminder" states="open,pending" type="object" colspan="2"/>
<button name="remind_user" string="Send Reminder" states="open,pending" type="object" colspan="2" icon="gtk-go-forward"/>
</group>
<field name="partner_id" required="1" select="1" on_change="onchange_partner_id(partner_id,event_id)" />
<field name="partner_invoice_id" on_change="onchange_partner_invoice_id(event_id, partner_invoice_id)"/>
@ -199,7 +202,7 @@
<page string="General">
<field name="contact_id" select="2" on_change="onchange_contact_id(contact_id, partner_id)" /><newline/>
<field name="email_from" select="2"/>
<button name="remind_partner" string="Send Reminder" states="open,pending" type="object" colspan="2"/>
<button name="remind_partner" string="Send Reminder" states="open,pending" type="object" colspan="2" icon="gtk-go-forward"/>
<newline/>
<separator string="Badge" colspan="4"/>
<field name="badge_title" select="2"/>
@ -209,9 +212,9 @@
<separator string="Status" colspan="4"/>
<group col="8" colspan="4">
<field name="state" select="1" colspan="2"/>
<button name="button_reg_close" string="Registration Invoiced" states="open" type="object"/>
<button name="%(event_confirm_registration)d" string="Confirm Registration" states="draft" type="action"/>
<button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object"/>
<button name="button_reg_close" string="Registration Invoiced" states="open" type="object" icon="gtk-print"/>
<button name="%(event_confirm_registration)d" string="Confirm Registration" states="draft" type="action" icon="gtk-apply"/>
<button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
</group>
</page>
<page string="Extra Info">
@ -230,7 +233,8 @@
<field name="ref2" colspan="4"/>
</page>
<page string="History">
<field name="history_line" colspan="4" nolabel="1" mode="tree,form"> <form string="Communication history">
<field name="history_line" colspan="4" nolabel="1" mode="tree,form">
<form string="Communication history">
<field name="date"/>
<field name="som"/>
<newline/>
@ -283,27 +287,38 @@
name="All Registrations"
id="menu_action_registration" parent="menu_event_main"
action="action_registration"/>
<record model="ir.actions.act_window" id="action_registration_new">
<field name="name">New Registration</field>
<field name="res_model">event.registration</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
</record>
<menuitem parent="menu_action_registration" id="menu_action_registration_new" action="action_registration_new"/>
<record model="ir.actions.act_window" id="action_registration_draft">
<field name="name">Unconfirmed Registrations</field>
<field name="res_model">event.registration</field>
<field name="view_type">form</field>
<field name="domain">[('state','=','draft')]</field>
<field name="view_mode">tree,form</field>
<field name="filter" eval="True"/>
</record>
<menuitem
parent="menu_action_registration"
id="menu_action_registration_draft"
action="action_registration_draft"/>
action="action_registration_draft" groups="base.group_extended_menu"/>
<record model="ir.actions.act_window" id="action_registration_confirm">
<field name="name">Confirmed Registrations</field>
<field name="res_model">event.registration</field>
<field name="view_type">form</field>
<field name="domain">[('state','in',('open','done'))]</field>
<field name="filter" eval="True"/>
</record>
<menuitem
parent="menu_action_registration"
id="menu_action_registration_confirm"
action="action_registration_confirm"/>
action="action_registration_confirm" groups="base.group_extended_menu"/>
<!-- report , event on registration... start -->

View File

@ -40,6 +40,9 @@ def _list_partners(self, cr, uid, data, context):
class event_partners(wizard.interface):
def _reg_partners(self, cr, uid, data, context):
pool_obj = pooler.get_pool(cr.dbname)
mod_obj = pool_obj.get('ir.model.data')
result = mod_obj._get_id(cr, uid, 'base', 'view_res_partner_filter')
id = mod_obj.read(cr, uid, result, ['res_id'])
model_data_ids = pool_obj.get('ir.model.data').search(cr,uid,[('model','=','ir.ui.view'),('name','=','view_partner_form')])
resource_id = pool_obj.get('ir.model.data').read(cr,uid,model_data_ids,fields=['res_id'])[0]['res_id']
return {
@ -49,7 +52,8 @@ class event_partners(wizard.interface):
'view_mode': 'tree,form',
'res_model': 'res.partner',
'views': [(False,'tree'),(resource_id,'form')],
'type': 'ir.actions.act_window'
'type': 'ir.actions.act_window',
'search_view_id': id['res_id']
}
return {}

View File

@ -13,7 +13,7 @@
<field name="register_max" position="after">
<separator string="Tasks management" colspan="4"/>
<field name="project_id"/>
<button string="Create Retro-Planning" name="%(event_wiz)d" type="action"/>
<button string="Create Retro-Planning" name="%(event_wiz)d" type="action" icon="gtk-execute"/>
</field>
</field>
</record>

View File

@ -24,6 +24,10 @@ import pooler
from tools.translate import _
def _event_tasks(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
mod_obj = pool.get('ir.model.data')
result = mod_obj._get_id(cr, uid, 'project', 'view_task_search_form')
id = mod_obj.read(cr, uid, result, ['res_id'])
event_id = data['id']
cr.execute('SELECT project_id FROM event_event WHERE id = %s', (event_id, ))
res = cr.fetchone()
@ -36,7 +40,8 @@ def _event_tasks(self, cr, uid, data, context):
'view_mode': 'tree,form,calendar',
'res_model': 'project.task',
'context': { },
'type': 'ir.actions.act_window'
'type': 'ir.actions.act_window',
'search_view_id': id['res_id']
}
return value

View File

@ -13,7 +13,7 @@
<group colspan="1" col="2">
<field name="street2" nolabel="1"/>
<button name="%(wizard_google_map)d"
string="Map" type="action"/>
string="Map" type="action" icon="gtk-zoom-in"/>
</group>
</field>
</field>
@ -29,7 +29,7 @@
<label string="Street2 : " align="1.0"/>
<group colspan="1" col="2">
<field name="street2" nolabel="1"/>
<button name="%(wizard_google_map)d" string="Map" type="action"/>
<button name="%(wizard_google_map)d" string="Map" type="action" icon="gtk-zoom-in"/>
</group>
</field>
</field>
@ -47,7 +47,7 @@
<group colspan="1" col="2">
<field name="street2" nolabel="1"/>
<button name="%(wizard_google_map)d"
string="Map" type="action"/>
string="Map" type="action" icon="gtk-zoom-in"/>
</group>
</field>
</field>

View File

@ -131,7 +131,7 @@ class hr_employee(osv.osv):
'sinid': fields.char('SIN No', size=32),
'otherid': fields.char('Other ID', size=32),
'gender': fields.selection([('',''),('male','Male'),('female','Female')], 'Gender'),
'marital': fields.selection([('maried','Maried'),('unmaried','Unmaried'),('divorced','Divorced'),('other','Other')],'Marital Status', size=32),
'marital': fields.selection([('married','Married'),('unmarried','Unmarried'),('divorced','Divorced'),('other','Other')],'Marital Status', size=32),
'address_id': fields.many2one('res.partner.address', 'Working Address'),
'address_home_id': fields.many2one('res.partner.address', 'Home Address'),

View File

@ -86,45 +86,65 @@ class res_users(osv.osv):
_inherit = 'res.users'
_description = 'res.users'
def _parent_compute(self, cr, uid, ids, name, arg, context={}):
def _parent_compute(self, cr, uid, ids, name, args, context={}):
result = {}
obj_dept = self.pool.get('hr.department')
for id in ids:
ids_dept = obj_dept.search(cr, uid, [('member_ids', 'in', [id])])
for user_id in ids:
ids_dept = obj_dept.search(cr, uid, [('member_ids', 'in', [user_id])])
parent_ids = []
if ids_dept:
data_dept = obj_dept.read(cr, uid, ids_dept, ['manager_id'])
parent_ids = map(lambda x: x['manager_id'][0], data_dept)
result[id] = parent_ids
result[user_id] = parent_ids
return result
def _child_compute(self, cr, uid, ids):
obj_dept = self.pool.get('hr.department')
child_ids = []
for id in ids:
ids_dept = obj_dept.search(cr, uid, [('manager_id', '=', id)])
if ids_dept:
data_dept = obj_dept.read(cr, uid, ids_dept, ['member_ids'])
childs = map(lambda x: x['member_ids'], data_dept)
childs = tools.flatten(childs)
if id in childs:
childs.remove(id)
child_ids.extend(tools.flatten(childs))
return child_ids
def _parent_search(self, cr, uid, obj, name, args):
parent = []
for arg in args:
if arg[0] == 'parent_id':
parent = arg[2]
child_ids = self._child_compute(cr, uid, parent)
child_ids = self._child_compute(cr, uid, parent,name, args, {})
if not child_ids:
return [('id', 'in', [0])]
return [('id', 'in', child_ids)]
def _child_compute(self, cr, uid, ids, name, args, context={}):
obj_dept = self.pool.get('hr.department')
result = {}
for manager_id in ids:
child_ids = []
mgnt_dept_ids = obj_dept.search(cr, uid, [('manager_id', '=', manager_id)])
ids_dept = obj_dept.search(cr, uid, [('id', 'child_of', mgnt_dept_ids)])
if ids_dept:
data_dept = obj_dept.read(cr, uid, ids_dept, ['member_ids'])
childs = map(lambda x: x['member_ids'], data_dept)
childs = tools.flatten(childs)
if manager_id in childs:
childs.remove(manager_id)
child_ids.extend(tools.flatten(childs))
set = {}
map(set.__setitem__, child_ids, [])
child_ids = set.keys()
else:
child_ids = []
result[manager_id] = child_ids
return result
def _child_search(self, cr, uid, obj, name, args):
parent = []
for arg in args:
if arg[0] == 'child_ids':
parent = arg[2]
child_ids = self._child_compute(cr, uid, parent,name, args, {})
if not child_ids:
return [('id', 'in', [0])]
return [('id', 'in', child_ids)]
_columns = {
'parent_id': fields.function(_parent_compute, relation='res.users',fnct_search=_parent_search, method=True, string="Parent Users", type='many2many'),
}
'parent_id': fields.function(_parent_compute, relation='res.users',fnct_search=_parent_search, method=True, string="Managers", type='many2many'),
'child_ids': fields.function(_child_compute, relation='res.users', fnct_search=_child_search,method=True, string="Subordinates", type='many2many'),
}
res_users()

View File

@ -13,13 +13,13 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="department">
<notebook>
<page string="Department">
<field colspan="4" name="name" select="1"/>
<field name="company_id" select="1"/>
<field name="parent_id" select="2"/>
<field colspan="4" name="manager_id" select="1"/>
<field colspan="4" name="member_ids"/>
<field colspan="4" name="name" select="1"/>
<field name="company_id" select="1"/>
<field name="parent_id" select="2"/>
<field colspan="4" name="manager_id" select="1"/>
<notebook colspan="4" >
<page string="Members">
<field colspan="4" name="member_ids" nolabel="1"/>
</page>
<page string="Notes">
<field colspan="4" name="note" nolabel="1"/>
@ -65,8 +65,11 @@
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<notebook position="inside">
<page string="Parents">
<field name="parent_id" nolabel="1"/>
<page string="Departements Informations">
<separator string="Managers" colspan="4"/>
<field name="parent_id" nolabel="1" colspan="4"/>
<separator string="Subordinates" colspan="4"/>
<field name="child_ids" nolabel="1" colspan="4"/>
</page>
</notebook>
</field>

View File

@ -93,8 +93,8 @@
<field name="arch" type="xml">
<field name="parent_id" position="after">
<field name="state"/>
<button name="sign_in" states="absent" string="Sign In" type="object"/>
<button name="sign_out" states="present" string="Sign Out" type="object"/>
<button name="sign_in" states="absent" string="Sign In" type="object" icon="gtk-go-back"/>
<button name="sign_out" states="present" string="Sign Out" type="object" icon="gtk-go-forward"/>
</field>
</field>
</record>

View File

@ -86,14 +86,13 @@ class hr_contract(osv.osv):
'function' : fields.many2one('res.partner.function', 'Function'),
'date_start' : fields.date('Start Date', required=True),
'date_end' : fields.date('End Date'),
'working_hours_per_day' : fields.integer('Working hours per day'),
'working_hours_per_day_id' : fields.many2one('hr.timesheet.group','Working hours per day'),
'wage_type_id' : fields.many2one('hr.contract.wage.type', 'Wage Type', required=True),
'wage' : fields.float('Wage', required=True),
'notes' : fields.text('Notes'),
}
_defaults = {
'date_start' : lambda *a : time.strftime("%Y-%m-%d"),
'working_hours_per_day' : lambda *a : 8,
}
hr_contract()

View File

@ -83,7 +83,7 @@
<field name="function"/>
<field name="date_start"/>
<field name="date_end"/>
<field name="working_hours_per_day"/>
<field name="working_hours_per_day_id"/>
<field name="wage_type_id"/>
<field name="wage"/>
</tree>
@ -94,7 +94,7 @@
<newline/>
<separator colspan="4" string="Contract Duration"/>
<field name="function"/>
<field name="working_hours_per_day"/>
<field name="working_hours_per_day_id"/>
<field name="date_start" select="1"/>
<field name="date_end" select="1"/>
@ -155,7 +155,7 @@
<separator colspan="4" string="Contract Duration"/>
<field name="date_start" select="1"/>
<field name="date_end" select="1"/>
<field name="working_hours_per_day"/>
<field name="working_hours_per_day_id"/>
<newline/>
<separator colspan="4" string="Remuneration"/>
@ -189,7 +189,7 @@
<field name="function"/>
<field name="date_start"/>
<field name="date_end"/>
<field name="working_hours_per_day"/>
<field name="working_hours_per_day_id"/>
<field name="wage_type_id"/>
<field name="wage"/>
</tree>
@ -200,11 +200,12 @@
<field name="name">Contract</field>
<field name="res_model">hr.contract</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_mode">tree,form</field>
<field name="domain">[]</field>
</record>
<menuitem action="action_hr_contract" id="hr_menu_contract" parent="hr.menu_hr_root"/>
<menuitem name="Contract" id="menu_hr_contract" parent="hr.menu_hr_root"/>
<menuitem action="action_hr_contract" id="hr_menu_contract" parent="menu_hr_contract"/>
</data>
</openerp>

Some files were not shown because too many files have changed in this diff Show More