From aef43babe2a794d167638ccf4e55c1daac443030 Mon Sep 17 00:00:00 2001 From: Magno Costa Date: Fri, 23 Aug 2024 12:57:31 -0300 Subject: [PATCH] [FIX] stock_picking_invoicing:Stock Rule inv state --- stock_picking_invoicing/models/__init__.py | 4 +--- stock_picking_invoicing/models/stock_rule.py | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 stock_picking_invoicing/models/stock_rule.py diff --git a/stock_picking_invoicing/models/__init__.py b/stock_picking_invoicing/models/__init__.py index e7c89b79855..d0c2251fbbd 100644 --- a/stock_picking_invoicing/models/__init__.py +++ b/stock_picking_invoicing/models/__init__.py @@ -1,8 +1,6 @@ -# Copyright (C) 2019-Today: Odoo Community Association (OCA) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - from . import stock_invoice_state_mixin from . import account_move from . import stock_move from . import stock_picking from . import stock_picking_type +from . import stock_rule diff --git a/stock_picking_invoicing/models/stock_rule.py b/stock_picking_invoicing/models/stock_rule.py new file mode 100644 index 00000000000..16afc28c81b --- /dev/null +++ b/stock_picking_invoicing/models/stock_rule.py @@ -0,0 +1,14 @@ +# Copyright (C) 2024-Today - Akretion (). +# @author Magno Costa +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models + + +class StockRule(models.Model): + _inherit = "stock.rule" + + def _get_custom_move_fields(self): + fields = super()._get_custom_move_fields() + fields += ["invoice_state"] + return fields