improved_views
bzr revid: fp@tinyerp.com-20081112160515-ohdedq00632fbubb
This commit is contained in:
parent
46f5e3af12
commit
666c2ea859
|
@ -17,7 +17,11 @@
|
|||
<group colspan="4" col="4">
|
||||
<field name="name" string="Title" colspan="2"/>
|
||||
<field name="section_id" colspan="1"/>
|
||||
<field name="stage_id" string="Resolution" colspan="2"/>
|
||||
<label string="Resolution: " 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"/>
|
||||
<field name="email_from" colspan="2"/>
|
||||
<field name="user_id" />
|
||||
|
|
|
@ -35,7 +35,11 @@
|
|||
<newline/>
|
||||
<field name="date" string="Date of Claim"/>
|
||||
<field name="categ_id" string="Type of claim" select="1" on_change="onchange_categ_id(categ_id)"/>
|
||||
<field name="stage_id"/>
|
||||
<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>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Claims Info">
|
||||
|
|
|
@ -68,6 +68,25 @@ class crm_cases(osv.osv):
|
|||
'partner_phone': fields.char('Phone', size=16),
|
||||
'partner_mobile': fields.char('Mobile', size=16),
|
||||
}
|
||||
def stage_next(self, cr, uid, ids, context={}):
|
||||
ok = False
|
||||
sid = self.pool.get('crm.case.stage').search(cr, uid, [], context=context)
|
||||
s = {}
|
||||
previous = {}
|
||||
for stage in self.pool.get('crm.case.stage').browse(cr, uid, sid, context=context):
|
||||
section = stage.section_id.id or False
|
||||
s.setdefault(section, {})
|
||||
s[section][previous.get(section, False)] = stage.id
|
||||
previous[section] = stage.id
|
||||
|
||||
for case in self.browse(cr, uid, ids, context):
|
||||
section = (case.section_id.id or False)
|
||||
if section in s:
|
||||
st = case.stage_id.id or False
|
||||
if st in s[section]:
|
||||
self.write(cr, uid, [case.id], {'stage_id': s[section][st]})
|
||||
|
||||
return True
|
||||
def onchange_case_id(self, cr, uid, ids, case_id, name, partner_id, context={}):
|
||||
if not case_id: return {}
|
||||
case = self.browse(cr, uid, case_id, context=context)
|
||||
|
|
|
@ -37,7 +37,11 @@
|
|||
<field name="user_id" string="Responsible" select="2"/>
|
||||
<button name="set_partner" string="Convert to Partner" icon="terp-sale"/>
|
||||
<newline/>
|
||||
<field name="stage_id"/>
|
||||
<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>
|
||||
<field name="date" string="Next Interview"/>
|
||||
<field name="duration" widget="float_time"/>
|
||||
<button name="set_meeting" string="Schedule Meeting" icon="terp-crm"/>
|
||||
|
|
|
@ -15,7 +15,11 @@
|
|||
<group colspan="4" col="7">
|
||||
<field name="name" select="1" string="Lead Subject"/>
|
||||
<field name="section_id" colspan="1"/>
|
||||
<field name="stage_id" select="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)]}"/>
|
||||
<field name="user_id" select="2"/>
|
||||
<field name="categ_id" select="1" on_change="onchange_categ_id(categ_id)" string="Lead Source"/>
|
||||
|
|
|
@ -16,7 +16,12 @@
|
|||
<field name="name" select="1" string="Opportunity" colspan="2"/>
|
||||
<field name="section_id" colspan="1"/>
|
||||
<field name="user_id" select="2" string="Responsible"/>
|
||||
<field name="stage_id" select="1" string="Sales Stage"/>
|
||||
<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"/>
|
||||
<button string="Schedule Meeting" icon="terp-crm" name="%(wizard_crm_meeting)d" type="action"/>
|
||||
|
|
|
@ -817,6 +817,7 @@
|
|||
<field groups="base.group_extended" name="product_packaging"/>
|
||||
<field name="prodlot_id" select="1" context="{'location_id':location_id, 'product_id':product_id}" domain="[('product_id','=',product_id)]" on_change="onchange_lot_id(prodlot_id,product_qty, location_id)"/>
|
||||
<field groups="base.group_extended" name="tracking_id" select="1"/>
|
||||
<button name="%(track_line)d" string="Split in production lots" type="action"/>
|
||||
<separator colspan="4" string="Move State"/>
|
||||
<field name="state" select="1"/>
|
||||
<group>
|
||||
|
@ -1154,11 +1155,11 @@
|
|||
<menuitem action="action_picking_tree8" id="menu_action_picking_tree8" parent="menu_action_picking_tree6"/>
|
||||
|
||||
<record id="action_picking_tree9" model="ir.actions.act_window">
|
||||
<field name="name">Draft Internal Packings</field>
|
||||
<field name="name">New Internal Packings</field>
|
||||
<field name="res_model">stock.picking</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar</field>
|
||||
<field name="view_mode">form,tree,calendar</field>
|
||||
<field name="domain">[('state','=','draft'),('type','=','internal')]</field>
|
||||
<field name="context">{'contact_display': 'partner'}</field>
|
||||
</record>
|
||||
|
|
Loading…
Reference in New Issue