[FIX] product: automatic generation of documents for attachments
Finetuning of #132739 closes odoo/odoo#134364 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
@@ -17,8 +17,9 @@ class IrAttachment(models.Model):
|
||||
and not attachment.res_field
|
||||
)
|
||||
if product_attachments:
|
||||
self.env['product.document'].sudo().create({
|
||||
'ir_attachment_id': attachment.id
|
||||
for attachment in product_attachments
|
||||
})
|
||||
self.env['product.document'].sudo().create(
|
||||
{
|
||||
'ir_attachment_id': attachment.id
|
||||
} for attachment in product_attachments
|
||||
)
|
||||
return attachments
|
||||
|
||||
Reference in New Issue
Block a user