mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[MIG] mrp_default_workorder_time: Migration to 16.0
This commit is contained in:
@@ -23,7 +23,7 @@ MRP Default Workorder Time
|
||||
:target: https://runbot.odoo-community.org/runbot/129/14.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
There are occasions when the registration of work orders is not completed with the correct times, this module allows you to configure a threshold percentage that assigns the projected time as fully productive time if a work time less than this percentage is detected.
|
||||
|
||||
@@ -35,7 +35,7 @@ There are occasions when the registration of work orders is not completed with t
|
||||
Usage
|
||||
=====
|
||||
|
||||
In the production module configurations, the "Record minimum order time" feature must be activated, by default the minimum percentage is ten but it can be changed as needed.
|
||||
In the production module configurations, the "Record standard projected order time" feature must be activated, by default the minimum percentage is ten but it can be changed as needed.
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
@@ -79,7 +79,7 @@ promote its widespread use.
|
||||
|
||||
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
||||
|
||||
|maintainer-ChrisOForgeFlow|
|
||||
|maintainer-ChrisOForgeFlow|
|
||||
|
||||
This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/14.0/mrp_default_workorder_time>`_ project on GitHub.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
{
|
||||
"name": "MRP Default Workorder Time",
|
||||
"version": "14.0.1.0.0",
|
||||
"version": "16.0.1.0.0",
|
||||
"development_status": "Beta",
|
||||
"license": "LGPL-3",
|
||||
"author": "ForgeFlow, Odoo Community Association (OCA)",
|
||||
|
||||
@@ -1 +1 @@
|
||||
In the production module configurations, the "Record minimum order time" feature must be activated, by default the minimum percentage is ten but it can be changed as needed.
|
||||
In the production module configurations, the "Record standard projected order time" feature must be activated, by default the minimum percentage is ten but it can be changed as needed.
|
||||
|
||||
@@ -67,7 +67,8 @@ class TestMrpDefaultWorkorderTime(common.TestMrpCommon):
|
||||
ctx.update(res.get("context", {}))
|
||||
wizard_form = Form(self.env["mrp.immediate.production"].with_context(**ctx))
|
||||
wizard = wizard_form.save()
|
||||
wizard.process()
|
||||
if mo.company_id.use_projected_time_work_orders:
|
||||
wizard.process()
|
||||
|
||||
def test_mrp_default_workorder_time(self):
|
||||
self.stock_location = self.env.ref("stock.stock_location_stock")
|
||||
|
||||
@@ -1,56 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<record id="res_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.view.form.inherit.mrp</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="mrp.res_config_settings_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@id='security_lead_time']" position="after">
|
||||
<div class="col-lg-6 col-12 o_setting_box" id="security_lead_time">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="use_projected_time_work_orders" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
string="Record standard projected order time"
|
||||
for="minimum_order_time_threshold"
|
||||
/>
|
||||
<span
|
||||
class="fa fa-lg fa-building-o"
|
||||
title="Values set here are company-specific."
|
||||
role="img"
|
||||
aria-label="Values set here are company-specific."
|
||||
groups="base.group_multi_company"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
If time recorded on workorder is not between this percentages, projected time will be used instead
|
||||
</div>
|
||||
<div
|
||||
class="content-group"
|
||||
attrs="{'invisible': [('use_projected_time_work_orders','=',False)]}"
|
||||
>
|
||||
<div class="mt16">
|
||||
Minimum:
|
||||
<field
|
||||
name="minimum_order_time_threshold"
|
||||
class="oe_inline"
|
||||
/> %
|
||||
</div>
|
||||
<div class="mt16">
|
||||
Maximum:
|
||||
<field
|
||||
name="maximum_order_time_threshold"
|
||||
class="oe_inline"
|
||||
/> %
|
||||
</div>
|
||||
<record id="res_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.view.form.inherit.mrp</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="mrp.res_config_settings_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@id='security_lead_time']" position="after">
|
||||
<div class="col-lg-6 col-12 o_setting_box" id="security_lead_time">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="use_projected_time_work_orders" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
string="Record standard projected order time"
|
||||
for="minimum_order_time_threshold"
|
||||
/>
|
||||
<span
|
||||
class="fa fa-lg fa-building-o"
|
||||
title="Values set here are company-specific."
|
||||
role="img"
|
||||
aria-label="Values set here are company-specific."
|
||||
groups="base.group_multi_company"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
If time recorded on workorder is not between this percentages, projected time will be used instead
|
||||
</div>
|
||||
<div
|
||||
class="content-group"
|
||||
attrs="{'invisible': [('use_projected_time_work_orders','=',False)]}"
|
||||
>
|
||||
<div class="mt16">
|
||||
Minimum:
|
||||
<field
|
||||
name="minimum_order_time_threshold"
|
||||
class="oe_inline"
|
||||
/> %
|
||||
</div>
|
||||
<div class="mt16">
|
||||
Maximum:
|
||||
<field
|
||||
name="maximum_order_time_threshold"
|
||||
class="oe_inline"
|
||||
/> %
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user