Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] mrp_multi_level #1411

Open
wants to merge 299 commits into
base: 18.0
Choose a base branch
from

Conversation

JasminSForgeFlow
Copy link
Contributor

Standard Migration

@ForgeFlow

@LoisRForgeFlow
Copy link
Contributor

@JasminSForgeFlow Just today, we merged some changes and 2 new commits that you need to include here https://github.com/OCA/manufacture/commits/17.0/mrp_multi_level. Could you do it?

Copy link

@RicardCForgeFlow RicardCForgeFlow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @JasminSForgeFlow , small changes that might improve the readme:

@@ -0,0 +1,9 @@
## MRP Areas

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## MRP Areas
### MRP Areas

- Go to *Manufacturing \> Configuration \> MRP Areas* and define or edit
any existing area. You can specify the working hours for every area.

## Product MRP Area Parameters

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Product MRP Area Parameters
### Product MRP Area Parameters

@@ -0,0 +1,12 @@
To manually run the MRP scheduler:

1. Go to *Manufacturing \> Operations \> Run MRP Multi Level*.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Go to *Manufacturing \> Operations \> Run MRP Multi Level*.
1. Go to *Manufacturing \> Planning \> Run MRP Multi Level*.


To launch replenishment orders (moves, purchases, production orders...):

1. Go to *Manufacturing \> Operations \> MRP Inventory*.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Go to *Manufacturing \> Operations \> MRP Inventory*.
1. Go to *Manufacturing \> Planning \> MRP Inventory*.

)

@api.model
def _name_search(self, name, domain=None, operator="ilike", limit=None, order=None):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-18.0#:~:text=_name_search%20is%20gone%2C%20replaced%20by%20_search_display_name.

Maybe we should replace this:

Suggested change
def _name_search(self, name, domain=None, operator="ilike", limit=None, order=None):
def _search_display_name(self, name, domain=None, operator="ilike", limit=None, order=None):

],
]
)
return super()._name_search(name, domain, operator, limit, order)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return super()._name_search(name, domain, operator, limit, order)
return super()._search_display_name(name, domain, operator, limit, order)

)
self.assertNotEqual(this.create_uid, prev.create_uid)

def test_11_special_scenario_1(self):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit silly, but we could change the number of the tests, it seems that there is no number 10.

Suggested change
def test_11_special_scenario_1(self):
def test_10_special_scenario_1(self):

If we do this we should change them all > 11

Copy link

@RicardCForgeFlow RicardCForgeFlow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion for matching id and name

@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record model="ir.ui.view" id="mrp_area_tree">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<record model="ir.ui.view" id="mrp_area_tree">
<record model="ir.ui.view" id="mrp_area_list">

<field name="res_model">mrp.area</field>
<field name="type">ir.actions.act_window</field>
<field name="view_mode">list,form</field>
<field name="view_id" ref="mrp_area_tree" />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<field name="view_id" ref="mrp_area_tree" />
<field name="view_id" ref="mrp_area_list" />

</form>
</field>
</record>
<record id="mrp_inventory_tree" model="ir.ui.view">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<record id="mrp_inventory_tree" model="ir.ui.view">
<record id="mrp_inventory_list" model="ir.ui.view">

<field name="res_model">mrp.inventory</field>
<field name="type">ir.actions.act_window</field>
<field name="view_mode">list,form,pivot,graph</field>
<field name="view_id" ref="mrp_inventory_tree" />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<field name="view_id" ref="mrp_inventory_tree" />
<field name="view_id" ref="mrp_inventory_list" />

@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="mrp_move_view_tree" model="ir.ui.view">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<record id="mrp_move_view_tree" model="ir.ui.view">
<record id="mrp_move_view_list" model="ir.ui.view">

