copy product needs to add "(copy)" to the product name/variant
Bug #410164 reported by
Ferdinand
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
the copy process should add "(copy)" to the product name ot variant name
the message "working now on the duplicate document" is only temporary
it the user does not alter the name immediately and closes the tab it's difficult to find out which one is the copy
Related branches
Changed in openobject-addons: | |
status: | Fix Released → Incomplete |
To post a comment you must log in.
=== modified file 'product/ product. py'
context= {}
--- product/product.py 2009-08-07 07:26:47 +0000
+++ product/product.py 2009-08-07 11:31:40 +0000
@@ -633,6 +633,11 @@
def copy(self, cr, uid, id, default=None, context=None):
if not context:
+ product = self.browse(cr, uid, id, context=context)
+ if not default:
+ default = {}
+ default = default.copy()
+ default['name'] = (product['name'] or '') + ' (copy)'
if ('variant' in context) and context['variant']:
fields = ['product_tmpl_id', 'active', 'variants', 'default_code',