[Merge] Merge with trunk server

bzr revid: vir@tinyerp.com-20100527062639-v7yg1jixfwa4yf8k
This commit is contained in:
Vir (Open ERP) 2010-05-27 11:56:39 +05:30
commit 0b75d696bc
12 changed files with 112 additions and 38 deletions

View File

@ -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 <goranc@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-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"

View File

@ -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-05-24 04:24+0000\n"
"PO-Revision-Date: 2010-05-26 04:12+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-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

View File

@ -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 <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-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

View File

@ -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) <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-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

View File

@ -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 <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-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

View File

@ -609,13 +609,21 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Views">
<field name="name" select="1"/>
<field name="type" select="1"/>
<field name="model" select="1"/>
<field name="field_parent"/>
<field name="priority"/>
<field name="inherit_id" select="1"/>
<field colspan="4" name="arch"/>
<group colspan="2" col="2">
<separator string="General" colspan="2"/>
<field name="name" select="1"/>
<field name="type" select="1"/>
<field name="model" select="1"/>
<field name="priority"/>
</group>
<group colspan="2" col="2">
<separator string="Advanced" colspan="2"/>
<field name="field_parent"/>
<field name="inherit_id" select="1"/>
<field name="xml_id" select="1"/>
</group>
<separator string="View architecture" colspan="4"/>
<field colspan="4" nolabel="1" name="arch"/>
</form>
</field>
</record>
@ -628,9 +636,10 @@
<field name="name"/>
<field name="type"/>
<field name="model"/>
<field name="xml_id"/>
<field name="inherit_id"/>
<field name="priority"/>
<field name="field_parent"/>
<field name="priority"/>
</tree>
</field>
</record>
@ -951,6 +960,39 @@
</field>
</record>
<record model="ir.ui.view" id="view_model_data_form">
<field name="name">ir.model.data.form</field>
<field name="model">ir.model.data</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Module data">
<field name="module" select="1" />
<field name="name" select="1" />
<field name="model" select="1" />
<field name="res_id" select="1" />
<field name="noupdate" select="2" />
<field name="date_update" />
<field name="date_init" />
</form>
</field>
</record>
<record id="view_model_data_list" model="ir.ui.view">
<field name="name">ir.model.data.list</field>
<field name="model">ir.model.data</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Module Data">
<field name="module"/>
<field name="name"/>
<field name="model" select="1" />
<field name="res_id"/>
<field name="noupdate"/>
</tree>
</field>
</record>
<record id="action_model_model" model="ir.actions.act_window">
<field name="name">Objects</field>
<field name="res_model">ir.model</field>
@ -970,6 +1012,15 @@
</record>
<menuitem action="action_model_fields" id="ir_model_model_fields" parent="base.next_id_9"/>
<record id="action_model_data" model="ir.actions.act_window">
<field name="name">Module data</field>
<field name="res_model">ir.model.data</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_model_data_list"/>
</record>
<menuitem action="action_model_data" id="ir_model_data_menu" parent="base.next_id_9"
groups="base.group_extended"/>
<!-- Translations -->
<record id="view_translation_search" model="ir.ui.view">

View File

@ -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: '<?xml version="1.0"?>\n<tree string="Unknwown">\n\t<field name="name"/>\n</tree>',
'priority': lambda *a: 16
'arch': '<?xml version="1.0"?>\n<tree string="Unknwown">\n\t<field name="name"/>\n</tree>',
'priority': 16
}
_order = "priority"
_constraints = [

View File

@ -12,8 +12,8 @@
<field name="active" select="2"/>
<field name="bic" select="1"/>
<newline/>
<separator string=" Address" colspan="2" col="4"/>
<separator string=" Communication" colspan="2" col="4"/>
<separator string="Address" colspan="2" col="4"/>
<separator string="Communication" colspan="2" col="4"/>
<group colspan="2" col="4">
<field name="street" select="2"/>
<field name="street2" select="2"/>

View File

@ -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'),

View File

@ -30,7 +30,7 @@
<field name="country_id" />
</group>
<newline/>
<group expand="0" string="Group By...">
<group expand="1" string="Group By...">
<filter string="Partner" icon="terp-crm" domain="[]" context="{'group_by' : 'partner_id'}" />
<filter string="Country" icon="terp-crm" domain="[]" context="{'group_by' : 'country_id'}" />
<filter string="Type" icon="terp-crm" domain="[]" context="{'group_by' : 'type'}" />
@ -339,7 +339,7 @@
</field>
</group>
<newline />
<group expand="0" string="Group By...">
<group expand="1" string="Group By...">
<filter string="Salesman" icon="terp-crm" domain="[]" context="{'group_by' : 'user_id'}" />
</group>
</search>

View File

@ -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):

View File

@ -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: