diff --git a/setup/stock_quant_expiration_date_tree/odoo/addons/stock_quant_expiration_date_tree b/setup/stock_quant_expiration_date_tree/odoo/addons/stock_quant_expiration_date_tree new file mode 120000 index 000000000..01bbc29bf --- /dev/null +++ b/setup/stock_quant_expiration_date_tree/odoo/addons/stock_quant_expiration_date_tree @@ -0,0 +1 @@ +../../../../stock_quant_expiration_date_tree \ No newline at end of file diff --git a/setup/stock_quant_expiration_date_tree/setup.py b/setup/stock_quant_expiration_date_tree/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/stock_quant_expiration_date_tree/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/stock_quant_expiration_date_tree/models/stock_quant.py b/stock_quant_expiration_date_tree/models/stock_quant.py index 03652b8b0..2f2eb3d0d 100644 --- a/stock_quant_expiration_date_tree/models/stock_quant.py +++ b/stock_quant_expiration_date_tree/models/stock_quant.py @@ -7,9 +7,19 @@ from odoo import fields, models class StockQuant(models.Model): _inherit = "stock.quant" - life_date = fields.Datetime(string="End of Life Date", related="lot_id.life_date",) - use_date = fields.Datetime(string="Best before Date", related="lot_id.use_date",) - removal_date = fields.Datetime( - string="Removal Date", related="lot_id.removal_date", + life_date = fields.Datetime( + string="End of Life Date", + related="lot_id.life_date", + ) + use_date = fields.Datetime( + string="Best before Date", + related="lot_id.use_date", + ) + removal_date = fields.Datetime( + string="Removal Date", + related="lot_id.removal_date", + ) + alert_date = fields.Datetime( + string="Alert Date", + related="lot_id.alert_date", ) - alert_date = fields.Datetime(string="Alert Date", related="lot_id.alert_date",)