mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[MIG] mrp_bom_widget_section_and_note_one2many: Migration to 16.0
This commit is contained in:
@@ -7,7 +7,7 @@ MRP Widget Section and Note in BoM
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:952bfc410172f790d86d3053e80efcb3548509ea11542489bf294d6aa0e70551
|
||||
!! source digest: sha256:bb2aa89fcc9b9042b2a6dc68a120993a26cde6ccf190e44407a353f9c59e8b56
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
{
|
||||
"name": "MRP Widget Section and Note in BoM",
|
||||
"summary": "Add section and note in Bills of Materials",
|
||||
"version": "12.0.1.1.0",
|
||||
"version": "16.0.1.0.0",
|
||||
"category": "Manufacturing/Manufacturing",
|
||||
"author": "GRAP," "Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/manufacture",
|
||||
|
||||
@@ -367,7 +367,7 @@ ul.auto-toc {
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:952bfc410172f790d86d3053e80efcb3548509ea11542489bf294d6aa0e70551
|
||||
!! source digest: sha256:bb2aa89fcc9b9042b2a6dc68a120993a26cde6ccf190e44407a353f9c59e8b56
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/manufacture/tree/16.0/mrp_bom_widget_section_and_note_one2many"><img alt="OCA/manufacture" src="https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/manufacture-16-0/manufacture-16-0-mrp_bom_widget_section_and_note_one2many"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/manufacture&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>In a similar way to invoices, this module adds the possibility to add sections
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 839 KiB After Width: | Height: | Size: 222 KiB |
@@ -13,13 +13,16 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
<field name="arch" type="xml">
|
||||
<!-- Add new page -->
|
||||
<xpath expr="//page[1]" position="before">
|
||||
<page string="Components with sections and notes">
|
||||
<page
|
||||
string="Components with sections and notes"
|
||||
name="components_w_sections_notes"
|
||||
>
|
||||
<field
|
||||
name="bom_line_with_sectionnote_ids"
|
||||
widget="section_and_note_one2many"
|
||||
context="{'default_parent_product_tmpl_id': product_tmpl_id}"
|
||||
context="{'default_parent_product_tmpl_id': product_tmpl_id, 'default_product_id': False, 'default_bom_id': id}"
|
||||
>
|
||||
<tree string="Components" editable="bottom">
|
||||
<tree editable="bottom">
|
||||
<control>
|
||||
<create name="add_product_control" string="Add a product" />
|
||||
<create
|
||||
@@ -33,67 +36,96 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
context="{'default_display_type': 'line_note'}"
|
||||
/>
|
||||
</control>
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="display_type" invisible="1" />
|
||||
<field name="company_id" invisible="1" />
|
||||
<field name="sequence" widget="handle" />
|
||||
<field
|
||||
name="product_id"
|
||||
context="{'default_type': 'product'}"
|
||||
attrs="{'required': [('display_type', '=', False)]}"
|
||||
attrs="{
|
||||
'required': [('display_type', '=', False)],
|
||||
'invisible': [('display_type', '=', True)],
|
||||
}"
|
||||
context="{
|
||||
'default_type': 'product',
|
||||
'default_detailed_type': 'product'
|
||||
}"
|
||||
/>
|
||||
<field name="name" widget="section_and_note_text" />
|
||||
<field name="has_attachments" invisible="1" />
|
||||
<field
|
||||
name="name"
|
||||
widget="section_and_note_text"
|
||||
optional="show"
|
||||
/>
|
||||
|
||||
<field name="product_tmpl_id" invisible="1" />
|
||||
<button
|
||||
name="action_see_attachments"
|
||||
type="object"
|
||||
icon="fa-files-o"
|
||||
attrs="{'invisible': [('has_attachments', '=', True)]}"
|
||||
aria-label="No attachment"
|
||||
title="No attachment"
|
||||
/>
|
||||
<button
|
||||
name="action_see_attachments"
|
||||
type="object"
|
||||
icon="fa-file"
|
||||
attrs="{'invisible': [('has_attachments', '=', False)]}"
|
||||
aria-label="Attachments"
|
||||
title="Attachments"
|
||||
aria-label="Product Attachments"
|
||||
title="Product Attachments"
|
||||
class="float-end"
|
||||
/>
|
||||
<field name="attachments_count" class="text-start" string=" " />
|
||||
<field
|
||||
name="product_qty"
|
||||
attrs="{'required': [('display_type', '=', False)]}"
|
||||
attrs="{
|
||||
'invisible': [('display_type', '=', True)],
|
||||
}"
|
||||
/>
|
||||
<field name="product_uom_category_id" invisible="1" />
|
||||
<field name="parent_product_tmpl_id" invisible="1" />
|
||||
<field name="valid_product_attribute_value_ids" invisible="1" />
|
||||
<field
|
||||
name="valid_product_attribute_value_wnva_ids"
|
||||
invisible="1"
|
||||
/>
|
||||
<field
|
||||
name="product_uom_id"
|
||||
options="{'no_open':True,'no_create':True}"
|
||||
groups="uom.group_uom"
|
||||
attrs="{
|
||||
'invisible': [('display_type', '=', True)],
|
||||
}"
|
||||
/>
|
||||
<field
|
||||
name="attribute_value_ids"
|
||||
name="possible_bom_product_template_attribute_value_ids"
|
||||
invisible="1"
|
||||
/>
|
||||
<field
|
||||
name="bom_product_template_attribute_value_ids"
|
||||
optional="hide"
|
||||
widget="many2many_tags"
|
||||
domain="[('id', 'in', valid_product_attribute_value_wnva_ids)]"
|
||||
options="{'no_create': True}"
|
||||
attrs="{'column_invisible': [('parent.product_id', '!=', False)]}"
|
||||
attrs="{
|
||||
'column_invisible': [('parent.product_id', '!=', False)],
|
||||
'invisible': [('display_type', '=', True)]
|
||||
}"
|
||||
groups="product.group_product_variant"
|
||||
/>
|
||||
<field name="allowed_operation_ids" invisible="1" />
|
||||
<field
|
||||
name="operation_id"
|
||||
groups="mrp.group_mrp_routings"
|
||||
domain="[('routing_id', '=', parent.routing_id)]"
|
||||
optional="hidden"
|
||||
attrs="{
|
||||
'column_invisible': [('parent.type','not in', ('normal', 'phantom'))],
|
||||
'invisible': [('display_type', '=', True)]
|
||||
}"
|
||||
options="{'no_quick_create':True,'no_create_edit':True}"
|
||||
/>
|
||||
<field name="manual_consumption_readonly" invisible="1" />
|
||||
<field
|
||||
name="manual_consumption"
|
||||
optional="hide"
|
||||
width="1.0"
|
||||
attrs="{
|
||||
'readonly': [('manual_consumption_readonly', '=', True)],
|
||||
'invisible': [('display_type', '=', True)],
|
||||
}"
|
||||
force_save="1"
|
||||
/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</xpath>
|
||||
<!-- Hide the original page -->
|
||||
<xpath expr="//page[2]" position="attributes">
|
||||
<attribute name="groups">base.group_no_one</attribute>
|
||||
<attribute name="groups">base.group_erp_manager</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user