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

[15.0][BUG] mrp_production_grouped_by_product #1058

Closed
Bart-dh opened this issue Jun 20, 2023 · 3 comments
Closed

[15.0][BUG] mrp_production_grouped_by_product #1058

Bart-dh opened this issue Jun 20, 2023 · 3 comments
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.

Comments

@Bart-dh
Copy link

Bart-dh commented Jun 20, 2023

Case: date_deadline is 30/06/2023 (30th of june)
Method wants to change date by adding +1 to date.day -> tries to modfiy date to 31 june which doesn't exist

Error log:

File "/opt/odoo15/odoo/addons/sale_crm/models/sale_order.py", line 15, in action_confirm
return super(SaleOrder, self.with_context({k:v for k,v in self._context.items() if k != 'default_tag_ids'})).action_confirm()
File "/opt/odoo15/odoo/addons/website_sale/models/sale_order.py", line 390, in action_confirm
res = super(SaleOrder, self).action_confirm()
File "/opt/odoo15/odoo/addons/sale_management/models/sale_order.py", line 153, in action_confirm
res = super(SaleOrder, self).action_confirm()
File "/opt/odoo15/odoo/addons/sale/models/sale_order.py", line 998, in action_confirm
self.with_context(context)._action_confirm()
File "/opt/odoo15/odoo/addons/sale_project/models/sale_order.py", line 55, in _action_confirm
result = super()._action_confirm()
File "/opt/odoo15/odoo/addons/sale_stock/models/sale_order.py", line 149, in _action_confirm
self.order_line._action_launch_stock_rule()
File "/opt/odoo15/odoo/addons/sale_stock/models/sale_order.py", line 596, in _action_launch_stock_rule
pickings_to_confirm.action_confirm()
File "/opt/odoo15/odoo/addons/stock/models/stock_picking.py", line 799, in action_confirm
self.mapped('move_lines').filtered(lambda move: move.state not in ('draft', 'cancel', 'done'))._trigger_scheduler()
File "/opt/odoo15/odoo/addons/stock/models/stock_move.py", line 2014, in _trigger_scheduler
orderpoints.with_context(origins=orderpoints_context_by_company[company])._procure_orderpoint_confirm(
File "/opt/odoo15/odoo/addons/stock/models/stock_orderpoint.py", line 534, in _procure_orderpoint_confirm
self.env['procurement.group'].with_context(from_orderpoint=True).run(procurements, raise_user_error=raise_user_error)
File "/opt/odoo15/odoo/addons/purchase_stock/models/stock.py", line 362, in run
return super().run(procurements, raise_user_error=raise_user_error)
File "/opt/odoo15/odoo/addons/mrp/models/stock_rule.py", line 228, in run
return super(ProcurementGroup, self).run(procurements_without_kit, raise_user_error=raise_user_error)
File "/opt/odoo15/odoo/addons/stock/models/stock_rule.py", line 463, in run
getattr(self.env['stock.rule'], 'run%s' % action)(procurements)
File "/opt/odoo15/custom_addons/mrp_production_grouped_by_product/models/stock_rule.py", line 12, in _run_manufacture
return super(
File "/opt/odoo15/odoo/addons/mrp/models/stock_rule.py", line 60, in _run_manufacture
productions = self.env['mrp.production'].with_user(SUPERUSER_ID).sudo().with_company(company_id).create(productions_values)
File "", line 2, in create
File "/opt/odoo15/odoo/odoo/api.py", line 394, in _model_create_single
return self.browse().concat((create(self, vals) for vals in arg))
File "/opt/odoo15/odoo/odoo/api.py", line 394, in
return self.browse().concat(
(create(self, vals) for vals in arg))
File "/opt/odoo15/custom_addons/mrp_production_grouped_by_product/models/mrp_production.py", line 95, in create
mo = self._find_grouping_target(vals)
File "/opt/odoo15/custom_addons/mrp_production_grouped_by_product/models/mrp_production.py", line 86, in _find_grouping_target
self._get_grouping_target_domain(vals), limit=1
File "/opt/odoo15/custom_addons/mrp_production_grouped_by_product/models/mrp_production.py", line 68, in _get_grouping_target_domain
date_end = date.replace(
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/odoo15/odoo/odoo/http.py", line 643, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo15/odoo/odoo/http.py", line 301, in _handle_exception
raise exception.with_traceback(None) from new_cause
ValueError: day is out of range for month

@Bart-dh
Copy link
Author

Bart-dh commented Oct 4, 2023

@LoisRForgeFlow hi Lois. I see you've previously fixed bugs with this module. Could you perhaps check this issue? It would be much appreciated!

@Sibert-Aerts
Copy link

This issue is addressed by my pull request: #1104

Copy link

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Apr 14, 2024
@Bart-dh Bart-dh closed this as completed Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

No branches or pull requests

2 participants