Priyesh (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-opw-18473-pso into 
lp:openobject-addons/6.0.

Requested reviews:
  Vo Minh Thu (OpenERP) (vmt-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-18473-pso/+merge/81684

Hello,

I have created Copy function for Partner to stop the duplication of Company 
related that Partner.

To reproduce:
Duplicate the partner, associated to the company. It will also Duplicate 
company, too.

Kindly share your views.

Thanks,
Priyesh
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-18473-pso/+merge/81684
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-18473-pso.
=== modified file 'account/partner.py'
--- account/partner.py	2011-01-14 00:11:01 +0000
+++ account/partner.py	2011-11-09 07:19:31 +0000
@@ -187,6 +187,15 @@
         'last_reconciliation_date': fields.datetime('Latest Reconciliation Date', help='Date on which the partner accounting entries were reconciled last time')
     }
 
+    def copy(self, cr, uid, id, default=None, context=None):
+        if default is None:
+            default = {}
+        if context is None:
+            context = {}
+        default = default.copy()
+        default['ref_companies'] = []
+        return super(res_partner, self).copy(cr, uid, id, default, context=context)
+
 res_partner()
 
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to