-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Add create call for bids button in lrl #42
Add create call for bids button in lrl #42
Conversation
Hey @jgrandguillaume, thank you for your Pull Request. It looks like some users haven't signed our Contributor License Agreement, yet. Appreciation of efforts, |
someone here is being naughty |
@@ -476,6 +476,23 @@ def _do_sourced(self): | |||
self.state = 'sourced' | |||
|
|||
@api.one | |||
def _do_create_po_requisition(self): | |||
""" Create a call for bif for all sourcing lines with |
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.
bif
other than my remarks, 👍 thanks |
""" | ||
source_lines = self.source_ids | ||
if not source_lines: | ||
raise except_orm(_('No sourcing line Found') % source.name, |
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.
"% source.name" looks spurious
except_orm -> exceptions.Warning
pleae -> please
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.
it's not "spurious", it's a bug which will cause a TypeError.
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.
s/producremnet/procurement/ on line 481
Hi, Thanks for the review ! Crazy I can make so much mistake in so few lines ;) I fixed them. For the CLA bot, I was not marked as "ECLA" nor "ICLA" on OCA odoo instance, so it's not a bug ! I fixed the situation by adding the proper tag. Regards, |
pricelist = self.requisition_id.pricelist_id or None | ||
res_id = source_lines._action_create_po_requisition( | ||
pricelist=pricelist) | ||
return True |
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.
Caution here: return a boolean in a @api.one
method is not a good idea (you will get a list of [True, True...]
for each lines, which is often not what you want (especially since [False, False...]
is true-ish in Python)
Since you're not doing anything with the return value, I'd suggest not returning anything.
I don't understand why Travis is red... I't s FLake 8 on line that I didn't changed. |
@jgrandguillaume let me check |
@jgrandguillaume I confirm that the red travis is not related to your PR, IMO it does not prevent us from merging this one. 👍 If needed, we'll address the problem on the main branch. Thanks |
…button-in-lrl Add create call for bids button in lrl
👍 |
No description provided.