Giter Site home page Giter Site logo

ddmrp's Introduction

Runboat Pre-commit Status Build Status codecov Translation Status

ddmrp

TODO: add repo description.

Available addons

addon version maintainers summary
ddmrp 16.0.1.8.4 JordiBForgeFlow LoisRForgeFlow ChrisOForgeFlow Demand Driven Material Requirements Planning
ddmrp_adjustment 16.0.1.5.0 JordiBForgeFlow LoisRForgeFlow Allow to apply factor adjustments to buffers.
ddmrp_chatter 16.0.1.1.1 Adds chatter and activities to stock buffers.
ddmrp_cron_actions_as_job 16.0.1.0.0 Run DDMRP Buffer Calculation as jobs
ddmrp_exclude_moves_adu_calc 16.0.1.0.1 JordiBForgeFlow LoisRForgeFlow Define additional rules to exclude certain moves from ADU calculation
ddmrp_exclude_moves_adu_calc_sales 16.0.1.0.1 DavidJForgeFlow DDMRP Exclude Moves ADU Calc integration with Sales app.
ddmrp_history 16.0.1.2.0 JordiBForgeFlow LoisRForgeFlow Allow to store historical data of DDMRP buffers.
ddmrp_product_replace 16.0.1.1.0 JordiBForgeFlow LoisRForgeFlow Provides a assisting tool for product replacement.
ddmrp_report_part_flow_index 16.0.1.3.0 JordiBForgeFlow LoisRForgeFlow Provides the DDMRP Parts Flow Index Report
ddmrp_sale 16.0.1.0.0 LoisRForgeFlow DDMRP integration with Sales app.
ddmrp_warning 16.0.1.2.2 LoisRForgeFlow Adds configuration warnings on stock buffers.
stock_buffer_route 16.0.1.2.0 Allows to force a route to be used when procuring from Stock Buffers
stock_buffer_sales_analysis 16.0.1.0.0 Allows to access the Sales Analysis from Stock Buffers

Licenses

This repository is licensed under AGPL-3.0.

However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA) policy. Consult each module's __manifest__.py file, which contains a license key that explains its license.


OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

ddmrp's People

Contributors

alexpforgeflow avatar bernatpforgeflow avatar chrisoforgeflow avatar davidbforgeflow avatar davidjforgeflow avatar didierdonze avatar grindtildeath avatar guewen avatar hitrosol avatar hparfr avatar hviorforgeflow avatar i-vyshnevska avatar ibuioli avatar ivorra78 avatar jbaudoux avatar jordibforgeflow avatar kv1612 avatar loisrforgeflow avatar marcelsavegnago avatar mmequignon avatar mymage avatar oca-git-bot avatar oca-transbot avatar oca-travis avatar sbidoul avatar sebalix avatar stephanrozendaal avatar tdu avatar thiagomforgeflow avatar weblate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ddmrp's Issues

Uncaught Error: JSON object has wrong type string

In the land of indecipherable error messages, this one looks even more above average. It identifies as a Bokeh error - I have Bokeh installed. Going into Master Data > Stock Buffer Planning is fine:
image
When I click on the first item in my list I get the following error:

Error:
Uncaught Error: JSON object has wrong type string

