[MERGE] lp:openobject-server

bzr revid: jam@tinyerp.com-20120718083632-kp8e9jy0mtckodbe
This commit is contained in:
Jigar Amin - OpenERP 2012-07-18 14:06:32 +05:30
commit 4388b11739
4 changed files with 27 additions and 47 deletions

View File

@ -210,10 +210,6 @@ class act_window(osv.osv):
res[act.id] = str(field_get)
return res
def _get_help_status(self, cr, uid, ids, name, arg, context=None):
activate_tips = self.pool.get('res.users').browse(cr, uid, uid).menu_tips
return dict([(id, activate_tips) for id in ids])
_columns = {
'name': fields.char('Action Name', size=64, translate=True),
'type': fields.char('Action Type', size=32, required=True),
@ -251,8 +247,6 @@ class act_window(osv.osv):
'help': fields.text('Action description',
help='Optional help text for the users with a description of the target view, such as its usage and purpose.',
translate=True),
'display_menu_tip':fields.function(_get_help_status, type='boolean', string='Display Menu Tips',
help='It gives the status if the tip has to be displayed or not when a user executes an action'),
'multi': fields.boolean('Action on Multiple Doc.', help="If set to true, the action will not be displayed on the right toolbar of a form view"),
}

View File

@ -94,32 +94,20 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Register a Contract" version="7.0">
<header>
<button name="action_validate" string="Register" type="object" states="draft" class="oe_highlight" />
<label string="or" states="draft"/>
<button string="Cancel" class="oe_link" special="cancel" />
</header>
<group colspan="4" col="8">
<group colspan="1">
<field name="config_logo" widget="image" width="220" height="130" nolabel="1" colspan="1"/>
<newline/>
<label colspan="4" width="220" string="This wizard helps you register a publisher warranty contract in your OpenERP system. After the contract has been registered, you will be able to send issues directly to OpenERP."/>
<label colspan="4" width="220"/>
<label colspan="4" width="220" string=""/>
<field name="state" invisible="1"/>
</group>
<separator orientation="vertical" rowspan="12" colspan="1"/>
<group colspan="6">
<separator string="Register a Contract" colspan="4"/>
<group states="draft" colspan="4">
<label string="Please enter the serial key provided in your contract document:" colspan="4"/>
<field name="name" colspan="4"/>
</group>
<group states="finished" colspan="4">
<label string="Publisher warranty contract successfully registered!" colspan="4"/>
</group>
</group>
<field name="state" invisible="1"/>
<separator string="Register a Contract"/>
<group states="draft">
<label string="Please enter the serial key provided in your contract document:" colspan="2"/>
<field name="name"/>
</group>
<group states="finished">
<label string="Publisher warranty contract successfully registered!" colspan="4"/>
</group>
<footer>
<button name="action_validate" string="Register" type="object" states="draft" class="oe_highlight"/>
<label string="or" states="draft"/>
<button string="Cancel" class="oe_link" special="cancel"/>
</footer>
</form>
</field>
</record>

View File

@ -231,7 +231,6 @@ class users(osv.osv):
help="The user's timezone, used to output proper date and time values inside printed reports. "
"It is important to set a value for this field. You should use the same timezone "
"that is otherwise used to pick and render date and time values: your computer's timezone."),
'menu_tips': fields.boolean('Menu Tips', help="Check out this box if you want to always display tips on each menu action"),
'date': fields.datetime('Latest Connection', readonly=True),
}
@ -336,11 +335,10 @@ class users(osv.osv):
'company_id': _get_company,
'company_ids': _get_companies,
'groups_id': _get_group,
'menu_tips': False
}
# User can write to a few of her own fields (but not her groups for example)
SELF_WRITEABLE_FIELDS = ['menu_tips','password', 'signature', 'action_id', 'company_id', 'user_email', 'name', 'avatar', 'avatar_big']
SELF_WRITEABLE_FIELDS = ['password', 'signature', 'action_id', 'company_id', 'user_email', 'name', 'avatar', 'avatar_big']
def write(self, cr, uid, ids, values, context=None):
if not hasattr(ids, '__iter__'):

View File

@ -85,14 +85,15 @@
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
<label for="login" class="oe_edit_only"/>
<h2><field name="login"/></h2>
</div>
<group>
<group>
<field name="login"/>
<field name="new_password" password="True" attrs="{'required': [('id','=',False)]}"/>
<field name="company_id" context="{'user_preference': 0}"/>
</group>
<group>
<field name="company_id" context="{'user_preference': 0}"/>
<field name="active"/>
</group>
</group>
@ -103,7 +104,6 @@
<group name="preferences">
<field name="context_lang"/>
<field name="context_tz"/>
<field name="menu_tips"/>
</group>
<group groups="base.group_no_one">
<field name="action_id"/>
@ -191,18 +191,18 @@
<field eval="18" name="priority"/>
<field name="arch" type="xml">
<form string="Users" version="7.0">
<sheet>
<field name="avatar" widget='image' on_change="onchange_avatar(avatar)" class="oe_avatar oe_left"/>
<div class="oe_title">
<h1>
<field name="name" readonly="1"/>
</h1>
<h2>
<field name="login" readonly="1"/>
</h2>
<sheet>
<div class="oe_right oe_avatar">
<field name="avatar" widget='image' on_change="onchange_avatar(avatar)"/>
</div>
<group col="4" name="preferences" string="Preferences">
<h1>
<field name="name" readonly="1" class="oe_inline"/>
(<field name="login" readonly="1" class="oe_inline"/>)
</h1>
<group col="4">
<field name="context_lang" readonly="0"/>
<field name="company_id" readonly="0"
groups="base.group_multi_company" on_change="on_change_company_id(company_id)"/>
<field name="context_tz" readonly="0"/>
<field name="company_id" widget="selection" readonly="0"
groups="base.group_multi_company" on_change="on_change_company_id(company_id)"/>