From 68203407617faa7eebdbb809c533cf4c68070ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Alix?= Date: Wed, 8 Nov 2023 15:18:32 +0100 Subject: [PATCH 1/2] mrp_lot_number_propagation: set maturity level to Beta --- mrp_lot_number_propagation/README.rst | 11 +++-------- mrp_lot_number_propagation/__manifest__.py | 2 +- .../static/description/index.html | 10 ++-------- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/mrp_lot_number_propagation/README.rst b/mrp_lot_number_propagation/README.rst index dc57852a9..85931dff6 100644 --- a/mrp_lot_number_propagation/README.rst +++ b/mrp_lot_number_propagation/README.rst @@ -7,12 +7,12 @@ MRP Serial Number Propagation !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:4d9e995af3bffb562270ff4228e8aa2c1aa3fb4433aa4dea9bcb25f512a96922 + !! source digest: sha256:c8e23faceaca56df99285955d3b929df0db46670c281ac1e04ae36723e4116ec !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status - :alt: Alpha + :alt: Beta .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 @@ -30,11 +30,6 @@ MRP Serial Number Propagation Allow to propagate a lot number from a component to a finished product. -.. IMPORTANT:: - This is an alpha version, the data model and design can change at any time without warning. - Only for development or testing purpose, do not use in production. - `More details on development status `_ - **Table of contents** .. contents:: diff --git a/mrp_lot_number_propagation/__manifest__.py b/mrp_lot_number_propagation/__manifest__.py index 7f28eef70..55c432f02 100644 --- a/mrp_lot_number_propagation/__manifest__.py +++ b/mrp_lot_number_propagation/__manifest__.py @@ -3,7 +3,7 @@ { "name": "MRP Serial Number Propagation", "version": "15.0.0.3.0", - "development_status": "Alpha", + "development_status": "Beta", "license": "AGPL-3", "author": "Camptocamp, Odoo Community Association (OCA)", "maintainers": ["sebalix"], diff --git a/mrp_lot_number_propagation/static/description/index.html b/mrp_lot_number_propagation/static/description/index.html index aef38a90b..8c22edb25 100644 --- a/mrp_lot_number_propagation/static/description/index.html +++ b/mrp_lot_number_propagation/static/description/index.html @@ -367,16 +367,10 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:4d9e995af3bffb562270ff4228e8aa2c1aa3fb4433aa4dea9bcb25f512a96922 +!! source digest: sha256:c8e23faceaca56df99285955d3b929df0db46670c281ac1e04ae36723e4116ec !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Alpha License: AGPL-3 OCA/manufacture Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/manufacture Translate me on Weblate Try me on Runboat

Allow to propagate a lot number from a component to a finished product.

-
-

Important

-

This is an alpha version, the data model and design can change at any time without warning. -Only for development or testing purpose, do not use in production. -More details on development status

-

Table of contents

    From 43930aba553e5e5bd609334527ddb9dd69a6a8c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Alix?= Date: Wed, 28 Sep 2022 13:50:04 +0200 Subject: [PATCH 2/2] [ADD] mrp_subcontracting_lot_number_propagation --- .../README.rst | 86 ++++ .../__init__.py | 1 + .../__manifest__.py | 28 ++ .../models/__init__.py | 4 + .../models/mrp_bom.py | 12 + .../models/mrp_production.py | 59 +++ .../models/stock_move.py | 23 + .../models/stock_move_line.py | 73 +++ .../readme/CONTRIBUTORS.rst | 2 + .../readme/DESCRIPTION.rst | 2 + .../static/description/index.html | 425 ++++++++++++++++++ .../tests/__init__.py | 1 + .../tests/test_mrp_subcontracting.py | 71 +++ .../views/stock_move_line.xml | 61 +++ .../mrp_subcontracting_lot_number_propagation | 1 + .../setup.py | 6 + 16 files changed, 855 insertions(+) create mode 100644 mrp_subcontracting_lot_number_propagation/README.rst create mode 100644 mrp_subcontracting_lot_number_propagation/__init__.py create mode 100644 mrp_subcontracting_lot_number_propagation/__manifest__.py create mode 100644 mrp_subcontracting_lot_number_propagation/models/__init__.py create mode 100644 mrp_subcontracting_lot_number_propagation/models/mrp_bom.py create mode 100644 mrp_subcontracting_lot_number_propagation/models/mrp_production.py create mode 100644 mrp_subcontracting_lot_number_propagation/models/stock_move.py create mode 100644 mrp_subcontracting_lot_number_propagation/models/stock_move_line.py create mode 100644 mrp_subcontracting_lot_number_propagation/readme/CONTRIBUTORS.rst create mode 100644 mrp_subcontracting_lot_number_propagation/readme/DESCRIPTION.rst create mode 100644 mrp_subcontracting_lot_number_propagation/static/description/index.html create mode 100644 mrp_subcontracting_lot_number_propagation/tests/__init__.py create mode 100644 mrp_subcontracting_lot_number_propagation/tests/test_mrp_subcontracting.py create mode 100644 mrp_subcontracting_lot_number_propagation/views/stock_move_line.xml create mode 120000 setup/mrp_subcontracting_lot_number_propagation/odoo/addons/mrp_subcontracting_lot_number_propagation create mode 100644 setup/mrp_subcontracting_lot_number_propagation/setup.py diff --git a/mrp_subcontracting_lot_number_propagation/README.rst b/mrp_subcontracting_lot_number_propagation/README.rst new file mode 100644 index 000000000..530294155 --- /dev/null +++ b/mrp_subcontracting_lot_number_propagation/README.rst @@ -0,0 +1,86 @@ +============================================== +MRP Serial Number Propagation (subcontracting) +============================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:400779101d3b4fcd3dc9bdec8728d90999f31c8b95445b76f465e157538071d7 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github + :target: https://github.com/OCA/manufacture/tree/15.0/mrp_subcontracting_lot_number_propagation + :alt: OCA/manufacture +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/manufacture-15-0/manufacture-15-0-mrp_subcontracting_lot_number_propagation + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/manufacture&target_branch=15.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Integration of the lot number propagation from a component to a finished +product with the subcontracting workflow. + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Camptocamp + +Contributors +~~~~~~~~~~~~ + +* Akim Juillerat +* Sébastien Alix + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +.. |maintainer-sebalix| image:: https://github.com/sebalix.png?size=40px + :target: https://github.com/sebalix + :alt: sebalix + +Current `maintainer `__: + +|maintainer-sebalix| + +This module is part of the `OCA/manufacture `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/mrp_subcontracting_lot_number_propagation/__init__.py b/mrp_subcontracting_lot_number_propagation/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mrp_subcontracting_lot_number_propagation/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mrp_subcontracting_lot_number_propagation/__manifest__.py b/mrp_subcontracting_lot_number_propagation/__manifest__.py new file mode 100644 index 000000000..afbe112e0 --- /dev/null +++ b/mrp_subcontracting_lot_number_propagation/__manifest__.py @@ -0,0 +1,28 @@ +# Copyright 2022 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) +{ + "name": "MRP Serial Number Propagation (subcontracting)", + "version": "15.0.0.1.0", + "development_status": "Beta", + "license": "AGPL-3", + "author": "Camptocamp, Odoo Community Association (OCA)", + "maintainers": ["sebalix"], + "summary": ( + "Propagate a serial number from a component to a finished product " + "(subcontracting integration)" + ), + "website": "https://github.com/OCA/manufacture", + "category": "Manufacturing", + "depends": [ + # core + "mrp_subcontracting", + # OCA/manufacture + "mrp_lot_number_propagation", + ], + "data": [ + "views/stock_move_line.xml", + ], + "installable": True, + "auto_install": True, + "application": False, +} diff --git a/mrp_subcontracting_lot_number_propagation/models/__init__.py b/mrp_subcontracting_lot_number_propagation/models/__init__.py new file mode 100644 index 000000000..86ae99624 --- /dev/null +++ b/mrp_subcontracting_lot_number_propagation/models/__init__.py @@ -0,0 +1,4 @@ +from . import mrp_bom +from . import mrp_production +from . import stock_move_line +from . import stock_move diff --git a/mrp_subcontracting_lot_number_propagation/models/mrp_bom.py b/mrp_subcontracting_lot_number_propagation/models/mrp_bom.py new file mode 100644 index 000000000..74b69ee2c --- /dev/null +++ b/mrp_subcontracting_lot_number_propagation/models/mrp_bom.py @@ -0,0 +1,12 @@ +# Copyright 2022 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +from odoo import models + + +class MrpBom(models.Model): + _inherit = "mrp.bom" + + def _get_lot_number_propagation_bom_types(self): + types = super()._get_lot_number_propagation_bom_types() + return types + ["subcontract"] diff --git a/mrp_subcontracting_lot_number_propagation/models/mrp_production.py b/mrp_subcontracting_lot_number_propagation/models/mrp_production.py new file mode 100644 index 000000000..1693474a1 --- /dev/null +++ b/mrp_subcontracting_lot_number_propagation/models/mrp_production.py @@ -0,0 +1,59 @@ +# Copyright 2022 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +from lxml import etree + +from odoo import api, models +from odoo.osv import expression +from odoo.tools.safe_eval import safe_eval + +from odoo.addons.base.models.ir_ui_view import ( + transfer_modifiers_to_node, + transfer_node_to_modifiers, +) + + +class MrpProduction(models.Model): + _inherit = "mrp.production" + + def subcontracting_record_component(self): + if self.is_lot_number_propagated and self.propagated_lot_producing: + self._create_and_assign_propagated_lot_number() + return super().subcontracting_record_component() + + def _views_to_adapt(self): + names = super()._views_to_adapt() + return names + ["mrp.production.subcontracting.form.view"] + + @api.depends( + # New field dependencies to compute the propagated lot on the + # "mrp_production_subcontracting_form_view" view. + "move_line_raw_ids.qty_done", + "move_line_raw_ids.lot_id", + ) + def _compute_propagated_lot_producing(self): + return super()._compute_propagated_lot_producing() + + def _fields_view_get_adapt_lot_tags_attrs(self, view): + arch = super()._fields_view_get_adapt_lot_tags_attrs(view) + # Remove 'required' on 'lot_producing_id' if it is automatically propagated. + if view["name"] != "mrp.production.subcontracting.form.view": + return arch + doc = etree.XML(arch) + tags = ("//field[@name='lot_producing_id']",) + for xpath_expr in tags: + attrs_key = "required" + nodes = doc.xpath(xpath_expr) + for field in nodes: + attrs = safe_eval(field.attrib.get("attrs", "{}")) + if not attrs[attrs_key]: + continue + required_domain = expression.AND( + [attrs[attrs_key], [("is_lot_number_propagated", "=", False)]] + ) + attrs[attrs_key] = required_domain + field.set("attrs", str(attrs)) + modifiers = {} + transfer_node_to_modifiers(field, modifiers, self.env.context) + transfer_modifiers_to_node(modifiers, field) + return etree.tostring(doc, encoding="unicode") diff --git a/mrp_subcontracting_lot_number_propagation/models/stock_move.py b/mrp_subcontracting_lot_number_propagation/models/stock_move.py new file mode 100644 index 000000000..ec130feb3 --- /dev/null +++ b/mrp_subcontracting_lot_number_propagation/models/stock_move.py @@ -0,0 +1,23 @@ +# Copyright 2022 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +from odoo import api, models + + +class StockMove(models.Model): + _inherit = "stock.move" + + @api.depends( + "move_line_ids.is_lot_id_editable", + ) + def _compute_display_assign_serial(self): + # Display (or not) the fields/buttons to assign/unassign serial numbers + # depending on the 'is_lot_id_editable' field. + # If one of the move line doesn't allow to edit the lot, we don't display + # the fields/buttons at the move level. + res = super()._compute_display_assign_serial() + for move in self: + all_lot_editable = all(move.move_line_ids.mapped("is_lot_id_editable")) + if not all_lot_editable: + move.display_assign_serial = False + return res diff --git a/mrp_subcontracting_lot_number_propagation/models/stock_move_line.py b/mrp_subcontracting_lot_number_propagation/models/stock_move_line.py new file mode 100644 index 000000000..85c25058c --- /dev/null +++ b/mrp_subcontracting_lot_number_propagation/models/stock_move_line.py @@ -0,0 +1,73 @@ +# Copyright 2022 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +from lxml import etree + +from odoo import api, fields, models +from odoo.osv import expression +from odoo.tools.safe_eval import safe_eval + +from odoo.addons.base.models.ir_ui_view import ( + transfer_modifiers_to_node, + transfer_node_to_modifiers, +) + + +class StockMoveLine(models.Model): + _inherit = "stock.move.line" + + is_lot_id_editable = fields.Boolean( + string="Is lot editable?", + compute="_compute_is_lot_id_editable", + help="Technical field to define if the 'lot_id' field is editable.", + ) + + @api.depends("lot_id") + def _compute_is_lot_id_editable(self): + for line in self: + line.is_lot_id_editable = True + mos = line.move_id.move_orig_ids.production_id + lot_prapagated = [ + mo.propagated_lot_producing == line.lot_id.name + and mo.subcontracting_has_been_recorded + and mo.is_lot_number_propagated + for mo in mos + ] + if any(lot_prapagated): + line.is_lot_id_editable = False + + def fields_view_get( + self, view_id=None, view_type="form", toolbar=False, submenu=False + ): + # Override to make readonly the "lot_id" field if 'is_lot_editable' is false. + # This is done this way as it's not possible to update easily existing 'attrs' + # attributes on all views. + result = super().fields_view_get( + view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu + ) + if "is_lot_id_editable" in result["arch"]: + result["arch"] = self._fields_view_get_adapt_lot_tags_attrs(result) + return result + + def _fields_view_get_adapt_lot_tags_attrs(self, view): + """Set as readonly 'lot_id' field if 'is_lot_editable' is false.""" + doc = etree.XML(view["arch"]) + tags = ("//field[@name='lot_id']",) + lot_id_readonly_domain = [("is_lot_id_editable", "=", False)] + for xpath_expr in tags: + attrs_key = "readonly" + nodes = doc.xpath(xpath_expr) + for field in nodes: + attrs = safe_eval(field.attrib.get("attrs", "{}")) + if not attrs.get(attrs_key): + attrs[attrs_key] = lot_id_readonly_domain + continue + readonly_domain = expression.OR( + [attrs[attrs_key], lot_id_readonly_domain] + ) + attrs[attrs_key] = readonly_domain + field.set("attrs", str(attrs)) + modifiers = {} + transfer_node_to_modifiers(field, modifiers, self.env.context) + transfer_modifiers_to_node(modifiers, field) + return etree.tostring(doc, encoding="unicode") diff --git a/mrp_subcontracting_lot_number_propagation/readme/CONTRIBUTORS.rst b/mrp_subcontracting_lot_number_propagation/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..313df49ab --- /dev/null +++ b/mrp_subcontracting_lot_number_propagation/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Akim Juillerat +* Sébastien Alix diff --git a/mrp_subcontracting_lot_number_propagation/readme/DESCRIPTION.rst b/mrp_subcontracting_lot_number_propagation/readme/DESCRIPTION.rst new file mode 100644 index 000000000..e7130b7ff --- /dev/null +++ b/mrp_subcontracting_lot_number_propagation/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +Integration of the lot number propagation from a component to a finished +product with the subcontracting workflow. diff --git a/mrp_subcontracting_lot_number_propagation/static/description/index.html b/mrp_subcontracting_lot_number_propagation/static/description/index.html new file mode 100644 index 000000000..800255697 --- /dev/null +++ b/mrp_subcontracting_lot_number_propagation/static/description/index.html @@ -0,0 +1,425 @@ + + + + + + +MRP Serial Number Propagation (subcontracting) + + + +
    +

    MRP Serial Number Propagation (subcontracting)

    + + +

    Beta License: AGPL-3 OCA/manufacture Translate me on Weblate Try me on Runboat

    +

    Integration of the lot number propagation from a component to a finished +product with the subcontracting workflow.

    +

    Table of contents

    + +
    +

    Bug Tracker

    +

    Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

    +

    Do not contact contributors directly about support or help with technical issues.

    +
    +
    +

    Credits

    +
    +

    Authors

    +
      +
    • Camptocamp
    • +
    +
    +
    +

    Contributors

    + +
    +
    +

    Maintainers

    +

    This module is maintained by the OCA.

    +Odoo Community Association +

    OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

    +

    Current maintainer:

    +

    sebalix

    +

    This module is part of the OCA/manufacture project on GitHub.

    +

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    +
    +
    +
    + + diff --git a/mrp_subcontracting_lot_number_propagation/tests/__init__.py b/mrp_subcontracting_lot_number_propagation/tests/__init__.py new file mode 100644 index 000000000..0ce157b49 --- /dev/null +++ b/mrp_subcontracting_lot_number_propagation/tests/__init__.py @@ -0,0 +1 @@ +from . import test_mrp_subcontracting diff --git a/mrp_subcontracting_lot_number_propagation/tests/test_mrp_subcontracting.py b/mrp_subcontracting_lot_number_propagation/tests/test_mrp_subcontracting.py new file mode 100644 index 000000000..36d8509a1 --- /dev/null +++ b/mrp_subcontracting_lot_number_propagation/tests/test_mrp_subcontracting.py @@ -0,0 +1,71 @@ +# Copyright 2022 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +from odoo.tests.common import Form + +from odoo.addons.mrp_lot_number_propagation.tests.common import Common + + +class TestMrpSubcontracting(Common): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.subcontracted_bom = cls._get_subcontracted_bom() + cls.vendor = cls.env.ref("base.res_partner_12") + cls._update_stock_component_qty( + bom=cls.subcontracted_bom, + location=cls.vendor.property_stock_subcontractor, + ) + with Form(cls.env["stock.picking"]) as form: + form.picking_type_id = cls.env.ref("stock.picking_type_in") + form.partner_id = cls.vendor + with form.move_ids_without_package.new() as move: + variant = cls.subcontracted_bom.product_tmpl_id.product_variant_ids + move.product_id = variant + move.product_uom_qty = 1 + cls.picking = form.save() + cls.picking.action_confirm() + + @classmethod + def _get_subcontracted_bom(cls): + bom = cls.env.ref("mrp_subcontracting.mrp_bom_subcontract") + bom.product_tmpl_id.tracking = "serial" + bom.bom_line_ids.unlink() + bom.bom_line_ids.create( + { + "bom_id": bom.id, + "product_id": cls.product_tracked_by_sn.id, + "product_qty": 1, + "propagate_lot_number": True, + } + ) + bom.lot_number_propagation = True + return bom + + def test_lot_propagation(self): + order = self.picking.move_lines.move_orig_ids.production_id + self.assertEqual(order.bom_id, self.subcontracted_bom) + # Fill the 'qty_done' for consumed components through + # the "Record Components" form + view_ref = "mrp_subcontracting.mrp_production_subcontracting_form_view" + self.assertFalse(order.propagated_lot_producing) + with Form(order, view_ref) as form: + for i in range(len(order.move_line_raw_ids)): + with form.move_line_raw_ids.edit(i) as move_line: + move_line.qty_done = move_line.product_uom_qty + order = form.save() + self.assertEqual(order.propagated_lot_producing, self.LOT_NAME) + # Set the quantity produced and consume the components, this will set + # the expected serial number on the finished product to receive + self.assertFalse(self.picking.move_line_ids.lot_id) + order.qty_producing = order.product_qty + order.subcontracting_record_component() + lot = self.picking.move_line_ids.lot_id + self.assertEqual(lot.name, self.LOT_NAME) + # Receive the finished product in stock + dest_location = self.picking.move_lines.location_dest_id + quant_in_stock = self._get_lot_quants(lot, dest_location) + self.assertFalse(quant_in_stock) + self.picking._action_done() + quant_in_stock = self._get_lot_quants(lot, dest_location) + self.assertTrue(quant_in_stock) diff --git a/mrp_subcontracting_lot_number_propagation/views/stock_move_line.xml b/mrp_subcontracting_lot_number_propagation/views/stock_move_line.xml new file mode 100644 index 000000000..b4efe4f60 --- /dev/null +++ b/mrp_subcontracting_lot_number_propagation/views/stock_move_line.xml @@ -0,0 +1,61 @@ + + + + + + stock.move.line.tree.inherit + stock.move.line + + + + + + + + + + stock.move.line.tree.detailed.inherit + stock.move.line + + + + + + + + + + stock.move.line.form.inherit + stock.move.line + + + + + + + + + + stock.move.line.operations.tree.inherit + stock.move.line + + + + + + + + + + stock.move.line.operations.tree.inherit + stock.move.line + + + + + + + + + diff --git a/setup/mrp_subcontracting_lot_number_propagation/odoo/addons/mrp_subcontracting_lot_number_propagation b/setup/mrp_subcontracting_lot_number_propagation/odoo/addons/mrp_subcontracting_lot_number_propagation new file mode 120000 index 000000000..4c089753f --- /dev/null +++ b/setup/mrp_subcontracting_lot_number_propagation/odoo/addons/mrp_subcontracting_lot_number_propagation @@ -0,0 +1 @@ +../../../../mrp_subcontracting_lot_number_propagation \ No newline at end of file diff --git a/setup/mrp_subcontracting_lot_number_propagation/setup.py b/setup/mrp_subcontracting_lot_number_propagation/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_subcontracting_lot_number_propagation/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)