https://mwands.us/web/content/51378-9870550/web.assets_backend.js:6753
Traceback:
Error: JSON object has wrong type string
at Function.Document.from_json (https://mwands.us/web/content/51378-9870550/web.assets_backend.js:4794:272)
at Object.exports.embed_items (https://mwands.us/web/content/51378-9870550/web.assets_backend.js:4824:182)
at embed_document (eval at (https://mwands.us/web/content/51095-5f8ed01/web.assets_common.js:625:213), :10:28)
at eval (eval at (https://mwands.us/web/content/51095-5f8ed01/web.assets_common.js:625:213), :14:13)
at eval (eval at (https://mwands.us/web/content/51095-5f8ed01/web.assets_common.js:625:213), :29:11)
at Object.safely (https://mwands.us/web/content/51378-9870550/web.assets_backend.js:6752:12)
at fn (eval at (https://mwands.us/web/content/51095-5f8ed01/web.assets_common.js:625:213), :4:13)
at eval (eval at (https://mwands.us/web/content/51095-5f8ed01/web.assets_common.js:625:213), :32:43)
at eval (eval at (https://mwands.us/web/content/51095-5f8ed01/web.assets_common.js:625:213), :34:5)
at eval ()

Persistent memory limits reached, server restartes, etc, with DDMRP Odoo 13 code

Module

DDMRP

Describe the bug

There are several bugs that may all be tied together. Originally I had noticed that DDMRP de-activated all crons. Well I found out finally that this was because it pretty quickly hits the memory limit on an odoo.sh install with 8 workers activated. This is without QUEUE installed and just 1 buffer profile.

Also, when you create a buffer profile and go to edit it, it restarts the server on save when you change lead time or cycle time. The only way to edit a buffer profile after creation is to re-import it over or do a mass_edit.

This also causes memory limit issues.

I put this on an external test server with 32GB of ram and maxed out odoo config and I had the same issue. Once the server hits the memory limit it goes into a restart loop and will not settle down until DDMRP is entirely uninstalled. There is a memory leak somewhere. Anyone else having these issues?

To Reproduce

Affected versions:

Odoo 13 so far . . .

Steps to reproduce the behavior:

  1. Install DDMRP
  2. Have odoo.sh studio installed, enterprise edition . . .
  3. Create a profile.
  4. Edit the profile (you will see the the server reboot.
  5. Wait till some crons run, eventually you will see memory limits hit and server reboot cycle start.

I noticed this memory leak also directly on the machine stats. It will fill the ram entirely with junk "cache" data that I would then manually purge each night . . . It degraded the server for sure.

Expected behavior

Ideally DDMRP would act friendly RAM-wise . . . It's possibly interacting with some other module here (MRP related maybe) but not sure . . . I would love other's experience here or if they have similar issues.

[CI] FAIL: TestDdmrp.test_04_adu_calculation_window_past_calendar

Travis is failing from time to time on a unit test:

Traceback (most recent call last):
  File "/home/travis/build/OCA/ddmrp/ddmrp/tests/test_ddmrp.py", line 123, in test_04_adu_calculation_window_past_calendar
    self.assertAlmostEqual(self.buffer_a.adu, to_assert_value, places=2)
AssertionError: 6.667 != 8.333333333333334 within 2 places

Migration to version 15.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-15.0

Modules to migrate

Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list

run mrp multi level raise UserError

raise UserError ```

Error:
Odoo Server Error

Traceback (most recent call last):
File "E:_odoo\odoo\odoo\http.py", line 650, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "E:_odoo\odoo\odoo\http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "E:_odoo\odoo\odoo\tools\pycompat.py", line 87, in reraise
raise value
File "E:_odoo\odoo\odoo\http.py", line 692, in dispatch
result = self._call_function(**self.params)
File "E:_odoo\odoo\odoo\http.py", line 342, in _call_function
return checked_call(self.db, *args, **kwargs)
File "E:_odoo\odoo\odoo\service\model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "E:_odoo\odoo\odoo\http.py", line 335, in checked_call
result = self.endpoint(*a, **kw)
File "E:_odoo\odoo\odoo\http.py", line 936, in call
return self.method(*args, **kw)
File "E:_odoo\odoo\odoo\http.py", line 515, in response_wrap
response = f(*args, **kw)
File "E:_odoo\odoo\addons\web\controllers\main.py", line 938, in call_button
action = self._call_kw(model, method, args, {})
File "E:_odoo\odoo\addons\web\controllers\main.py", line 926, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "E:_odoo\odoo\odoo\api.py", line 689, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "E:_odoo\odoo\odoo\api.py", line 680, in call_kw_multi
result = method(recs, *args, **kwargs)
File "e:_odoo\ddmrp\mrp_multi_level\wizards\mrp_multi_level.py", line 768, in run_mrp_multi_level
self._mrp_final_process()
File "e:_odoo\ddmrp\mrp_multi_level\wizards\mrp_multi_level.py", line 736, in _mrp_final_process
self._init_mrp_inventory(mrp_product)
File "e:_odoo\ddmrp\mrp_multi_level\wizards\mrp_multi_level.py", line 678, in _init_mrp_inventory
group['mrp_date:day'])
File "e:_odoo\ddmrp\mrp_multi_level\wizards\mrp_multi_level.py", line 644, in _convert_group_date_to_default
locale.setlocale(locale.LC_TIME, 'en_GB.UTF-8')
File "C:\Python35\lib\locale.py", line 594, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting

[11.0] Roadmap

  • Strategic Inventory Positioning
    • Display the parent-child relationships in the critical path, in the BOM Matrix
  • Buffer Profiles and Levels
    • Blended ADU calculation method.
    • ADU Exceptions
    • Fix min-max calculation method
  • Dynamic Adjustments
    • Zone Adjustment Factor (option for days of DLT and factor)
  • Demand Driven Planning
    • Long term Order spike horizon and spike threshold
    • Setting different Order Spike Threshold criteria (now 50% of TOG is the only supported)
    • Implement proper MRP for Decoupled Explosion, instead of MTO rules. Possibly implementing https://github.com/Eficent/manufacture/tree/8.0-multi_level_mrp or a more recent version from Wim Audenaert.
  • Visible and Collaborative Execution
    • Prioritized share
    • Lead time Alerts
    • Projected On-hand Alert
    • Material synchronization alert for dependent points.
  • Analytics
    • On-hand Performance Run Chart from $ perspective
    • Parts Flow Index Chart
    • On-Hand Position Distribution Chart
    • Suppliers Disruption Report
    • Add more fields to history: ADU, qualified demand...
  • Demand Driven Model Projections
  • Technical
    • Use queues to run the recalculated buffer adjustments near real time.
    • Identify performance bottlenecks and improve (database indexes, code optimization)

PRs:

`ddmrp`: about qualified demand computation and multi-steps delivery route

Module

Question/issue about ddmrp module.

Bug description

Hi, we encountered an issue lately with the qualified demand computed on buffers. Right now - if I'm not wrong - it is computed from outgoing moves like delivery ones within a given horizon.

In standard Odoo this is working well with a "Ship only" delivery route, as goods are reserved as soon as SO are confirmed, so the reserved qties are removed from the qualified demand with this line in _get_demand_by_days:

            demand_by_days[date] += move.product_qty - move.reserved_availability

If the WH is configured with several delivery steps, this starts to give an unexpected qualified demand:

  1. SO is confirmed, generating e.g. pick/ship transfers
  2. Goods of PICK are reserved
  3. Goods of OUT aren't reserved, as such they are include in the qualified demand computation

Expected behavior

We think the goods of outgoing moves having ancestors with reservation should not be part of the qualified demand as we are about to ship the goods, or at least they are reserved by ancestor moves on this purpose.

Additional context
In details we face this issue in the following scenario that implies the moves release mechanism:

  1. SO is confirmed, OUT moves are generated (without ancestor moves nor reservation as it is not yet released)
  2. OUT moves are then included in the qualified demand computation as expected
  3. We release the OUT moves, and start to work on the PICK (goods reserved)
  4. We refresh the buffer and its qualified demand still include the qty of the OUT move
  5. We validate the PICK so the goods are now reserved on the OUT move
  6. We refresh the buffer again and its qualified demand gets updated as the qty of the OUT has been removed

This behavior was quite confusing for users when they refresh the buffer manually during the working day. Generally buffers are automatically refreshed during the night, and operations released in the morning and processed during the day so in this case there it is working fine.

About solutions
I was thinking about a new module not tied to DDMRP that adds a computed field on stock.move to get the reserved qties based on the ancestor moves (let's call it reserved_availability_in_preparation, and use this field instead of reserved_availability in _get_demand_by_days to not include the reserved qty of ancestor moves in the qualified demand.

Or are we doing something wrong here?

cc @LoisRForgeFlow @JordiBForgeFlow

Migration to version 11.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-11.0

Dependencies

OCA/web#739

  • web_tree_many2one_clickable - not needed, OCA/web#872
  • web_widget_x2many_2d_matrix - OCA/web#871
  • web_widget_bokeh_chart - by @arkostyuk
  • web_tree_dynamic_colored_field - by @arkostyuk

OCA/manufacture#226

OCA/manufacture-reporting#31

  • report_mrp_bom_matrix - by @mpanarin
  • mrp_bom_current_stock

OCA/server-tools#1008

OCA/stock-logistics-warehouse#343

Modules to migrate

  • ddmrp
  • ddmrp_history
  • ddmrp_adjustment
  • ddmrp_product_replace

ddmrp (or another dependency) disables scheduled actions or conflicts with another module to do this - v13 odoo.sh production

After install of DDMRP + of the base dependancies for DDMRP scheduled actions will not run or update their next-trigger date/time. They can run manually only. This is only apparent in production mode not test mode. Uninstalling DDMRP (v13) re-activates scheduled actions. I don't know where to hunt for the specific code that causes this error. A pointer on where to hunt would be good so I can give more info on the specifics and see if it's a conflict with another non-related module.

best regards,
Walker

Issue with travis runs

Hi @sbidoul

See the travis error here: https://travis-ci.com/github/OCA/ddmrp/jobs/512452958#L280 (from #144). I'm a bit clueless with this error:

An error has occurred: InvalidManifestError: 
=====> /home/travis/.cache/pre-commit/repoxgp2w5r8/.pre-commit-hooks.yaml is not a file
Check the log at /home/travis/.cache/pre-commit/pre-commit.log
The command "pre-commit run --all --show-diff-on-failure --verbose --color always" exited with 1.
cache.2
store build cache
0.00s16.37schanges detected (content changed, file is created, or file is deleted):\n/home/travis/.cache/pip/http/0/1/a/b/3/01ab38ac63d82e82f212dd86d62de883eb0d7de6be8db88f70d14a62
/home/travis/.cache/pip/http/2/d/b/3/c/2db3ca0aac189d864edaa74ee6b1ae0ba1b31b6368bee6fd352c97fb
/home/travis/.cache/pip/http/2/d/c/1/a/2dc1a454abdf8e974808c7a069c7e3eabb865ef213a583b64124e598
/home/travis/.cache/pip/http/2/e/5/b/6/2e5b6ced06806dcc8a76919087cfc0d76c4240a8acb8d34511ad15d6
/home/travis/.cache/pip/http/4/a/1/b/f/4a1bf8b4ff9043ded328f5cac498e6f3c8c0fe5becdeb129446a30f1
/home/travis/.cache/pip/http/6/b/7/2/b/6b72bc22197ff4a8a63d7bc6be71fa50888c9410fb173e94fa1ae3c6
/home/travis/.cache/pip/http/7/c/5/f/d/7c5fdb859c648569518ff79421574b19a2873cf03dcff1a8a701e65f
/home/travis/.cache/pip/http/a/7/8/6/c/a786cf27e197b037398513b03dedfbdf8e71a46f1d495256b0e80634
/home/travis/.cache/pip/http/b/8/6/2/6/b862637a242a4033f1ba3be874e038f3a95ab29277da4c878f7c162d
/home/travis/.cache/pip/http/c/0/e/8/5/c0e854830132b4466a4ad702e2f7168f1253a791e391b297676ef2cd
/home/travis/.cache/pip/http/e/b/e/7/a/e\n...
changes detected, packing new archive
uploading PR.144/cache--linux-xenial-9b1be75286f4da7103f03fc6ecc721d9d90f5fe8323af7e852535f4c21f443d5--python-3.6.tgz
cache uploaded
travis_run_after_success: command not found
travis_run_after_failure: command not found
travis_run_after_script: command not found
travis_run_finish: command not found
Done. Your build exited with 1.

Do you have any idea what has changed that made this error appear?

Thanks!

enhancement in version 13

we'd suggest this enhancement in stock.buffer class for taking into account draft manufacturing order also:
def _quantity_in_progress(self):
"""Return Quantities that are not yet in virtual stock but should
be deduced from buffers (example: purchases created from buffers)"""
res = dict(self.mapped(lambda x: (x.id, 0.0)))
polines = self.env["purchase.order.line"].search(
[
("state", "in", ("draft", "sent", "to approve")),
("buffer_ids", "in", self.ids),
]
)
for poline in polines:
for buffer in poline.buffer_ids:
res[buffer.id] += poline.product_uom._compute_quantity(
poline.product_qty, buffer.product_uom, round=False
)

    morders = self.env["mrp.production"].search(
        [
            ("state", "=", "draft"),
            ("buffer_id", "in", self.ids),
        ]
    )
    for morder in morders:
        res[morder.buffer_id.id] += morder.product_uom_id._compute_quantity(
            morder.product_qty, morder.buffer_id.product_uom, round=False
        )
    return res

regards

Migration to version 16.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-16.0

Modules to migrate

Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list

Unable to install module "web_widget_bokeh_chart"

Hi,
I'm trying to install DDMRP in Odoo CE 11 on Ubuntu Server 18.04 LTS and appears this error:
Unable to install module "web_widget_bokeh_chart" because an external dependency is not met: No module named bokeh.
I already installed bokeh library and the error persist.

Inventory Staging Inclusion

Many companies now days have external fulfillment warehouses (that need to be set as the main warehouse for buffer calcs for DOs to customer moves). Is there way with DDMRP to continue to calculate from Warehouse A for daily moves but add Warehouse A and Warehouse B for total product available? This way if a receipt is expected to come to Warehouse B and then be disseminated to Warehouse A after inspection, DDMRP is able to show this.

Right now DDMRP is just tied to a single warehouse for its calculations but many are in mixed warehouse situations and there seems to be no easy way to clear the TODO decks if a PO or MO is staged at Warehouse B for eventual stocking at Warehouse A.

Or maybe I'm just being a bit dumb? I could be that.

best regards,
Walker

[11.0][Odoo.sh] Error switching view on buffer history

Hello,
First of all, thank you a lot for the good work!

I encounter an error when switching view on the buffer history. See https://youtu.be/4M7R-ro8qgs

Below the full log ๐Ÿ‘ Error:
Odoo Server Error

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/http.py", line 651, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/odoo/src/odoo/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/home/odoo/src/odoo/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/home/odoo/src/odoo/odoo/http.py", line 693, in dispatch
result = self._call_function(**self.params)
File "/home/odoo/src/odoo/odoo/http.py", line 342, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/http.py", line 335, in checked_call
result = self.endpoint(*a, **kw)
File "/home/odoo/src/odoo/odoo/http.py", line 937, in call
return self.method(*args, **kw)
File "/home/odoo/src/odoo/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 934, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 926, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/src/odoo/odoo/api.py", line 687, in call_kw
return call_kw_model(method, model, args, kwargs)
File "/home/odoo/src/odoo/odoo/api.py", line 672, in call_kw_model
result = method(recs, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/models.py", line 1909, in read_group
result = self._read_group_raw(domain, fields, groupby, offset=offset, limit=limit, orderby=orderby, lazy=lazy)
File "/home/odoo/src/odoo/odoo/models.py", line 1999, in _read_group_raw
self._cr.execute(query, where_clause_params)
File "/home/odoo/src/odoo/odoo/sql_db.py", line 155, in wrapper
return f(self, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/sql_db.py", line 232, in execute
res = self._obj.execute(query, params)
psycopg2.ProgrammingError: ORDER BY "id" is ambiguous
LINE 6: ORDER BY "id"
^

planned date in make products

Good morning,
in make products the planned date is determined as per working calendar at warehouse level (wizard from stock buffer list).
Unfortunately, when creating manufacturing order (executing the planning from wizard) the deadline date is calculated as per "solar" calendar.
Regards

Migration to version 17.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-17.0

Modules to migrate

Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list

[11.0] Add constraints

We should add constraints on:

  • stock.buffer.profile
  • stock.buffer.profile.variability
  • stock.buffer.profile.lead.time
  • product.adu.calculation.method
    Currently it is possible to suppress records even if if they are used by other models.

Migration to version 12.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-12.0

Dependencies

OCA/web#1048

  • web_widget_x2many_2d_matrix
  • web_widget_bokeh_chart -> @ageficent OCA/web#1222
  • web_tree_dynamic_colored_field

OCA/manufacture#310

  • mrp_multi_level -> WIP @lreficent @jbeficent
  • mrp_bom_location

OCA/manufacture-reporting#47

  • report_mrp_bom_matrix -> WIP @ageficent
  • mrp_bom_current_stock -> @ageficent

OCA/server-tools#1368

  • base_cron_exclusion -> WIP @ageficent

OCA/stock-logistics-warehouse#487

Modules to migrate

  • ddmrp -> WIP @lreficent @jbeficent #63
  • ddmrp_production_equivalent
  • ddmrp_history -> WIP @lreficent @jbeficent #64
  • ddmrp_adjustment -> WIP @lreficent @jbeficent
  • ddmrp_product_replace

ddmrp_production_equivalent

This module will allow you to use equivalent products when creating a manufacturing order.

Odoo will assume that products in the same product category or subcategories are equivalent.

Configuration

  • Go to Manufacturing > Master Data > Products
  • Create the following products:
Product Priority Product Category Buffer Level (Netflow)
Server 10 Servers red
Part A 10 Parts red
Part B 20 Parts/Sub 1 red
Part C 30 Parts/Sub1/Sub2 green
Part D 40 Parts/Sub1/Sub2/Sub3 green
Part E 50 Parts green
Part F 20 Office Supplies green
  • Go to Manufacturing > Master Data > Bill of Materials
  • Create a BOM for 1 Server with:
Component Quantity Use Equivalences Non-Equivalent Products
Part A 1 True Part C

Usage

  • Go to Manufacturing
  • Create a manufacturing order for 15 Servers
  • The manufacturing order will be consuming 15 Part D because:
    • Part A buffer is red
    • Part B is equivalent but the buffer is red
    • Part C is excluded
    • Part D has a higher priority than E
    • Part F is in a different product category

Procure recommended quantity: unit of measure converted twice?

def _adjust_procure_qty(self, qty):
self.ensure_one()
# If there is a procure UoM we apply it before anything.
# This means max, min and multiple quantities are relative to
# the procure UoM.
if self.procure_uom_id:
rounding = self.procure_uom_id.rounding
adjusted_qty = self.product_id.uom_id._compute_quantity(
qty, self.procure_uom_id
)

_adjust_procure_qty is called in the computation of procurement_recommended_qty, so the recommended quantity is in the units of the buffer, and in the make.procurement.buffer, it is called again in a batch of qty:

qty = line._adjust_procure_qty(qty_to_order)

Looks like the unit is converted twice? Shouldn't the conversion be only once in

def _compute_procure_recommended_qty(self):
subtract_qty = self.sudo()._quantity_in_progress()
for rec in self:
procure_recommended_qty = 0.0
if rec.net_flow_position < rec.top_of_yellow:
qty = rec.top_of_green - rec.net_flow_position - subtract_qty[rec.id]
if qty >= 0.0:
procure_recommended_qty = qty
else:
if subtract_qty[rec.id] > 0.0:
procure_recommended_qty -= subtract_qty[rec.id]
adjusted_qty = 0.0
if procure_recommended_qty > 0.0:
adjusted_qty = rec._adjust_procure_qty(procure_recommended_qty)
rec.procure_recommended_qty = adjusted_qty
?

bokeh version? i just installed bokeh-2.3.1, if i go to stock buffer I have error :Bad 'legend' parameter value: False

File "/home/odoo-dev/odoo-dev13/OCA/ddmrp/ddmrp/models/stock_buffer.py", line 539, in _compute_ddmrp_chart
rec.ddmrp_chart = "%s%s" % rec.get_ddmrp_chart()
File "/home/odoo-dev/odoo-dev13/OCA/ddmrp/ddmrp/models/stock_buffer.py", line 545, in get_ddmrp_chart
red = p.vbar(
File "/home/odoo-dev/odoo-dev13/venv-3.8/lib/python3.8/site-packages/bokeh/plotting/_decorators.py", line 81, in wrapped
return create_renderer(glyphclass, self, **kwargs)
File "/home/odoo-dev/odoo-dev13/venv-3.8/lib/python3.8/site-packages/bokeh/plotting/_renderer.py", line 137, in create_renderer
update_legend(plot, legend_kwarg, glyph_renderer)
File "/home/odoo-dev/odoo-dev13/venv-3.8/lib/python3.8/site-packages/bokeh/plotting/_legends.py", line 56, in update_legend
_LEGEND_KWARG_HANDLERS[kwarg](value, legend, glyph_renderer)
File "/home/odoo-dev/odoo-dev13/venv-3.8/lib/python3.8/site-packages/bokeh/plotting/_legends.py", line 82, in _handle_legend_deprecated
raise ValueError("Bad 'legend' parameter value: %s" % label)
ValueError: Bad 'legend' parameter value: False

[10.0] DDMRP Buffer History Chart view

V10
Clicking on the Chart view of the report 'DDMRP Buffer History' raises following error message:

Traceback (most recent call last):
  File "/home/ddonze/nobackup/ddmrp/ddmrp10/lib/python2.7/site-packages/odoo/http.py", line 641, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/ddonze/nobackup/ddmrp/ddmrp10/lib/python2.7/site-packages/odoo/http.py", line 683, in dispatch
    result = self._call_function(**self.params)
  File "/home/ddonze/nobackup/ddmrp/ddmrp10/lib/python2.7/site-packages/odoo/http.py", line 333, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/ddonze/nobackup/ddmrp/ddmrp10/lib/python2.7/site-packages/odoo/service/model.py", line 101, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/ddonze/nobackup/ddmrp/ddmrp10/lib/python2.7/site-packages/odoo/http.py", line 326, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/ddonze/nobackup/ddmrp/ddmrp10/lib/python2.7/site-packages/odoo/http.py", line 941, in __call__
    return self.method(*args, **kw)
  File "/home/ddonze/nobackup/ddmrp/ddmrp10/lib/python2.7/site-packages/odoo/http.py", line 506, in response_wrap
    response = f(*args, **kw)
  File "/home/ddonze/nobackup/ddmrp/ddmrp10/lib/python2.7/site-packages/odoo/addons/web/controllers/main.py", line 890, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/home/ddonze/nobackup/ddmrp/ddmrp10/lib/python2.7/site-packages/odoo/addons/web/controllers/main.py", line 882, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/ddonze/nobackup/ddmrp/ddmrp10/lib/python2.7/site-packages/odoo/api.py", line 687, in call_kw
    return call_kw_model(method, model, args, kwargs)
  File "/home/ddonze/nobackup/ddmrp/ddmrp10/lib/python2.7/site-packages/odoo/api.py", line 672, in call_kw_model
    result = method(recs, *args, **kwargs)
  File "/home/ddonze/nobackup/ddmrp/ddmrp10/lib/python2.7/site-packages/odoo/models.py", line 1931, in read_group
    result = self._read_group_raw(domain, fields, groupby, offset=offset, limit=limit, orderby=orderby, lazy=lazy)
  File "/home/ddonze/nobackup/ddmrp/ddmrp10/lib/python2.7/site-packages/odoo/models.py", line 2021, in _read_group_raw
    self._cr.execute(query, where_clause_params)
  File "/home/ddonze/nobackup/ddmrp/ddmrp10/lib/python2.7/site-packages/odoo/sql_db.py", line 154, in wrapper
    return f(self, *args, **kwargs)
  File "/home/ddonze/nobackup/ddmrp/ddmrp10/lib/python2.7/site-packages/odoo/sql_db.py", line 231, in execute
    res = self._obj.execute(query, params)
ProgrammingError: ORDER BY "id" is ambiguous
LINE 6:             ORDER BY "id" 
                             ^

[whish]restrict buffer can choose profile that it's type relate to pull rule's action

as you know, the item_type of buffer profile is related with pull rule's action

buffer profile item type pull rule action
manufactured manufacture
purchased buy
distributed move

for example, Product A is enable route Manufacture, so the buffer profile only list those item type is manufactured, this should very help choose the right profile, and use the right DLT.

stock_demand_estimate + adu calc

@JordiBForgeFlow @LoisRForgeFlow

We have a project that implements now features for stock demand computations and average daily usages.

As we want to move the logic to OCA and as I don't want to have duplicate functional modules, I want to know if we maybe want to converge developments.

We have currently stock demand estimate based on materialized view (with almost standard fields) that allows to collect data quite massively.

Then, I thought about extracting adu computation from ddmrp in a separate module.

This, in a 16.0 migration phase.

Do you think it could be a good approach ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.