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

web_notify: migration to 11.0 #781

Merged
merged 18 commits into from
Apr 3, 2018
Merged

web_notify: migration to 11.0 #781

merged 18 commits into from
Apr 3, 2018

Conversation

bouvyd
Copy link
Contributor

@bouvyd bouvyd commented Oct 29, 2017

Still have to check the js code to see if everything is still needed.

@bouvyd bouvyd mentioned this pull request Oct 29, 2017
68 tasks
@pedrobaeza
Copy link
Member

Marking as "Work in progress" until you tell me about the JS.

@bouvyd
Copy link
Contributor Author

bouvyd commented Oct 30, 2017

Removed the on_logout function which was never called AFAICT.

Note: not completely sure why the polling is started in show_application override, which seems unrelated. Perhaps an override of the start checking for a bound sessions and returning a promise would be more appropriate.

However this is a migration, not a refactoring - if it ain't broken, don't fix it. Unless you want me to.

@pedrobaeza
Copy link
Member

@lmignon you were the original author. Maybe you can clarify @dbo-odoo's comments.

@lmignon
Copy link
Sponsor Contributor

lmignon commented Oct 31, 2017

@pedrobaeza I'm not at work this week. I'll take a look at tis PR the next week

@yajo yajo added this to the 11.0 milestone Oct 31, 2017
Copy link
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

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

However this is a migration, not a refactoring - if it ain't broken, don't fix it. Unless you want me to.

It would be nice, given the JS system is new and this could serve as an example for OCA users 😊

In any case, please squash all translation commits

@bouvyd
Copy link
Contributor Author

bouvyd commented Oct 31, 2017

@yajo
I'm not a JS guru, not sure I should be taken as an example :-p

@bouvyd
Copy link
Contributor Author

bouvyd commented Dec 16, 2017

@yajo said

It would be nice, given the JS system is new and this could serve as an example for OCA users 😊

I'm gonna have to disappoint you, since I'm not part of the JS Framework team, I'm not really familiar with the new webclient architecture (neither the new one nor the old one)...

I squashed the translations commits and moved the error map to a method as requested :)

@bouvyd
Copy link
Contributor Author

bouvyd commented Dec 16, 2017

Small thing to notice: I'm unable to make this work in the runbot (tests work but a manual test does not). I think this might be a runbot server configuration issue because it works fine locally (and in tests) and because the network activity shows some strange things; e.g.:

SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8
Protocol mismatch.

as the response for the poll request sent by the bus...

Copy link
Sponsor Contributor

@lmignon lmignon left a comment

Choose a reason for hiding this comment

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

@dbo-odoo Thank you for the migration LGTM (code review only). If I remember well, the polling is started into the 'show_application' method to be sure that all the required stuff to show the notifications are in place. It's maybe no more the most appropriate place but if it works I agree with you that we can leave it there.

Copy link
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

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

OK, not a problem @dbo-odoo 😉

Please squash the migration commits to merge

@@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
Copy link
Member

Choose a reason for hiding this comment

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

In python3 # -*- coding: utf-8 -*- it should be removed.

Same for the others python file in this pull request.

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 strictly needed, but optional when you have already encoded your file.

@jcdrubay
Copy link

jcdrubay commented Apr 1, 2018

@dbo-odoo thanks for the migration. I hope you can find time to take into account the last few comments ;)

JayVora-SerpentCS and others added 6 commits April 2, 2018 14:58
Fix a check when comparing a user count with items within a mock call.

The previous method was succeeding by pure luck because OCA test
databases contain 2 users, which happens to be the amount of items
within a mock "call_args" (it contains args + kwargs).
- Use the 'session' class of the JS Framework (session no lounger bound
to web client)
- Test change: compare emitted & received messages based on content, not
order. Using string comparison raises false positives.
@bouvyd
Copy link
Contributor Author

bouvyd commented Apr 2, 2018

@jcdrubay I forgot about this, thanks for the reminder :)

Commits squashed, encoding removed as per @phatnguyenuit's suggestion.

Hope you all had a nice easter weekend 🐇 🥚 (assuming you're somewhere it gets celebrated, otherwise I hope you had a nice completely normal weekend :p)

Cheers!

@jcdrubay
Copy link

jcdrubay commented Apr 2, 2018

@yajo Your comments have been taken into account :) Can you approve? Maybe merge? Thanks

@yajo yajo merged commit c1765f9 into OCA:11.0 Apr 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants