Skip to content
Extraits de code Groupes Projets
Sélectionner une révision Git
  • 07b1de90bba4605a66f14b4b9786675fc7d9ab33
  • master par défaut protégée
  • v1.0.3
  • v1.0.2
  • v1.0.1
  • v1.0.0
6 résultats

README.md

Blame
  • product_template.py 1,86 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'accessoires")
        accessory_label = fields.Char(
            related="categ_id.accessory_label", readonly=True
        )
        mulch_quantity_multiplier = fields.Integer(
            "Multiplicateur paillage",
            default=1
        )
    
        # ------------------------------------------------------
        # SQL Constraints
        # ------------------------------------------------------
    
        # ------------------------------------------------------
        # Default methods
        # ------------------------------------------------------
    
        # ------------------------------------------------------
        # Computed fields / Search Fields
        # ------------------------------------------------------
    
        # ------------------------------------------------------
        # Onchange / Constraints
        # ------------------------------------------------------
    
        # ------------------------------------------------------
        # CRUD methods (ORM overrides)
        # ------------------------------------------------------
    
        # ------------------------------------------------------
        # Actions
        # ------------------------------------------------------
    
        # ------------------------------------------------------
        # Business methods
        # ------------------------------------------------------