[FIX] lp:1320918 - l10n_fr_siret : fix search args in _get_partner_change

This commit is contained in:
unknown
2014-05-23 13:57:27 +02:00
committed by Yannick Vaucher
2 changed files with 5 additions and 4 deletions

View File

@@ -21,7 +21,7 @@
{
'name': 'French company identity numbers SIRET/SIREN/NIC',
'version': '1.1',
'version': '1.1.1',
"category": 'Accounting',
'description': '''
This module add the French company identity numbers.

View File

@@ -27,17 +27,18 @@ class res_company(orm.Model):
_inherit = 'res.company'
def _get_partner_change(self, cr, uid, ids, context=None):
return self.pool.get('res.partner').search(
return self.pool['res.company'].search(
cr, uid, [('partner_id', 'in', ids)], context=context)
_columns = {
'siret': fields.related(
'partner_id', 'siret', type='char', store={
'partner_id', 'siret', type='char', string='SIRET', store={
'res.partner': (_get_partner_change, ['siren', 'nic'], 20),
'res.company': (lambda self, cr, uid, ids, c={}:
ids, ['partner_id'], 20), }),
'company_registry': fields.related(
'partner_id', 'company_registry', type='char', store={
'partner_id', 'company_registry', type='char',
string='Company Registry', store={
'res.partner': (_get_partner_change, ['company_registry'], 20),
'res.company': (lambda self, cr, uid, ids, c={}:
ids, ['partner_id'], 20), })