@@ -81,6 +81,8 @@
|
||||
<field name="company_id" widget="selection" readonly="0"
|
||||
context="{'user_id': self, 'user_preference': 1}"/>
|
||||
<field name="view" readonly="0"/>
|
||||
<label string="" colspan="2"/>
|
||||
<field name="menu_tips" colspan="2"/>
|
||||
<newline/>
|
||||
<separator colspan="4" string="Preferences"/>
|
||||
</page>
|
||||
@@ -119,7 +121,9 @@
|
||||
<field domain="[('usage','=','menu')]" name="menu_id" required="True"/>
|
||||
<field name="context_lang"/>
|
||||
<field name="context_tz"/>
|
||||
<field name="view" readonly="0" />
|
||||
<field name="view" readonly="0"/>
|
||||
<field name="menu_tips" colspan="2"/>
|
||||
<label string="" colspan="2"/>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Signature" colspan="2"/>
|
||||
<field colspan="2" name="signature" nolabel="1"/>
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2010-08-24 04:52+0000\n"
|
||||
"Last-Translator: Ferdinand @ ChriCar <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-08-25 05:51+0000\n"
|
||||
"Last-Translator: Ferdinand-chricar <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-25 03:51+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-26 03:53+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2010-08-24 05:46+0000\n"
|
||||
"PO-Revision-Date: 2010-08-25 06:11+0000\n"
|
||||
"Last-Translator: Goran Kliska <gkliska@gmail.com>\n"
|
||||
"Language-Team: openerp-translators\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-25 03:51+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-26 03:53+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"Language: hr\n"
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2010-08-24 05:43+0000\n"
|
||||
"PO-Revision-Date: 2010-08-25 06:04+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-25 03:51+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-26 03:53+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
|
||||
@@ -8,13 +8,13 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-server\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2010-08-24 05:38+0000\n"
|
||||
"PO-Revision-Date: 2010-08-25 05:58+0000\n"
|
||||
"Last-Translator: Harry (Open ERP) <hmo@tinyerp.com>\n"
|
||||
"Language-Team: Japanese <ja@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-25 03:51+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-26 03:53+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: pt_BR\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2010-08-24 05:48+0000\n"
|
||||
"PO-Revision-Date: 2010-08-25 06:15+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"Language-Team: <pt@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-25 03:52+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-26 03:53+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2010-08-24 05:34+0000\n"
|
||||
"PO-Revision-Date: 2010-08-25 05:46+0000\n"
|
||||
"Last-Translator: Anders Wallenquist <anders.wallenquist@vertel.se>\n"
|
||||
"Language-Team: <>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-25 03:51+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-26 03:53+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2010-08-24 05:41+0000\n"
|
||||
"PO-Revision-Date: 2010-08-25 06:01+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-25 03:51+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-26 03:53+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2010-08-24 05:44+0000\n"
|
||||
"PO-Revision-Date: 2010-08-25 06:08+0000\n"
|
||||
"Last-Translator: Eleanor Chen <chenyueg@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-25 03:52+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-26 03:53+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
|
||||
@@ -210,12 +210,14 @@ class act_window(osv.osv):
|
||||
return res
|
||||
|
||||
def _get_help_status(self, cr, uid, ids, name, arg, context={}):
|
||||
cr.execute(""" SELECT action.id,
|
||||
CASE WHEN r.uid IS NULL THEN True ELSE False END
|
||||
AS help_status FROM ir_act_window action
|
||||
LEFT JOIN ir_act_window_user_rel r ON
|
||||
(action.id = r.act_id AND (r.uid IS NULL or r.uid= %s)) WHERE action.id = ANY(%s)""",(uid,ids,))
|
||||
return dict(cr.fetchall())
|
||||
activate_tips = self.pool.get('res.users').browse(cr, uid, uid).menu_tips
|
||||
if activate_tips:
|
||||
cr.execute(""" SELECT action.id,
|
||||
CASE WHEN r.uid IS NULL THEN True ELSE False END
|
||||
AS help_status FROM ir_act_window action
|
||||
LEFT JOIN ir_act_window_user_rel r ON
|
||||
(action.id = r.act_id AND (r.uid IS NULL or r.uid= %s)) WHERE action.id = ANY(%s)""",(uid,ids,))
|
||||
return dict(cr.fetchall())
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Action Name', size=64, translate=True),
|
||||
|
||||
@@ -260,6 +260,8 @@ class users(osv.osv):
|
||||
selection=[('simple','Simplified'),('extended','Extended')],
|
||||
string='Interface', help="Choose between the simplified interface and the extended one"),
|
||||
'user_email': fields.function(_email_get, method=True, fnct_inv=_email_set, string='Email', type="char", size=240),
|
||||
'menu_tips': fields.boolean('Menu Tips', help="Check out this box if you want to display tips on each menu action"),
|
||||
|
||||
}
|
||||
|
||||
def read(self,cr, uid, ids, fields=None, context=None, load='_classic_read'):
|
||||
@@ -349,6 +351,7 @@ class users(osv.osv):
|
||||
'company_ids': _get_companies,
|
||||
'groups_id': _get_group,
|
||||
'address_id': False,
|
||||
'menu_tips':True
|
||||
}
|
||||
|
||||
@tools.cache()
|
||||
@@ -356,7 +359,7 @@ class users(osv.osv):
|
||||
return self._get_company(cr, uid, context=context, uid2=uid2)
|
||||
|
||||
# User can write to a few of her own fields (but not her groups for example)
|
||||
SELF_WRITEABLE_FIELDS = ['view', 'password', 'signature', 'action_id', 'company_id', 'user_email']
|
||||
SELF_WRITEABLE_FIELDS = ['menu_tips','view', 'password', 'signature', 'action_id', 'company_id', 'user_email']
|
||||
|
||||
def write(self, cr, uid, ids, values, context=None):
|
||||
if not hasattr(ids, '__iter__'):
|
||||
|
||||
@@ -153,11 +153,9 @@
|
||||
<rng:choice>
|
||||
<rng:ref name="field"/>
|
||||
<rng:ref name="group"/>
|
||||
<rng:ref name="label" />
|
||||
<rng:ref name="separator"/>
|
||||
<rng:ref name="filter"/>
|
||||
<rng:ref name="search"/>
|
||||
<rng:ref name="html"/>
|
||||
<rng:element name="newline"><rng:empty/></rng:element>
|
||||
<rng:element name="properties"><rng:empty/></rng:element>
|
||||
</rng:choice>
|
||||
|
||||
@@ -71,7 +71,7 @@ class expression(object):
|
||||
raise ValueError('Bad domain expression: %r' % (exp,))
|
||||
self.__exp = exp
|
||||
self.__field_tables = {} # used to store the table to use for the sql generation. key = index of the leaf
|
||||
self.__all_tables = set()
|
||||
self.__all_tables = []
|
||||
self.__joins = []
|
||||
self.__main_table = None # 'root' table. set by parse()
|
||||
self.__DUMMY_LEAF = (1, '=', 1) # a dummy leaf that must not be parsed or sql generated
|
||||
@@ -106,7 +106,7 @@ class expression(object):
|
||||
return [(left, 'in', rg(ids, table, parent or table._parent_name))]
|
||||
|
||||
self.__main_table = table
|
||||
self.__all_tables.add(table)
|
||||
self.__all_tables.append(table)
|
||||
|
||||
i = -1
|
||||
while i + 1<len(self.__exp):
|
||||
@@ -129,7 +129,7 @@ class expression(object):
|
||||
working_table = main_table.pool.get(main_table._inherit_fields[fargs[0]][0])
|
||||
if working_table not in self.__all_tables:
|
||||
self.__joins.append('%s.%s=%s.%s' % (working_table._table, 'id', main_table._table, main_table._inherits[working_table._name]))
|
||||
self.__all_tables.add(working_table)
|
||||
self.__all_tables.append(working_table)
|
||||
main_table = working_table
|
||||
|
||||
field = working_table._columns.get(fargs[0], False)
|
||||
|
||||
+10
-10
@@ -218,8 +218,6 @@ class browse_record(object):
|
||||
raise KeyError('Field %s not found in %s'%(name,self))
|
||||
# create browse records for 'remote' objects
|
||||
for result_line in field_values:
|
||||
if len(str(result_line['id']).split('-')) > 1:
|
||||
result_line['id'] = int(str(result_line['id']).split('-')[0])
|
||||
new_data = {}
|
||||
for field_name, field_column in fields_to_fetch:
|
||||
if field_column._type in ('many2one', 'one2one'):
|
||||
@@ -1923,12 +1921,12 @@ class orm_memory(orm_template):
|
||||
self.vaccum(cr, user)
|
||||
self.next_id += 1
|
||||
id_new = self.next_id
|
||||
default = []
|
||||
for f in self._columns.keys():
|
||||
if not f in vals:
|
||||
default.append(f)
|
||||
if len(default):
|
||||
vals.update(self.default_get(cr, user, default, context))
|
||||
|
||||
# override defaults with the provided values, never allow the other way around
|
||||
defaults = self.default_get(cr, user, [], context)
|
||||
defaults.update(vals)
|
||||
vals = defaults
|
||||
|
||||
vals2 = {}
|
||||
upd_todo = []
|
||||
for field in vals:
|
||||
@@ -3396,7 +3394,9 @@ class orm(orm_template):
|
||||
if default_values[dv] and isinstance(default_values[dv][0], (int, long)):
|
||||
default_values[dv] = [(6, 0, default_values[dv])]
|
||||
|
||||
vals.update(default_values)
|
||||
# override defaults with the provided values, never allow the other way around
|
||||
default_values.update(vals)
|
||||
vals = default_values
|
||||
|
||||
tocreate = {}
|
||||
for v in self._inherits:
|
||||
@@ -3827,7 +3827,7 @@ class orm(orm_template):
|
||||
# Allowing inherits'ed field for server side sorting
|
||||
inherited_tables, inherit_join = self._inherits_join_calc(o, tables, where_clause)
|
||||
if inherited_tables:
|
||||
inherited_sort_table = inherited_tables[0]
|
||||
inherited_sort_table = inherited_tables[-1]
|
||||
order_by = inherited_sort_table + '.' + order
|
||||
|
||||
limit_str = limit and ' limit %d' % limit or ''
|
||||
|
||||
Reference in New Issue
Block a user