<!-- Copyright 2019-20 ForgeFlow S.L. (https://www.forgeflow.com)
Part of ForgeFlow. See LICENSE file for full copyright and licensing details. -->
<odoo>
<record id="mrp_planned_order_view_tree" model="ir.ui.view">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<record id="mrp_planned_order_view_tree" model="ir.ui.view">
<record id="mrp_planned_order_view_list" model="ir.ui.view">

@@ -0,0 +1,183 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record model="ir.ui.view" id="product_mrp_area_tree">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<record model="ir.ui.view" id="product_mrp_area_tree">
<record model="ir.ui.view" id="product_mrp_area_list">

<field name="res_model">product.mrp.area</field>
<field name="type">ir.actions.act_window</field>
<field name="view_mode">list,form</field>
<field name="view_id" ref="product_mrp_area_tree" />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<field name="view_id" ref="product_mrp_area_tree" />
<field name="view_id" ref="product_mrp_area_list" />

OCA-git-bot and others added 26 commits December 4, 2024 09:42
* You can know integrate with different forecasting mechanisms.
  As a consequence integration with stock_demand_estimate is moved
  to a new module (mrp_multi_level_estimate).
* As agreed by the authors, the module is re-licensed to LGPL-3.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: manufacture-12.0/manufacture-12.0-mrp_multi_level
Translate-URL: https://translation.odoo-community.org/projects/manufacture-12-0/manufacture-12-0-mrp_multi_level/
add another exclude point at planned order creation.
Currently translated at 67.1% (100 of 149 strings)

Translation: manufacture-12.0/manufacture-12.0-mrp_multi_level
Translate-URL: https://translation.odoo-community.org/projects/manufacture-12-0/manufacture-12-0-mrp_multi_level/es/
demand moves have the same date it can happen that the supply is
effectively ignored if considered as staring move of the
grouping and there are more groups to be done after it.

A test case include in this fix depicts in detail the
the problem and ensures no regression.
Currently translated at 3.4% (5 of 149 strings)

Translation: manufacture-12.0/manufacture-12.0-mrp_multi_level
Translate-URL: https://translation.odoo-community.org/projects/manufacture-12-0/manufacture-12-0-mrp_multi_level/hr/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: manufacture-13.0/manufacture-13.0-mrp_multi_level
Translate-URL: https://translation.odoo-community.org/projects/manufacture-13-0/manufacture-13-0-mrp_multi_level/
…sition. It isn't the most common filter used.
OCA-git-bot and others added 22 commits December 4, 2024 09:42
- Index the planned_order_id column on mrp.production model
- Delete from mrp.planned.order before deleting from mrp.inventory
fixes OCA#1362

Ignoring qty_available for phantom products prevents double counting the
qty_available of components.

Creating planned orders for phantom products is simpler than recursively
exploding phantom BOMs. This also makes it easier to analyze the planning data
generated by the MRP calculation.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: manufacture-17.0/manufacture-17.0-mrp_multi_level
Translate-URL: https://translation.odoo-community.org/projects/manufacture-17-0/manufacture-17-0-mrp_multi_level/
fixes OCA#1366

Using the _bom_find() method, we get the BOM with lowest sequence, whether it's a variant
BOM or a template BOM (no product_id).
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: manufacture-17.0/manufacture-17.0-mrp_multi_level
Translate-URL: https://translation.odoo-community.org/projects/manufacture-17-0/manufacture-17-0-mrp_multi_level/
Currently translated at 100.0% (170 of 170 strings)

Translation: manufacture-17.0/manufacture-17.0-mrp_multi_level
Translate-URL: https://translation.odoo-community.org/projects/manufacture-17-0/manufacture-17-0-mrp_multi_level/it/
_should_create_planned_order hook was unnoticely removed in
33cf4af as it was not needed
anymore in the base module. However it is still an extension point
that can be used.
When you procure a kit, it doesn't matter what the route configuration
is on the product itself but on its children, so it is not needed to
check anything else but the BoM to assign the 'phantom' supply
method.

Also do not assign a BoM when the supply method is not phantom or manufacture.
After odoo/odoo@1ed6dbe
we need to explicitly set routes in the propoer order becouse while
in the cache there are not yet sorted by sequence (it requires flush
to the database, which we cannot do in a test).
ChrisOForgeFlow is not longer active.
@JasminSForgeFlow JasminSForgeFlow force-pushed the 18.0-mig-mrp_multi_level branch from 9a92653 to e848f2e Compare December 4, 2024 04:41
@JasminSForgeFlow
Copy link
Contributor Author

@JasminSForgeFlow Just today, we merged some changes and 2 new commits that you need to include here https://github.com/OCA/manufacture/commits/17.0/mrp_multi_level. Could you do it?

Done, Thanks

@JasminSForgeFlow
Copy link
Contributor Author

Hi @JasminSForgeFlow , small changes that might improve the readme:

Done, Thanks


### Product MRP Area Parameters

- Go to *Manufacturing \> Master Data \> Product MRP Area Parameters*

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Little change here:

Suggested change
- Go to *Manufacturing \> Master Data \> Product MRP Area Parameters*
- Go to *Manufacturing \> Products \> Product MRP Area Parameters*

<group colspan="4" col="2">
<group>
<field name="active" invisible="1" />
<field name="warehouse_id" />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Jasmin,

We could adjust this to avoid a small bug that occurs when clicking "New" on the warehouse_id field if the Storage Locations setting is not active. Let me know what you think! 😊

Peek 2024-12-05 16-50

Suggested change
<field name="warehouse_id" />
<field name="warehouse_id"
options="{'no_create': True, 'no_create_edit': True}"
force_save="1"/>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a separate PR about that small issue: #1424. Maybe it's better to keep it separated from the migration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.