diff --git a/bin/addons/base/i18n/hr.po b/bin/addons/base/i18n/hr.po index 8b3e5fad0c9..73a51f4ee80 100644 --- a/bin/addons/base/i18n/hr.po +++ b/bin/addons/base/i18n/hr.po @@ -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-05-24 04:22+0000\n" +"PO-Revision-Date: 2010-05-26 04:10+0000\n" "Last-Translator: goranc \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-05-25 03:41+0000\n" +"X-Launchpad-Export-Date: 2010-05-27 03:41+0000\n" "X-Generator: Launchpad (build Unknown)\n" "Language: hr\n" diff --git a/bin/addons/base/i18n/ja.po b/bin/addons/base/i18n/ja.po index d3853f87778..2ba5051cb7b 100644 --- a/bin/addons/base/i18n/ja.po +++ b/bin/addons/base/i18n/ja.po @@ -8,13 +8,13 @@ msgstr "" "Project-Id-Version: openobject-server\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2009-12-18 08:39+0000\n" -"PO-Revision-Date: 2010-05-24 04:24+0000\n" +"PO-Revision-Date: 2010-05-26 04:12+0000\n" "Last-Translator: Harry (Open ERP) \n" "Language-Team: Japanese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-05-25 03:41+0000\n" +"X-Launchpad-Export-Date: 2010-05-27 03:41+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/sv.po b/bin/addons/base/i18n/sv.po index e1817483079..3f45359983c 100644 --- a/bin/addons/base/i18n/sv.po +++ b/bin/addons/base/i18n/sv.po @@ -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-05-24 04:26+0000\n" +"PO-Revision-Date: 2010-05-26 04:13+0000\n" "Last-Translator: Anders Wallenquist \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-05-25 03:41+0000\n" +"X-Launchpad-Export-Date: 2010-05-27 03:41+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/uk.po b/bin/addons/base/i18n/uk.po index 88b6dd86046..cad6a47811e 100644 --- a/bin/addons/base/i18n/uk.po +++ b/bin/addons/base/i18n/uk.po @@ -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-05-24 04:19+0000\n" +"PO-Revision-Date: 2010-05-26 04:09+0000\n" "Last-Translator: Fabien (Open ERP) \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-05-25 03:42+0000\n" +"X-Launchpad-Export-Date: 2010-05-27 03:42+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/zh_CN.po b/bin/addons/base/i18n/zh_CN.po index 0281aebac65..33482c35630 100644 --- a/bin/addons/base/i18n/zh_CN.po +++ b/bin/addons/base/i18n/zh_CN.po @@ -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-05-24 04:27+0000\n" +"PO-Revision-Date: 2010-05-26 04:09+0000\n" "Last-Translator: OpenERP Administrators \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-05-25 03:42+0000\n" +"X-Launchpad-Export-Date: 2010-05-27 03:42+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/ir/ir.xml b/bin/addons/base/ir/ir.xml index 1169798fe8e..9f280ed6564 100644 --- a/bin/addons/base/ir/ir.xml +++ b/bin/addons/base/ir/ir.xml @@ -609,13 +609,21 @@ form
- - - - - - - + + + + + + + + + + + + + + + @@ -628,9 +636,10 @@ + - + @@ -951,6 +960,39 @@ + + + ir.model.data.form + ir.model.data + form + +
+ + + + + + + + + +
+ + + ir.model.data.list + ir.model.data + tree + + + + + + + + + + + Objects ir.model @@ -970,6 +1012,15 @@ + + Module data + ir.model.data + form + + + + diff --git a/bin/addons/base/ir/ir_ui_view.py b/bin/addons/base/ir/ir_ui_view.py index a4b6923c672..f1a50143ef3 100644 --- a/bin/addons/base/ir/ir_ui_view.py +++ b/bin/addons/base/ir/ir_ui_view.py @@ -66,10 +66,12 @@ class view(osv.osv): 'arch': fields.text('View Architecture', required=True), 'inherit_id': fields.many2one('ir.ui.view', 'Inherited View', ondelete='cascade'), 'field_parent': fields.char('Child Field',size=64), + 'xml_id': fields.function(osv.osv.get_xml_id, type='char', size=128, string="XML ID", + method=True), } _defaults = { - 'arch': lambda *a: '\n\n\t\n', - 'priority': lambda *a: 16 + 'arch': '\n\n\t\n', + 'priority': 16 } _order = "priority" _constraints = [ diff --git a/bin/addons/base/res/bank_view.xml b/bin/addons/base/res/bank_view.xml index 554ed1911a0..a60be66a254 100644 --- a/bin/addons/base/res/bank_view.xml +++ b/bin/addons/base/res/bank_view.xml @@ -12,8 +12,8 @@ - - + + diff --git a/bin/addons/base/res/partner/partner.py b/bin/addons/base/res/partner/partner.py index 11eb30eedae..84994ffe9ab 100644 --- a/bin/addons/base/res/partner/partner.py +++ b/bin/addons/base/res/partner/partner.py @@ -124,7 +124,7 @@ class res_partner(osv.osv): 'user_id': fields.many2one('res.users', 'Salesman', help='The internal user that is in charge of communicating with this partner if any.'), 'vat': fields.char('VAT',size=32 ,help="Value Added Tax number. Check the box if the partner is subjected to the VAT. Used by the VAT legal statement."), 'bank_ids': fields.one2many('res.partner.bank', 'partner_id', 'Banks'), - 'website': fields.char('Website',size=64, help="Link website"), + 'website': fields.char('Website',size=64, help="Website of Partner"), 'comment': fields.text('Notes'), 'address': fields.one2many('res.partner.address', 'partner_id', 'Contacts'), 'category_id': fields.many2many('res.partner.category', 'res_partner_category_rel', 'partner_id', 'category_id', 'Categories'), diff --git a/bin/addons/base/res/partner/partner_view.xml b/bin/addons/base/res/partner/partner_view.xml index b76a2f59d34..415c15e0455 100644 --- a/bin/addons/base/res/partner/partner_view.xml +++ b/bin/addons/base/res/partner/partner_view.xml @@ -30,7 +30,7 @@ - + @@ -339,7 +339,7 @@ - + diff --git a/bin/addons/base/res/res_user.py b/bin/addons/base/res/res_user.py index d5b5606209b..70045acabfc 100644 --- a/bin/addons/base/res/res_user.py +++ b/bin/addons/base/res/res_user.py @@ -200,7 +200,7 @@ class users(osv.osv): return dict(zip(ids, ['extended' if user in extended_users else 'simple' for user in ids])) def _email_get(self, cr, uid, ids, name, arg, context=None): - return dict(map(operator.attrgetter('id', 'address_id.email'), self.browse(cr, uid, ids, context=context))) + return dict([(user.id, user.address_id.email) for user in self.browse(cr, uid, ids, context=context)]) def _email_set(self, cr, uid, ids, name, value, arg, context=None): if not isinstance(ids,list): diff --git a/bin/osv/orm.py b/bin/osv/orm.py index e3514df8ae0..cfbf126a69b 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -416,7 +416,7 @@ class orm_template(object): pass def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): - raise _('The read_group method is not implemented on this object !') + raise NotImplementedError(_('The read_group method is not implemented on this object !')) def _field_create(self, cr, context={}): cr.execute("SELECT id FROM ir_model WHERE model=%s", (self._name,)) @@ -1027,7 +1027,7 @@ class orm_template(object): return (done, 0, 0, 0) def read(self, cr, user, ids, fields=None, context=None, load='_classic_read'): - raise _('The read method is not implemented on this object !') + raise NotImplementedError(_('The read method is not implemented on this object !')) def get_invalid_fields(self,cr,uid): return list(self._invalids) @@ -1070,16 +1070,16 @@ class orm_template(object): return {} def perm_read(self, cr, user, ids, context=None, details=True): - raise _('The perm_read method is not implemented on this object !') + raise NotImplementedError(_('The perm_read method is not implemented on this object !')) def unlink(self, cr, uid, ids, context=None): - raise _('The unlink method is not implemented on this object !') + raise NotImplementedError(_('The unlink method is not implemented on this object !')) def write(self, cr, user, ids, vals, context=None): - raise _('The write method is not implemented on this object !') + raise NotImplementedError(_('The write method is not implemented on this object !')) def create(self, cr, user, vals, context=None): - raise _('The create method is not implemented on this object !') + raise NotImplementedError(_('The create method is not implemented on this object !')) # returns the definition of each field in the object # the optional fields parameter can limit the result to some fields @@ -1685,19 +1685,19 @@ class orm_template(object): def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): - raise _('The search method is not implemented on this object !') + raise NotImplementedError(_('The search method is not implemented on this object !')) def name_get(self, cr, user, ids, context=None): - raise _('The name_get method is not implemented on this object !') + raise NotImplementedError(_('The name_get method is not implemented on this object !')) def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100): - raise _('The name_search method is not implemented on this object !') + raise NotImplementedError(_('The name_search method is not implemented on this object !')) def copy(self, cr, uid, id, default=None, context=None): - raise _('The copy method is not implemented on this object !') + raise NotImplementedError(_('The copy method is not implemented on this object !')) def exists(self, cr, uid, id, context=None): - raise _('The exists method is not implemented on this object !') + raise NotImplementedError(_('The exists method is not implemented on this object !')) def read_string(self, cr, uid, id, langs, fields=None, context=None): res = {} @@ -3623,7 +3623,7 @@ class orm(orm_template): # TODO: Validate # def perm_write(self, cr, user, ids, fields, context=None): - raise _('This method does not exist anymore') + raise NotImplementedError(_('This method does not exist anymore')) # TODO: ameliorer avec NULL def _where_calc(self, cr, user, args, active_test=True, context=None): @@ -3923,5 +3923,26 @@ class orm(orm_template): return False return True + def get_xml_id(self, cr, uid, ids, *args, **kwargs): + """Find out the XML ID of any database record, if there + is one. This method works as a possible implementation + for a function field, to be able to add it to any + model object easily, referencing it as 'osv.osv.get_xml_id'. + + get_xml_id(cr, uid, ids) -> { 'id': 'module.xml_id' } + + :return: the fully qualified XML ID of the given object, + defaulting to an empty string when there's none. + """ + result = dict.fromkeys(ids, '') + model_data_obj = self.pool.get('ir.model.data') + data_ids = model_data_obj.search(cr,uid, + [('model','=',self._name),('res_id','in',ids)]) + data_results = model_data_obj.read(cr,uid,data_ids, + ['name','module','res_id']) + for record in data_results: + result[record['res_id']] = '%(module)s.%(name)s' % record + return result + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: