[ADD]Base_setup:Add New Config Wiz - Upload Your Company Logo
bzr revid: aag@tinyerp.co.in-20110506084025-waa03u3s0hwabz4p
This commit is contained in:
parent
f710164aff
commit
578668cd97
|
@ -258,6 +258,14 @@
|
|||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- register Upload Logo configuration wizard -->
|
||||
|
||||
<record id="config_wizard_action_res_company_logo" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_res_company_logo"/>
|
||||
<field name="type">normal</field>
|
||||
<field name="state">cancel</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -37,10 +37,11 @@ class res_company_logo(osv.osv_memory):
|
|||
def execute(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
record_id = context.get('active_id', False) or False
|
||||
user_comp_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id
|
||||
comp_obj = self.pool.get("res.company")
|
||||
get_val = self.browse(cr, uid, ids)[0]
|
||||
comp_obj.write(cr, uid, record_id, {'logo': get_val.logo}, context=context)
|
||||
if user_comp_id :
|
||||
comp_obj.write(cr, uid, user_comp_id, {'logo': get_val.logo}, context=context)
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
res_company_logo()
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<field name="model">res.company.logo</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Upload Logo">
|
||||
<form string="Upload Your Company Logo">
|
||||
<separator string="Upload your company logo in JPG or PNG with a format similar to 450*150 pixels" colspan="4"/>
|
||||
<field colspan="4" height="150" name="logo" widget="image" nolabel="1"/>
|
||||
<separator colspan="4"/>
|
||||
|
@ -21,7 +21,7 @@
|
|||
</record>
|
||||
|
||||
<record id="action_res_company_logo" model="ir.actions.act_window">
|
||||
<field name="name">Set Logo</field>
|
||||
<field name="name">Upload Your Company Logo</field>
|
||||
<field name="res_model">res.company.logo</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
|
Loading…
Reference in New Issue