[MERGE] Merge improverment chatter view

bzr revid: sbh@tinyerp.com-20120516084351-he9ke3liofz8c6b9
This commit is contained in:
Sbh (Openerp)
2012-05-16 14:13:51 +05:30
9 changed files with 45 additions and 20 deletions
+6 -2
View File
@@ -144,7 +144,7 @@
<field name="type">form</field>
<field name="priority">2</field>
<field name="arch" type="xml">
<form string="Supplier Invoice">
<form string="Supplier Invoice" layout="auto">
<group col="8" colspan="4">
<field name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection"/>
<field name="number" readonly="1"/>
@@ -243,7 +243,9 @@
</field>
</page>
</notebook>
<div class="oe_form_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>
@@ -253,7 +255,7 @@
<field name="model">account.invoice</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Invoice">
<form string="Invoice" layout="auto">
<group colspan="4" col="8">
<field name="journal_id" groups="base.group_user" on_change="onchange_journal_id(journal_id, context)" widget="selection"/>
<field name="number"/>
@@ -338,7 +340,9 @@
</field>
</page>
</notebook>
<div class="oe_form_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>
+5 -1
View File
@@ -25,7 +25,8 @@
<field name="model">crm.meeting</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Meetings">
<form layout="manual">
<sheet string="Meetings" layout="auto">
<group col="6" colspan="4">
<field name="name" select="1" string="Summary"
required="1" />
@@ -211,7 +212,10 @@
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>
+5 -1
View File
@@ -58,7 +58,8 @@
<field name="model">crm.phonecall</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Phone Call">
<form layout="manual">
<sheet string="Phone Call" layout="auto">
<group colspan="6" col="7">
<field name="name" required="1"/>
<field name="partner_phone"/>
@@ -121,7 +122,10 @@
states="cancel" type="object"
icon="gtk-convert" />
</group>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>
+12 -4
View File
@@ -63,7 +63,8 @@
<field name="type">form</field>
<field name="priority">1</field>
<field name="arch" type="xml">
<form string="Leave Request">
<form layout="manual">
<sheet string="Leave Request" layout="auto">
<group col="8" colspan="4">
<field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}"/>
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" string="Mode" groups="base.group_hr_user"/>
@@ -95,9 +96,12 @@
<button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_user"/>
<button string="Set to Draft" name="set_to_draft" states="refuse,validate" type="object" icon="gtk-convert" groups="base.group_hr_user"/>
</group>
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>
@@ -108,7 +112,8 @@
<field name="model">hr.holidays</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Allocation Request">
<form layout="manual">
<sheet string="Allocation Request" layout="auto">
<group col="8" colspan="4">
<field name="name"/>
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" string="Allocation Mode" groups="base.group_hr_manager"/>
@@ -138,9 +143,12 @@
<button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_user"/>
<button string="Set to Draft" name="set_to_draft" states="cancel,validate,refuse" type="object" icon="gtk-convert" groups="base.group_hr_user"/>
</group>
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>
+4 -4
View File
@@ -12,10 +12,6 @@
<xpath expr="/form/notebook/page[@string='History']" position="attributes">
<attribute name="invisible">False</attribute>
</xpath>
<xpath expr="/form/notebook" position="after">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"
options='{"thread_level": 1}'/>
</xpath>
</field>
</record>
<record id="view_emails_partner_info_form" model="ir.ui.view">
@@ -27,6 +23,10 @@
<page string="History" position="inside">
<field name="emails" colspan="4" nolabel="1"/>
</page>
<xpath expr="/form/notebook" position="after">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"
options='{"thread_level": 1}'/>
</xpath>
</field>
</record>
+3 -1
View File
@@ -68,7 +68,7 @@
<field name="type">form</field>
<field eval="7" name="priority"/>
<field name="arch" type="xml">
<form string="Product">
<form string="Product" layout="auto">
<group colspan="4" col="8">
<group colspan="4" col="2">
<separator string="Name" colspan="2"/>
@@ -190,7 +190,9 @@
</field>
</page>
</notebook>
<div class="oe_form_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>
+3 -4
View File
@@ -1060,7 +1060,6 @@ class task(osv.osv):
elif typeid and typeid in sorted_types and sorted_types.index(typeid) != len(sorted_types)-1:
index = sorted_types.index(typeid)
self.write(cr, uid, task.id, {'type_id': sorted_types[index+1]})
self.state_change_send_note(cr, uid, [task.id], context)
return True
def next_type(self, cr, uid, ids, context=None):
@@ -1103,9 +1102,9 @@ class task(osv.osv):
result = True
else:
result = super(task,self).write(cr, uid, ids, vals, context=context)
if ('type_id' in vals) or ('remaining_hours' in vals) or ('user_id' in vals) or ('kanban_state' in vals):
if ('type_id' in vals) or ('remaining_hours' in vals) or ('user_id' in vals) or ('state' in vals) or ('kanban_state' in vals):
self._store_history(cr, uid, ids, context=context)
self.state_change_send_note(cr, uid, ids, context)
self.stage_change_send_note(cr, uid, ids, context)
return result
def unlink(self, cr, uid, ids, context=None):
@@ -1192,7 +1191,7 @@ class task(osv.osv):
self.message_append_note(cr, uid, [task.id], body=msg, context=context)
return True
def state_change_send_note(self, cr, uid, ids, context=None):
def stage_change_send_note(self, cr, uid, ids, context=None):
for task in self.browse(cr, uid, ids, context=context):
msg = _('Stage changed to <b>%s</b>') % (task.type_id.name)
self.message_append_note(cr, uid, [task.id], body=msg, context=context)
+6 -2
View File
@@ -50,7 +50,8 @@
<field name="model">project.issue</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Issue Tracker Form">
<form layout="manual">
<sheet string="Issue Tracker Form" layout="auto">
<group colspan="4" col="6">
<field name="name"/>
<field name="project_id" required="True" on_change="on_change_project(project_id)"/>
@@ -113,7 +114,10 @@
</group>
</page>
</notebook>
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>
@@ -10,7 +10,7 @@
<field name="project_id" position="attributes">
<attribute name="on_change">on_change_project(project_id)</attribute>
</field>
<xpath expr="/form/notebook" position="before">
<xpath expr="//notebook" position="before">
<field name="analytic_account_id"
domain="[('parent_id','!=',False),('partner_id', '=', partner_id),('type', '!=', 'view')]"
on_change='on_change_account_id(analytic_account_id)'/>