- May 24, 2023
-
-
Aurelien van Delft (avd) authored
Turn the call to filtered after the search on purchase.order.line into a call to _search. This allows to remove filtered by adding an additional leaf in the search domain. Add read calls to fetch fields from db and store them in cache on recordset batches. Example speedup: partner with 136555 POL 6.33s -> 3.42s opw-3277299 closes odoo/odoo#122204 X-original-commit: b3e81b09 Signed-off-by:
William Henrotin (whe) <whe@odoo.com> Signed-off-by:
Van Delft Aurélien (avd) <avd@odoo.com>
-
- Jun 21, 2021
-
-
Aurélien (avd) authored
Improve res.patner._compute_on_time_rate performances by calling mapped('quantity_done') once on all the order_lines.move_ids. Moving it out of the for loop allows to befinit from the performance gains of the read_group call in stock.move._quantity_done_compute. closes odoo/odoo#72422 X-original-commit: 2841525a Signed-off-by:
Rémy Voet <ryv-odoo@users.noreply.github.com>
-
- Feb 26, 2021
-
-
Denis Ledoux authored
- User in company A, - Purchase order in company A, - Product in company B ``` File "/home/odoo/src/odoo/14.0/addons/purchase_stock/models/res_partner.py", line 23, in _compute_on_time_rate ]).filtered(lambda l: l.product_id.product_tmpl_id.type != 'service' and l.order_id.state in ['done', 'purchase']) File "/home/odoo/src/odoo/14.0/odoo/models.py", line 5279, in filtered return self.browse([rec.id for rec in self if func(rec)]) File "/home/odoo/src/odoo/14.0/odoo/models.py", line 5279, in <listcomp> return self.browse([rec.id for rec in self if func(rec)]) File "/home/odoo/src/odoo/14.0/addons/purchase_stock/models/res_partner.py", line 23, in <lambda> ]).filtered(lambda l: l.product_id.product_tmpl_id.type != 'service' and l.order_id.state in ['done', 'purchase']) File "/home/odoo/src/odoo/14.0/odoo/fields.py", line 2483, in __get__ return super().__get__(records, owner) File "/home/odoo/src/odoo/14.0/odoo/fields.py", line 998, in __get__ record._fetch_field(self) File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3072, in _fetch_field self._read(fnames) File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3183, in _read raise self.env['ir.rule']._make_access_error('read', forbidden) odoo.exceptions.AccessError: Due to security restrictions, you are not allowed to access 'Product' (product.product) records. ``` If you do not share products between companies (if the multi-company record rule for `product.template` is enabled) then you are not supposed to use a product from another company in a purchase order. However, this is possible to land in the case if you enable the multi-company record rule after you created some purchase orders, using products from other companies. Adding `sudo()` just to get the type of product doesn't cost much to support that case upg-8277 closes odoo/odoo#66956 X-original-commit: a08ba4be Signed-off-by:
Denis Ledoux (dle) <dle@odoo.com>
-
- Nov 30, 2020
-
-
Martin Trigaux authored
Courtesy of Transifex's translators for reporting bad/unclear sentences. closes odoo/odoo#62564 X-original-commit: 9b3b2e8d Related: odoo/enterprise#15038 Signed-off-by:
Martin Trigaux (mat) <mat@odoo.com>
-
- Oct 07, 2020
-
-
yhu-odoo authored
Previously, when compute on-time delivery, we compare the date_planned on PO line with the date on stock.move. Since they are both datetime, the product that delivered on the scheduled date may be considered delay because of the 'time' part is late, which is normally not what we want. In this commit, we only compare the date part of them to decide whether it's late or not. Task 2346121 PR #58653 closes odoo/odoo#59386 X-original-commit: 86af7c64 Signed-off-by:
Arnold Moyaux <amoyaux@users.noreply.github.com>
-
- Aug 18, 2020
-
-
Rémy Voet (ryv) authored
- Avoid to truncate the hour/min/sec in the computation of the effective date which is related to the `date_done` of the first incoming picking. - With manufacturing in 3-step (pbm_sam), the store picking had a source document == "New". It was the case because the `_get_move_finished_values` was call before the create and the name is set only on create. To fix this issue, during the `create` set the origin of all move. - To avoid to maintain old views unused, remove unused view of stock move. - The computation of the products_availability json is too expensive to be in tree view (2.5 times long with it) of picking. It will be hard to optimize because the half the time is due to _get_report_lines method - already in batch (on 80 records). - Review buttons of the replenishment list to be more Odooer. - In some cases the delay alert date was wrongly compute: - If we new dest_move_ids of a existant move, the delay alert date won't be compute. - If the state (to done) and the date are save in same write call the alert date of next move won't be reset. To avoids these issues, refactor the alert date to be a compute stored fields. - To avoid any confusion between date expected in the replenishement (in date) and the purchase order receipt date (datetime), we put the receipt date at the middle of the day. Also On-Time Delivery Rate computation counts only when date are bigger effective date trunced to date. Also used the timezone of the company by default (if not user timezone) task-2246665 closes odoo/odoo#55379 Related: odoo/upgrade#1586 Related: odoo/enterprise#12309 Signed-off-by:
Arnold Moyaux <amoyaux@users.noreply.github.com>
-
- Jun 09, 2020
-
-
yhu-odoo authored
Change how we show on-time delivery rate on the purchase form to imporve usability. Task 2265912 PR #52693
-
- May 27, 2020
-
-
yhu-odoo authored
Add on-time delivery rate to vendor. When editing a PO, user can see the overall on-time delivery rate during the last 365 days next to the vendor. When click it, user will be redirect to a graph view showing the detail of the on-time delivery rate of this vendor. Also add a stat button to show the on-time delivery rate on partner form. Task: 2230811 PR: #49921
-