-
-
Notifications
You must be signed in to change notification settings - Fork 690
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
[FIX] Warings about using openupgradelib #458
Conversation
@@ -746,7 +746,10 @@ def _get_uom_id(self, cr, uid, *args): | |||
def _check_uom(self, cr, uid, ids, context=None): | |||
for supplier_info in self.browse(cr, uid, ids, context=context): | |||
if supplier_info.product_uom and supplier_info.product_uom.category_id.id <> supplier_info.product_id.uom_id.category_id.id: | |||
return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems unrelated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The real problem here is in
def _get_uom_id(self, cr, uid, *args):
cr.execute('select id from product_uom order by id limit 1')
res = cr.fetchone()
return res and res[0] or False
That sets the same uom to all supplier_info and causes error if products have uom of different categories. Didn't know how to fix _get_uom_id function so I needed to fix it here to have the migration done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contributions to the project! Have you signed the OCA CLA, so that we can start adopting them? |
Thank you very much for your review, @StefanRijnhart ! |
Thanks for the update. Still waiting for the CLA! |
I've already sent the signed documento and got the response. What more should i do? |
Indeed, I just checked your entry in the Odoo community database and I see that there was a typo in your Github handle, which is why the CLA-bot did not report back on this PR properly. All good now, thanks! |
@@ -32,4 +32,4 @@ | |||
|
|||
_modules = __import__(_new_name, globals(), locals(), ['*']) | |||
for _i in dir(_modules): | |||
locals()[_i] = getattr(_modules, _i) | |||
locals()[_i] = getattr(_modules, _i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you remove the last line here? Anyway, I think this is not needed anymore as you have replaced all the imports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see, might be I accidentally deleted the last newline char.
👍 |
taking #458 (comment) as an implicit thumbs up, we have three: 👍 |
Thanks all for your review! |
No description provided.