← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~camptocamp/account-financial-tools/7.0-fix-l10n_fr_siret-fix-lp1320918-rde into lp:account-financial-tools

 

Romain Deheele - Camptocamp has proposed merging lp:~camptocamp/account-financial-tools/7.0-fix-l10n_fr_siret-fix-lp1320918-rde into lp:account-financial-tools.

Requested reviews:
  Account Core Editors (account-core-editors)
Related bugs:
  Bug #1320918 in Account - Financial Tools: "Error when you edit Siret or Company Registry on partner attached to the company"
  https://bugs.launchpad.net/account-financial-tools/+bug/1320918

For more details, see:
https://code.launchpad.net/~camptocamp/account-financial-tools/7.0-fix-l10n_fr_siret-fix-lp1320918-rde/+merge/220090

Hello,

It fixes https://bugs.launchpad.net/account-financial-tools/+bug/1320918
Search args weren't corrects.
I've taken advantage to set a string label on the two related fields on company : siret and company registry.

Regards,

Romain
-- 
https://code.launchpad.net/~camptocamp/account-financial-tools/7.0-fix-l10n_fr_siret-fix-lp1320918-rde/+merge/220090
Your team OpenERP Community Reviewer/Maintainer is subscribed to branch lp:account-financial-tools.
=== modified file 'l10n_fr_siret/company.py'
--- l10n_fr_siret/company.py	2014-03-27 09:59:12 +0000
+++ l10n_fr_siret/company.py	2014-05-19 15:33:32 +0000
@@ -28,16 +28,17 @@
 
     def _get_partner_change(self, cr, uid, ids, context=None):
         return self.pool.get('res.partner').search(
-            cr, uid, [('partner_id', 'in', ids)], context=context)
+            cr, uid, [('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), })


Follow ups