I spent hours doing this and don't want to do it again.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Бухоблік
- Склад
- PoS
- Project
- MRP
Це запитання позначене
1
Відповісти
3049
Переглядів
Create a Server Action like this:
for record in records:
product_template = env['product.template'].search([('id','=',record.res_id)])
for variant in product_template.product_variant_ids:
new_attachment = record.copy()
new_attachment['res_id'] = variant.id
new_attachment['res_model'] = 'product.product'
And make sure to click CREATE CONTEXTUAL ACTION so you can select the relevant attachments and have them copied from the product.template to the product.variant:
Then you can re-select all the attachments and DELETE them (if applicable).
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
РеєстраціяRelated Posts | Відповіді | Переглядів | Дія | |
---|---|---|---|---|
|
0
лист. 23
|
1150 | ||
|
3
трав. 25
|
1398 | ||
|
3
лист. 24
|
8140 | ||
|
3
вер. 24
|
6003 | ||
|
0
груд. 17
|
3810 |