upgrade v16

separación de las funcionalidades del PoS en un módulo aparte
This commit is contained in:
snt 2024-09-04 22:25:51 +02:00 committed by snt
parent 70679c57a3
commit 308b3c4353
19 changed files with 184 additions and 386 deletions

View file

@ -1,5 +1,3 @@
from . import pos_config
from . import product_template
#from . import product_product
from . import product_product

View file

@ -1,16 +0,0 @@
# Copyright (C) 2020 - Today:
# GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields
class PosConfig(models.Model):
_inherit = 'pos.config'
iface_fixed_font_size = fields.Integer(
string="Fixed Font Size",
help="Font size of the product name, when it has no image."
" Set '0' will set adaptative font-size, depending on the"
" length of the name.")

View file

@ -1,19 +1,11 @@
# Copyright (C) 2017 - Today:
# GRAP (http://www.grap.coop)
# Akretion (http://www.akretion.com)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields, api
from odoo import models, fields
class ProductProduct(models.Model):
_inherit = 'product.product'
@api.depends('image')
def _compute_has_image(self):
for product in self:
product.has_image = product.image
has_image = fields.Boolean(
compute='_compute_has_image', string='Has Image', store=True)
formato = fields.Char('Formato', related='product_tmpl_id.formato', store=True)
autor = fields.Char('Autor', related='product_tmpl_id.autor', store=True)
editorial = fields.Char('Editorial', related='product_tmpl_id.editorial', store=True)
genero = fields.Char('Genero', related='product_tmpl_id.genero', store=True)
subtitle = fields.Char('Subtitulo', related='product_tmpl_id.subtitle', store=True)
fecha_entrada = fields.Char('Fecha de entrada', related='product_tmpl_id.fecha_entrada', store=True)

View file

@ -1,13 +1,8 @@
# Copyright (C) 2021: Criptomart (https://criptomart.net)
# @author Santi Noreña (<santi@criptomart.net>)
# Copyright (C) 2021-2024: Criptomart (https://criptomart.net)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from odoo import tools, models, fields, api, _
_logger = logging.getLogger(__name__)
class ProductTemplate(models.Model):
_inherit = "product.template"
@ -17,7 +12,6 @@ class ProductTemplate(models.Model):
pais_edicion = fields.Char('Pais de edicion')
colacion = fields.Char('Colacion')
autor = fields.Char('Autor')
isbn = fields.Char('ISBN')
coleccion = fields.Char('Coleccion')
subcoleccion = fields.Char('Subcoleccion')
idioma = fields.Char('Idioma')