stock_usability: add tracking on important fields of stock.production.lot

Code cleanup
This commit is contained in:
Alexis de Lattre
2024-12-19 17:30:14 +01:00
parent 2ff3ea6dcd
commit 1d96cc4c83
4 changed files with 16 additions and 2 deletions

View File

@@ -7,6 +7,7 @@ from . import stock_warehouse_orderpoint
from . import stock_quant from . import stock_quant
from . import stock_quant_package from . import stock_quant_package
from . import stock_inventory from . import stock_inventory
from . import stock_production_lot
from . import procurement_group from . import procurement_group
from . import procurement_scheduler_log from . import procurement_scheduler_log
from . import product from . import product

View File

@@ -2,7 +2,7 @@
# @author Alexis de Lattre <alexis.delattre@akretion.com> # @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models from odoo import models
class StockLocation(models.Model): class StockLocation(models.Model):

View File

@@ -0,0 +1,13 @@
# Copyright 2024 Akretion France (https://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class StockProductionLot(models.Model):
_inherit = 'stock.production.lot'
name = fields.Char(tracking=True)
product_id = fields.Many2one(tracking=True)
ref = fields.Char(tracking=True)

View File

@@ -3,7 +3,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models, _ from odoo import api, fields, models, _
from odoo.tools import float_compare, float_is_zero from odoo.tools import float_compare
from odoo.exceptions import UserError from odoo.exceptions import UserError
import logging import logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)