Skip to content

Commit

Permalink
[16.0][REF] Simplify BoM Form view + remove description duplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinDupont committed Jan 9, 2025
1 parent 4330188 commit 8de940c
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 27 deletions.
1 change: 1 addition & 0 deletions fermente_mrp_bom_form_view/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# OCA
"web_widget_numeric_step",
"mrp_bom_widget_section_and_note_one2many",
"mrp_bom_produce_delay_in_hour",
# GRAP
"mrp_bom_tag",
"mrp_bom_line_net_qty",
Expand Down
31 changes: 30 additions & 1 deletion fermente_mrp_bom_form_view/views/view_mrp_bom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,35 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<!-- MRP Bill of Materials - Form -->
<!-- ************************************************************ -->

<record id="view_fermente_mrp_bom_form" model="ir.ui.view">

<!-- ******** INHERIT BASE VIEW **************************************************** -->
<record id="view_fermente_mrp_bom_form_base" model="ir.ui.view">
<field name="model">mrp.bom</field>
<field name="inherit_id" ref="mrp.mrp_bom_form_view" />
<field name="arch" type="xml">
<!-- Hide fields -->
<xpath expr="//field[@name='type']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
</field>
</record>


<!-- ******** INHERIT PRODUCE DELAY VIEW **************************************************** -->
<record id="view_fermente_mrp_bom_form_produce_delay" model="ir.ui.view">
<field name="model">mrp.bom</field>
<field name="inherit_id" ref="mrp_bom_produce_delay_in_hour.view_mrp_bom_form_glue_module_produce_delay_add_fields" />
<field name="arch" type="xml">

<xpath expr="//label[@for='produce_delay_in_hour']" position="attributes">
<attribute name="string">Produce time</attribute>
</xpath>

</field>
</record>

<!-- ******** INHERIT SECTIONS AND NOTES VIEW **************************************************** -->
<record id="view_fermente_mrp_bom_form_sections_and_notes" model="ir.ui.view">
<field name="model">mrp.bom</field>
<field name="inherit_id" ref="mrp_bom_widget_section_and_note_one2many.mrp_bom_form_view_section" />
<field name="arch" type="xml">
Expand Down Expand Up @@ -89,4 +117,5 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
</field>
</record>


</odoo>
2 changes: 1 addition & 1 deletion mrp_bom_wizard_production/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
"depends": [
"mrp_bom_product_price_margin",
"mrp_bom_simple_report",
"mrp_bom_simple_packaging_description",
],
"data": [
"security/ir.model.access.csv",
"data/report_paperformat.xml",
"report/report_bom_purchase_list.xml",
"report/ir_actions_report.xml",
"wizard/view_bom_print_purchase_list_wizard.xml",
"views/mrp_bom.xml",
"views/action.xml",
"views/menu.xml",
],
Expand Down
1 change: 0 additions & 1 deletion mrp_bom_wizard_production/models/mrp_bom.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ class MrpBom(models.Model):
_inherit = "mrp.bom"

currency_id = fields.Many2one(related="product_tmpl_id.currency_id")
description_packaging = fields.Char(string="Packaging description")
1 change: 0 additions & 1 deletion mrp_bom_wizard_production/readme/ROADMAP.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
- Button in wizard to create purchase and manufacturing orders ?
- How to handle nested of nested boms ? At the moment, take one level into account
- Field scope bom.description_packaging in this module ?
- Fix test04
23 changes: 0 additions & 23 deletions mrp_bom_wizard_production/views/mrp_bom.xml

This file was deleted.

1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ git+https://github.com/OCA/manufacture@refs/pull/1218/head#subdirectory=setup/mr
git+https://github.com/OCA/manufacture@refs/pull/1214/head#subdirectory=setup/mrp_bom_line_net_qty

# Placeholder for future PRs
git+https://github.com/OCA/manufacture@refs/pull/1430/head#subdirectory=setup/mrp_bom_simple_packaging_description

0 comments on commit 8de940c

Please sign in to comment.