[IMP] purchase : Override the copy method.

bzr revid: mdi@tinyerp.com-20120803053337-fvh5bzgztl815eh6
This commit is contained in:
Divyesh Makwana (Open ERP) 2012-08-03 11:03:37 +05:30
parent 3fa76729b0
commit 176ef8c1ce
1 changed files with 10 additions and 2 deletions

View File

@ -31,6 +31,14 @@ class res_partner(osv.osv):
res[partner.id] = len(partner.purchase_order_ids)
return res
def copy(self, cr, uid, id, default=None, context=None):
if default is None:
default = {}
default.update({'purchase_order_ids': []})
super(res_partner, self).copy(cr, uid, id, default=default, context=context)
_columns = {
'property_product_pricelist_purchase': fields.property(
'product.pricelist',