[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, 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.
If, this module is not used or deprecated, then we could delete it. Best Regards.