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:
- 客戶關係
- e-Commerce
- 會計
- 庫存
- PoS
- Project
- MRP
此問題已被標幟
1
回覆
3051
瀏覽次數
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).
相關帖文 | 回覆 | 瀏覽次數 | 活動 | |
---|---|---|---|---|
|
0
11月 23
|
1150 | ||
|
3
5月 25
|
1410 | ||
|
3
11月 24
|
8141 | ||
|
3
9月 24
|
6005 | ||
|
0
12月 17
|
3813 |