[MERGE] Thibault Francois 2010-11-23 [ADD] packaging script for thunderbird
bzr revid: jam@tinyerp.com-20101123112940-t5ky14hikr84eaq4
This commit is contained in:
commit
db35d5fabf
|
@ -198,6 +198,8 @@ class audittrail_objects_proxy(osv_pool):
|
||||||
"""
|
"""
|
||||||
if not context:
|
if not context:
|
||||||
context = {}
|
context = {}
|
||||||
|
if field_name in('__last_update','id'):
|
||||||
|
return values
|
||||||
pool = pooler.get_pool(cr.dbname)
|
pool = pooler.get_pool(cr.dbname)
|
||||||
field_pool = pool.get('ir.model.fields')
|
field_pool = pool.get('ir.model.fields')
|
||||||
model_pool = pool.get('ir.model')
|
model_pool = pool.get('ir.model')
|
||||||
|
@ -248,6 +250,8 @@ class audittrail_objects_proxy(osv_pool):
|
||||||
log_line_pool = pool.get('audittrail.log.line')
|
log_line_pool = pool.get('audittrail.log.line')
|
||||||
#start Loop
|
#start Loop
|
||||||
for line in lines:
|
for line in lines:
|
||||||
|
if line['name'] in('__last_update','id'):
|
||||||
|
continue
|
||||||
if obj_pool._inherits:
|
if obj_pool._inherits:
|
||||||
inherits_ids = model_pool.search(cr, uid, [('model', '=', obj_pool._inherits.keys()[0])])
|
inherits_ids = model_pool.search(cr, uid, [('model', '=', obj_pool._inherits.keys()[0])])
|
||||||
field_ids = field_pool.search(cr, uid, [('name', '=', line['name']), ('model_id', 'in', (model.id, inherits_ids[0]))])
|
field_ids = field_pool.search(cr, uid, [('name', '=', line['name']), ('model_id', 'in', (model.id, inherits_ids[0]))])
|
||||||
|
@ -279,6 +283,7 @@ class audittrail_objects_proxy(osv_pool):
|
||||||
"field_description": field['field_description']
|
"field_description": field['field_description']
|
||||||
}
|
}
|
||||||
line_id = log_line_pool.create(cr, uid, vals)
|
line_id = log_line_pool.create(cr, uid, vals)
|
||||||
|
cr.commit()
|
||||||
#End Loop
|
#End Loop
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -361,7 +366,7 @@ class audittrail_objects_proxy(osv_pool):
|
||||||
lines.append(line)
|
lines.append(line)
|
||||||
|
|
||||||
self.create_log_line(cr, uid, log_id, model, lines)
|
self.create_log_line(cr, uid, log_id, model, lines)
|
||||||
|
cr.commit()
|
||||||
cr.close()
|
cr.close()
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
<field name="action_id" colspan="4" readonly="1" groups="base.group_extended"/>
|
<field name="action_id" colspan="4" readonly="1" groups="base.group_extended"/>
|
||||||
<field name="state" select="1" readonly="1" />
|
<field name="state" select="1" readonly="1" />
|
||||||
<group colspan="2" col="2">
|
<group colspan="2" col="2">
|
||||||
<button string="Subscribe" name="subscribe"
|
<button string="_Subscribe" name="subscribe" icon="gtk-ok"
|
||||||
type="object" states="draft" />
|
type="object" states="draft" />
|
||||||
<button string="UnSubscribe" name="unsubscribe"
|
<button string="UnSubscribe" name="unsubscribe" icon="gtk-cancel"
|
||||||
type="object" states="subscribed" />
|
type="object" states="subscribed" />
|
||||||
</group>
|
</group>
|
||||||
</form>
|
</form>
|
||||||
|
@ -40,18 +40,36 @@
|
||||||
<tree colors="blue:state in ('draft');black:state in ('subscribed')" string="AuditTrail Rules">
|
<tree colors="blue:state in ('draft');black:state in ('subscribed')" string="AuditTrail Rules">
|
||||||
<field name="name" />
|
<field name="name" />
|
||||||
<field name="object_id"/>
|
<field name="object_id"/>
|
||||||
<field name="user_id" />
|
|
||||||
<field name="log_read" />
|
<field name="log_read" />
|
||||||
<field name="log_write" />
|
<field name="log_write" />
|
||||||
<field name="log_unlink" />
|
<field name="log_unlink" />
|
||||||
<field name="log_create" />
|
<field name="log_create" />
|
||||||
<field name="log_action"/>
|
<field name="log_action"/>
|
||||||
<field name="log_workflow"/>
|
<field name="log_workflow"/>
|
||||||
<field name="state" />
|
<field name="state" />
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
<record id="view_audittrail_rule_search" model="ir.ui.view">
|
||||||
|
<field name="name">audittrail.rule.search</field>
|
||||||
|
<field name="model">audittrail.rule</field>
|
||||||
|
<field name="type">search</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<search string="Search Audittrail Rule">
|
||||||
|
<group col="8" colspan="4">
|
||||||
|
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Rule"/>
|
||||||
|
<filter icon="terp-camera_test" string="Subscribed" domain="[('state','=','subscribed')]" help="Subscribed Rule"/>
|
||||||
|
<separator orientation="vertical"/>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="object_id"/>
|
||||||
|
</group>
|
||||||
|
<newline/>
|
||||||
|
<group expand="0" string="Group By..." colspan="4" col="10" groups="base.group_extended">
|
||||||
|
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||||
|
</group>
|
||||||
|
</search>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
<!-- Action for audittrail rule -->
|
<!-- Action for audittrail rule -->
|
||||||
|
|
||||||
<record model="ir.actions.act_window" id="action_audittrail_rule_tree">
|
<record model="ir.actions.act_window" id="action_audittrail_rule_tree">
|
||||||
|
@ -60,22 +78,12 @@
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<!--<field name="view_id" ref="view_audittrail_rule_form" />-->
|
<field name="context">{'search_default_draft': 1}</field>
|
||||||
|
<field name="search_view_id" ref="view_audittrail_rule_search"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<menuitem name="Rules" id="menu_action_audittrail_rule_tree"
|
<menuitem name="Rules" id="menu_action_audittrail_rule_tree"
|
||||||
action="action_audittrail_rule_tree" parent="base.menu_audit" />
|
action="action_audittrail_rule_tree" parent="base.menu_audit" />
|
||||||
|
|
||||||
|
|
||||||
<record model="ir.actions.act_window" id="action_audittrail_rule_tree_sub">
|
|
||||||
<field name="name">Subscribed Rules</field>
|
|
||||||
<field name="res_model">audittrail.rule</field>
|
|
||||||
<field name="view_type">form</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
<field name="domain">[('state','=','subscribed')]</field>
|
|
||||||
<field name="filter" eval="True"/>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- AuditTrail Log form -->
|
<!-- AuditTrail Log form -->
|
||||||
|
|
||||||
<record model="ir.ui.view" id="view_audittrail_log_form">
|
<record model="ir.ui.view" id="view_audittrail_log_form">
|
||||||
|
@ -119,7 +127,6 @@
|
||||||
<field name="new_value_text" nolabel="1"
|
<field name="new_value_text" nolabel="1"
|
||||||
colspan="2" readonly="1" />
|
colspan="2" readonly="1" />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<tree string="Log Lines">
|
<tree string="Log Lines">
|
||||||
<field name="field_description" />
|
<field name="field_description" />
|
||||||
<field name="old_value_text" />
|
<field name="old_value_text" />
|
||||||
|
@ -144,13 +151,35 @@
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record id="view_audittrail_log_search" model="ir.ui.view">
|
||||||
|
<field name="name">audittrail.log.search</field>
|
||||||
|
<field name="model">audittrail.log</field>
|
||||||
|
<field name="type">search</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<search string="Search Audittrail Log">
|
||||||
|
<group col="8" colspan="4">
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="object_id"/>
|
||||||
|
<field name="user_id" widget="selection"/>
|
||||||
|
</group>
|
||||||
|
<newline/>
|
||||||
|
<group expand="0" string="Group By..." colspan="4" col="10" groups="base.group_extended">
|
||||||
|
<filter string="User" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||||
|
<separator orientation="vertical"/>
|
||||||
|
<filter string="Object" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'object_id'}"/>
|
||||||
|
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'timestamp'}"/>
|
||||||
|
</group>
|
||||||
|
</search>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
<!-- Action for Audittrail Log -->
|
<!-- Action for Audittrail Log -->
|
||||||
|
|
||||||
<record model="ir.actions.act_window" id="action_audittrail_log_tree">
|
<record model="ir.actions.act_window" id="action_audittrail_log_tree">
|
||||||
<field name="name">Audit Logs</field>
|
<field name="name">Audit Logs</field>
|
||||||
<field name="res_model">audittrail.log</field>
|
<field name="res_model">audittrail.log</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
|
<field name="search_view_id" ref="view_audittrail_log_search"/>
|
||||||
</record>
|
</record>
|
||||||
<menuitem name="Audit Logs" id="menu_action_audittrail_log_tree"
|
<menuitem name="Audit Logs" id="menu_action_audittrail_log_tree"
|
||||||
action="action_audittrail_log_tree" parent="base.menu_audit" />
|
action="action_audittrail_log_tree" parent="base.menu_audit" />
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
rm chrome/openerp_plugin.jar
|
||||||
|
rm ../openerp_plugin.xpi
|
||||||
|
cd chrome/openerp_plugin/
|
||||||
|
jar cvf openerp_plugin.jar *
|
||||||
|
cd ..
|
||||||
|
mv openerp_plugin/openerp_plugin.jar openerp_plugin.jar
|
||||||
|
cd ..
|
||||||
|
zip -r ../openerp_plugin.xpi *
|
||||||
|
|
Loading…
Reference in New Issue