[MIG] mrp_usability_akretion: migrate to v18
This commit is contained in:
@@ -1,15 +1,15 @@
|
|||||||
# Copyright 2015-2022 Akretion (http://www.akretion.com)
|
# Copyright 2015-2024 Akretion France (https://www.akretion.com)
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'MRP Usability',
|
'name': 'MRP Usability',
|
||||||
'version': '16.0.1.0.0',
|
'version': '18.0.1.0.0',
|
||||||
'category': 'Manufacturing',
|
'category': 'Manufacturing',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'summary': 'Usability improvements on manufacturing',
|
'summary': 'Usability improvements on manufacturing',
|
||||||
'author': 'Akretion',
|
'author': 'Akretion',
|
||||||
'website': 'http://www.akretion.com',
|
'website': 'https://github.com/akretion/odoo-usability',
|
||||||
'depends': ['mrp'],
|
'depends': ['mrp'],
|
||||||
'data': [
|
'data': [
|
||||||
'views/mrp_production.xml',
|
'views/mrp_production.xml',
|
||||||
@@ -17,5 +17,5 @@
|
|||||||
'views/stock_move.xml',
|
'views/stock_move.xml',
|
||||||
# 'report/mrp_report.xml' # TODO
|
# 'report/mrp_report.xml' # TODO
|
||||||
],
|
],
|
||||||
'installable': False,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright 2021-2022 Akretion (http://www.akretion.com)
|
# Copyright 2021-2024 Akretion France (https://www.akretion.com)
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
@@ -18,3 +18,4 @@ class MrpBom(models.Model):
|
|||||||
ready_to_produce = fields.Selection(tracking=90)
|
ready_to_produce = fields.Selection(tracking=90)
|
||||||
picking_type_id = fields.Many2one(tracking=60)
|
picking_type_id = fields.Many2one(tracking=60)
|
||||||
consumption = fields.Selection(tracking=40)
|
consumption = fields.Selection(tracking=40)
|
||||||
|
produce_delay = fields.Integer(tracking=100)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright 2015-2022 Akretion (http://www.akretion.com)
|
# Copyright 2015-2024 Akretion France (https://www.akretion.com)
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright 2020-2022 Akretion France (http://www.akretion.com/)
|
# Copyright 2020-2024 Akretion France (https://www.akretion.com/)
|
||||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
|
|
||||||
from odoo import models
|
from odoo import models
|
||||||
@@ -19,7 +19,7 @@ class ProductTemplate(models.Model):
|
|||||||
{
|
{
|
||||||
"context": {"default_product_tmpl_id": self.id},
|
"context": {"default_product_tmpl_id": self.id},
|
||||||
"views": False,
|
"views": False,
|
||||||
"view_mode": "form,tree",
|
"view_mode": "form,list,kanban",
|
||||||
"res_id": bom.id,
|
"res_id": bom.id,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -39,7 +39,7 @@ class ProductProduct(models.Model):
|
|||||||
action.update(
|
action.update(
|
||||||
{
|
{
|
||||||
"views": False,
|
"views": False,
|
||||||
"view_mode": "form,tree",
|
"view_mode": "form,list,kanban",
|
||||||
"res_id": bom_target_ids[0].id,
|
"res_id": bom_target_ids[0].id,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2016-2022 Akretion (http://www.akretion.com/)
|
Copyright 2016-2024 Akretion France (https://www.akretion.com/)
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
@@ -15,8 +15,8 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="user_id" position="before">
|
<field name="user_id" position="before">
|
||||||
<!-- I can't use position="move" because it would match another field in an embedded tree view -->
|
<!-- I can't use position="move" because it would match another field in an embedded tree view -->
|
||||||
<field name="location_src_id" groups="stock.group_stock_multi_locations" options="{'no_create': True}" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
<field name="location_src_id" groups="stock.group_stock_multi_locations" options="{'no_create': True}" readonly="state != 'draft'"/>
|
||||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations" options="{'no_create': True}" attrs="{'readonly': [('state', 'in', ('done', 'cancel'))]}"/>
|
<field name="location_dest_id" groups="stock.group_stock_multi_locations" options="{'no_create': True}" readonly="state in ('done', 'cancel')"/>
|
||||||
</field>
|
</field>
|
||||||
<!-- It is important to remove the original field location_dest_id
|
<!-- It is important to remove the original field location_dest_id
|
||||||
and not just set it as invisible because it cancels the changes -->
|
and not just set it as invisible because it cancels the changes -->
|
||||||
@@ -24,13 +24,6 @@
|
|||||||
<xpath expr="//page[@name='miscellaneous']/group/group/field[@name='location_src_id']" position="attributes">
|
<xpath expr="//page[@name='miscellaneous']/group/group/field[@name='location_src_id']" position="attributes">
|
||||||
<attribute name="invisible">1</attribute>
|
<attribute name="invisible">1</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//page[@name='miscellaneous']/group/group/field[@name='date_deadline']" position="after">
|
|
||||||
<field name="date_start"/>
|
|
||||||
<field name="date_finished"/>
|
|
||||||
</xpath>
|
|
||||||
<button name="action_cancel" type="object" attrs="{'invisible': ['|', '|', ('id', '=', False), ('state', 'in', ('done', 'cancel')), ('confirm_cancel', '=', True)]}" position="attributes">
|
|
||||||
<attribute name="confirm">Are you sure you want to cancel this manufacturing order?</attribute>
|
|
||||||
</button>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2016-2022 Akretion (http://www.akretion.com/)
|
Copyright 2016-2024 Akretion France (https://www.akretion.com/)
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
@@ -11,10 +11,10 @@
|
|||||||
<field name="model">stock.move</field>
|
<field name="model">stock.move</field>
|
||||||
<field name="inherit_id" ref="stock.view_move_form" />
|
<field name="inherit_id" ref="stock.view_move_form" />
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="origin" position="after">
|
<group name="origin_grp" position="inside">
|
||||||
<field name="production_id"/>
|
<field name="production_id"/>
|
||||||
<field name="raw_material_production_id"/>
|
<field name="raw_material_production_id"/>
|
||||||
</field>
|
</group>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user