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

Add create call for bids button in lrl #42

Merged

Conversation

jgrandguillaume
Copy link
Member

No description provided.

@oca-clabot
Copy link

Hey @jgrandguillaume, thank you for your Pull Request.

It looks like some users haven't signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement here: http://odoo-community.org/page/website.cla
Here is a list of the users:

Appreciation of efforts,
OCA CLAbot

@lepistone
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

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

bif

@lepistone
Copy link
Member

other than my remarks, 👍 thanks

"""
source_lines = self.source_ids
if not source_lines:
raise except_orm(_('No sourcing line Found') % source.name,
Copy link
Member

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

Copy link
Member

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.

Copy link
Member

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

@jgrandguillaume
Copy link
Member Author

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
Copy link
Member

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.

@jgrandguillaume
Copy link
Member Author

I don't understand why Travis is red... I't s FLake 8 on line that I didn't changed.

@lepistone
Copy link
Member

@jgrandguillaume let me check

@lepistone
Copy link
Member

@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

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.28%) when pulling 2bcf38f on jgrandguillaume:add-create-call-for-bids-button-in-lrl into db8952c on OCA:8.0.

jgrandguillaume added a commit that referenced this pull request Nov 14, 2014
…button-in-lrl

Add create call for bids button in lrl
@jgrandguillaume jgrandguillaume merged commit 9a91f60 into OCA:8.0 Nov 14, 2014
@gurneyalex
Copy link
Member

👍

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.

5 participants