Skip to content

Conversation

@thomaspaulb
Copy link

Description of the issue/feature this PR addresses:

In some cases, orderpoint_id is filled but origin is not. I have no idea which exact flows lead to this, but I notice it is fixed in future Odoo versions as part of odoo/pull/80319. I'm not sure about backporting all of that, but at least this part is IMO harmless to just merge in.

Current behavior before PR:

Upon confirming an MO with orderpoint_id but no origin:

  File "/home/ubuntu/odoo/auto/addons/mrp/models/mrp_production.py", line 968, in _get_move_raw_values
    origin = self.origin.replace(
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/home/ubuntu/odoo/custom/src/odoo/odoo/http.py", line 652, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/ubuntu/odoo/custom/src/odoo/odoo/http.py", line 317, in _handle_exception
    raise exception.with_traceback(None) from new_cause
AttributeError: 'bool' object has no attribute 'replace'

Desired behavior after PR is merged:

No traceback, MO confirms OK


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

In some cases, orderpoint_id is filled but origin is not. I have no idea which exact flows lead to this, but I notice it is fixed in future Odoo versions as part of odoo/pull/80319. I'm not sure about backporting all of that, but at least this part is IMO harmless to just merge in.
Copy link

@JBvandermeulen JBvandermeulen left a comment

Choose a reason for hiding this comment

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

Issue is fixed!

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.

2 participants