links internal description with website_description

This commit is contained in:
santi 2024-09-04 22:33:01 +00:00
parent cb788d4a45
commit 70679c57a3
4 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1 @@
from . import models

View file

@ -0,0 +1,10 @@
{
'name': 'Website Descrition Internal',
'version': '16.0.1.0.0',
'summary': 'Sobrescribe el campo website_description y devuelve el campo internal description.',
'author': 'Criptomart',
'depends': ['product','website_sale'],
'data': [],
'installable': True,
'application': False,
}

View file

@ -0,0 +1 @@
from . import product_template

View file

@ -0,0 +1,15 @@
from odoo import models, fields, api
class ProductTemplate(models.Model):
_inherit = 'product.template'
website_description = fields.Html(
string='Website Description',
compute='_compute_website_description',
store=True
)
@api.depends('description')
def _compute_website_description(self):
for record in self:
record.website_description = record.description