mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] lp:1320918 - l10n_fr_siret : fix search args in _get_partner_change
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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), })
|
||||
|
||||
Reference in New Issue
Block a user