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

[17.0][MIG]ddmrp #447

Closed
wants to merge 500 commits into from
Closed

[17.0][MIG]ddmrp #447

wants to merge 500 commits into from

Conversation

Vandan-OSI
Copy link

No description provided.

JordiBForgeFlow and others added 30 commits May 6, 2024 15:06
* Call commit once per chunk instead of once per record: commit flushes
  and clears the env, forcing a fetch of all the records of the chunk
  after each line.
* Remove `buffer.refresh()` in cron_ddmrp(): this deprecated method
  calls `invalidate_cache()` without ids and field names, which forces
  a fetch of all the records of the chunk at each line. If it is
  required to invalidate something (but I could not find any
  explanation), we should invalidate only the ids and fields that needs
  invalidation (hopefully only non-stored computed fields). Or at the
  very least, do not fetch the 50 records of the browse at once but one
  by one (but that'd be a pity).

The duration of cron_ddmrp() (when generating jobs with
ddmrp_cron_actions_as_job) goes from 8 minutes to 35 seconds.
Fix tests:

* test_22_procure_recommended
* test_23_buffer_zones_all

It is possible that the invalidation is only required because of the
tests and would not be required at runtime. But this has been proposed
in the past: OCA#59

However, this commit tries to invalidate the less possible fields to
limit the computations and data to fetch again.
To remove the duplicate implementation of
StockLocation.is_sublocation_of()
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: ddmrp-13.0/ddmrp-13.0-ddmrp
Translate-URL: https://translation.odoo-community.org/projects/ddmrp-13-0/ddmrp-13-0-ddmrp/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: ddmrp-13.0/ddmrp-13.0-ddmrp
Translate-URL: https://translation.odoo-community.org/projects/ddmrp-13-0/ddmrp-13-0-ddmrp/
…quence.

When the current transaction changed the sequence, it may happen
that the sellers' recordset is not correctly sorted by default.
Doing it explicitly solves the problem.
This is to be closer to how it works in Odoo standard.

So supplier wich are specific to the variant or not are
taken into account.
Default prioritization in DDMRP is color first, NFP percentage(!)
second.
Set a tolerance value to apply to quantity multiple in stock
buffers. If the quantity needed is below this tolerance
threshold, the recommended quantity will be reduced a bit
instead of adding another bucket. The value is a percentage
of the quantity multiple.
The error "Error while parsing JSON SyntaxError: Unexpected token ' in
JSON at position 1" was logged in the console when for example the field
contains a {'no_create': True}. This is not a JSON valid string.
Changed to use the same parsing as in odoo basic_view.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: ddmrp-14.0/ddmrp-14.0-ddmrp
Translate-URL: https://translation.odoo-community.org/projects/ddmrp-14-0/ddmrp-14-0-ddmrp/
Add a configurable time for replenishment procurement on the profile.
This time is added to the planned datetime for the new moves, so they
are considered late when the replenishment time is overpassed.

To be able to do this, I had to change the "date_planned" field on
the procurement wizard from Date to Datetime.

When there is a calendar, takes the first working hour of the day and
add the max procurement time to it.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: ddmrp-14.0/ddmrp-14.0-ddmrp
Translate-URL: https://translation.odoo-community.org/projects/ddmrp-14-0/ddmrp-14-0-ddmrp/
LoisRForgeFlow and others added 23 commits May 6, 2024 15:06
A test case is added to avoid regressions.
When we compute DLT for manufactured buffers, we need to consider the location from where we are computing. If the buffered products change between one location and another, the DLTs will be different.
* When computing a recordset, first dlt is used for all buffers disregarding location.
* Add a small test for the above case.
* Fix access rights issue to change context location wizard.
* Add small message in change location wizard to improve user understanding.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: ddmrp-16.0/ddmrp-16.0-ddmrp
Translate-URL: https://translation.odoo-community.org/projects/ddmrp-16-0/ddmrp-16-0-ddmrp/
Currently translated at 100.0% (330 of 330 strings)

Translation: ddmrp-16.0/ddmrp-16.0-ddmrp
Translate-URL: https://translation.odoo-community.org/projects/ddmrp-16-0/ddmrp-16-0-ddmrp/it/
Currently translated at 100.0% (330 of 330 strings)

Translation: ddmrp-16.0/ddmrp-16.0-ddmrp
Translate-URL: https://translation.odoo-community.org/projects/ddmrp-16-0/ddmrp-16-0-ddmrp/es/
Scheduler task can reorder from orderpoints, so we also take care of
disable auto reorderpoint creation for positions that already have
a stock buffer. A test case is added too.
- Propoer inheritance of create method.

"WARNING The model odoo.addons.ddmrp.models.mrp_production is not overriding the create method in batch"

- Same label for two fields.

"WARNING Two fields (top_of_red, red_zone_qty) of stock.buffer() have the same label: Red Zone Qty. [Modules: ddmrp and ddmrp] "
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: ddmrp-16.0/ddmrp-16.0-ddmrp
Translate-URL: https://translation.odoo-community.org/projects/ddmrp-16-0/ddmrp-16-0-ddmrp/
A new test case is added to highlight the problem.
Currently translated at 100.0% (332 of 332 strings)

Translation: ddmrp-16.0/ddmrp-16.0-ddmrp
Translate-URL: https://translation.odoo-community.org/projects/ddmrp-16-0/ddmrp-16-0-ddmrp/it/
Currently translated at 100.0% (332 of 332 strings)

Translation: ddmrp-16.0/ddmrp-16.0-ddmrp
Translate-URL: https://translation.odoo-community.org/projects/ddmrp-16-0/ddmrp-16-0-ddmrp/es/
When there is qty in progress (e.g. RfQ sent), do not keep
auto-procuring small quantities, wait for the qty to be at least GZ.
Currently translated at 100.0% (332 of 332 strings)

Translation: ddmrp-16.0/ddmrp-16.0-ddmrp
Translate-URL: https://translation.odoo-community.org/projects/ddmrp-16-0/ddmrp-16-0-ddmrp/es_AR/
@Vandan-OSI Vandan-OSI marked this pull request as draft May 6, 2024 09:56
@Vandan-OSI Vandan-OSI marked this pull request as ready for review May 10, 2024 12:32
@LoisRForgeFlow
Copy link
Contributor

Superseded by #460

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.

None yet