[8.0] product_do_merge: Code lines need to be review.
Created by: zaoral
Review product_do_merge module. Had some lines that need to be reviewed.
def merge_cb(self, cr, uid, ids, context=None):
...
this = self.browse(cr, uid, ids[0], context=context)
p_ids = this.product_ids and this.product_ids
p_ids and p_ids.append(this.product_to)
...
original file here
First. what impact has this line p_ids = this.product_ids and this.product_ids
? If has not we can removed?
Second, this line generate and error because p_ids is a recorset not a list p_ids and p_ids.append(this.product_to)
. We could replace it for a new_set = set1 | set2
that is the convention for union of two sets.
@dsabrinarg @moylop260 I look that you work in this module. Please can contribute with the evaluation of this lines so I will be able to do the fix.
If, this module is not used or deprecated, then we could delete it. Best Regards.