Skip to content
Extraits de code Groupes Projets
Sélectionner une révision Git
  • 1b417694abf2138733639b864b1b06a694185da0
  • 16.0 par défaut protégée
  • 18.0
  • 14.0 protégée
  • 17.0
  • 15.0 protégée
  • 12.0 protégée
  • 10.0 protégée
8 résultats

entrypoint.sh

Blame
  • product_template.py 1,75 Kio
    # -*- coding: utf-8 -*-
    # Part of Odoo. See LICENSE file for full copyright and licensing details.
    
    import itertools
    import logging
    from collections import defaultdict
    
    from odoo import api, fields, models, tools, _, SUPERUSER_ID
    from odoo.exceptions import ValidationError, RedirectWarning, UserError
    from odoo.osv import expression
    
    _logger = logging.getLogger(__name__)
    
    
    class ProductTemplate(models.Model):
        _inherit = "product.template"
    
        # ------------------------------------------------------
        # Fields declaration
        # ------------------------------------------------------
        nb_accesories = fields.Float("Nombre d'accéssoires")
        accessory_label = fields.Char(
            related="categ_id.accessory_label", readonly=True
        )
    
        # ------------------------------------------------------
        # SQL Constraints
        # ------------------------------------------------------
    
        # ------------------------------------------------------
        # Default methods
        # ------------------------------------------------------
    
        # ------------------------------------------------------
        # Computed fields / Search Fields
        # ------------------------------------------------------
    
        # ------------------------------------------------------
        # Onchange / Constraints
        # ------------------------------------------------------
    
        # ------------------------------------------------------
        # CRUD methods (ORM overrides)
        # ------------------------------------------------------
    
        # ------------------------------------------------------
        # Actions
        # ------------------------------------------------------
    
        # ------------------------------------------------------
        # Business methods
        # ------------------------------------------------------