[MIG] base_product_merge: Migration to 18.0#2250
[MIG] base_product_merge: Migration to 18.0#2250PieterPaulussen wants to merge 12 commits intoOCA:18.0from
Conversation
Currently translated at 100.0% (21 of 21 strings) Translation: stock-logistics-warehouse-17.0/stock-logistics-warehouse-17.0-base_product_merge Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-17-0/stock-logistics-warehouse-17-0-base_product_merge/it/
|
/ocabot migration base_product_merge |
| @@ -0,0 +1 @@ | |||
|
|
|||
| @@ -0,0 +1 @@ | |||
| We can merge duplicates products into single product | |||
There was a problem hiding this comment.
Maybe This module allows to merge products that are considered as duplicates into a single product. is better
| @@ -0,0 +1,3 @@ | |||
| Select products or templates then click on Merge products in Action | |||
| menu. Select Destination product in which need to merge all other | |||
There was a problem hiding this comment.
It is better to use a list here to enhance user reading.
| if ptype == "product.product": | ||
| products = self.env[active_model].browse(active_ids) | ||
| rec.update({"product_ids": [(6, 0, products.ids)]}) | ||
| else: |
There was a problem hiding this comment.
It should test also product.template and fail in case of other model.
| rec.update({"product_tmpl_ids": [(6, 0, product_templates.ids)]}) | ||
| return rec | ||
|
|
||
| dst_product_id = fields.Many2one("product.product", string="Destination product") |
There was a problem hiding this comment.
Please put field definitions on top
| def merge_products(self, model, products_to_merge, dst_product): | ||
| try: | ||
| if not products_to_merge: | ||
| raise UserError(_("You cannot merge product to it self.")) |
There was a problem hiding this comment.
| raise UserError(_("You cannot merge product to it self.")) | |
| raise UserError(_("You cannot merge product into itself.")) |
| method=self.merge_method, | ||
| ) | ||
| except Exception as e: | ||
| _logger.warning(e) |
There was a problem hiding this comment.
I'm wondering why not displaying the exact cause of error
|
@rousseldenis This PR should currently be kept as a draft. I migrated it to check its functionality, but there's some missing functionality in this module that should be discussed/mitigated or added (which you can find here. |
|
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
No description provided.