-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[ADD][9.0] web_kanban_stage: Stage model and abstract logic #490
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][9.0] web_kanban_stage: Stage model and abstract logic #490
Conversation
* Add Kanban-compatible stage model web.kanban.stage * Add views, menu items, actions, and access controls needed to manage web.kanban.stage records * Add abstract model web.kanban.abstract that other models can inherit from to gain Kanban stage functionality * Add base Kanban view web_kanban_abstract_view_kanban, which can be customized as needed for use with models that inherit from web.kanban.abstract * Add model web.kanban.abstract.tester, which is needed for web.kanban.abstract unit tests
lasley
left a comment
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.
Thanks @obulkin - looks great outside of some minor comments. I'm happy to see our medical logic finally becoming useful in other contexts
| ------------ | ||
|
|
||
| * Dave Lasley <dave@laslabs.com> | ||
| * Oleg Bulkin <obulkin@laslabs.com> |
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.
Add * Daniel Reis - while he didn't write any of this particular code, I made some alterations to the medical library based off of his OCA/server-tools#368. Seems only right to add him into contrib IMO
web_kanban_stage/README.rst
Outdated
| @@ -0,0 +1,107 @@ | |||
| .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | |||
| :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | |||
| :alt: License: AGPL-3 | |||
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.
Let's license this LGPL. Easy way to change is just replace in directory AGPL for LGPL and agpl for lgpl
|
|
||
| class WebKanbanAbstract(models.AbstractModel): | ||
| '''Inherit from this class to add support for Kanban stages to your model. | ||
| All public properties are preceded with kanban_ in order to isolate from |
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.
Add an extra carriage return between the first description line & this extended info. Take a look at https://google.github.io/styleguide/pyguide.html & go to the comments section. But really this whole guide is a great extension to PEP-8 & PEP-257
|
I added the question tag for your question regarding the loading of the test model only during testing, because I do not have an idea here. I think @hbrunn performed some wizardry like this in one of his modules, but I can't remember which it was. |
|
+1 for the question! It's something that we definitely want for testing. Looks like Odoo team creates test_* modules to register new models, but in normal day-life is overwhelming and not what you really want. |
|
This should be a 'base' module, and not a 'web' module. |
|
for the tests https://github.com/OCA/server-tools/blob/9.0/database_cleanup/tests/test_database_cleanup.py#L55 should be helpful. But note that this code has its deficiencies and is about to be fixed in OCA/server-tools#612 |
|
@dreispt so |
|
Brilliant @hbrunn thank you. This is totally what we needed, and it's so danged simple too. @obulkin & @simahawk key is |
|
It is not a web client feature. |
|
It extends |
|
I don't think it extends the web client kanban view type or widgets. Technically the web_kanban dependency is not needed and can be removed. |
|
We provide an abstract KanBan view here. I'm pretty sure this module would break without the |
|
Thanks for the suggestion, @hbrunn. |
|
to be honest, I never worried about that because here, I only run tests on databases meant to throw away. But it's not beautiful of course. Just do what the create function does anyways, but without whatever function that does a commit. |
I fixed that for |
|
...the explanation is: OCA/server-tools#612 (comment) |
|
Ah, interesting. Thanks for the added input, @moylop260 and @hbrunn. I was able to resolve the issue by using a combination of the suggested techniques, together with a tweak: https://OCA/web/pull/490/files#diff-724d82a36bc47b86e2023141c932a42fR9 The key was adding I've pushed up a new commit with this change, as well as the ones requested by @lasley, so the PR is ready for more review. |
lasley
left a comment
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.
Changes LGTM thanks @obulkin
@dreispt (or anyone else) - regarding #490 (comment) - do we want to rename this, or change repos, even if it is dependent on web_kanban and provides the default kanban view?
|
That abstract Kanban is a view accelerator to ease using the features provided. |
|
Thanks!
…--dr
No dia 02/12/2016, às 17:28, Dave Lasley <notifications@github.com> escreveu:
@dreispt - Alright so it seems nobody else has an opinion. I'm going to go ahead and yield to your's then - you've been around longer than me so I'd say your repo judgement is probably better than mine.
@obulkin - Please move this to server-tools
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
Hmm, my POV is that kanban is a web component. Is a web client widget. The fact that this module does not provide any JS/CSS etc does not mean that is not web related stuff. @dreispt today is a backend view but in the future with v11 whereas the widgets will be decoupled from backend views... kanban and many other client features could be used on the frontend too ;) |
|
@simahawk my concern is that no features are being added to Kanban Views, |
|
@simahawk PS: I'm curious about your "v11 widgets will be decoupled from backend views" comment. Can you share more about it? |
|
At the odoo days I chatted with Gerry from Odoo and he told me that in v10
they started rewriting part of the web client form/widget interaction and
that in v11 they should complete the work: widgets will be independent from
the backend assets so that it will be possible to use the same widgets
within backend and frontend.
That would be simply a w e s o m e :)
…On Sun, Dec 4, 2016 at 11:02 AM, Daniel Reis ***@***.***> wrote:
@simahawk <https://github.com/simahawk> PS: I'm curious about your "v11
widgets will be decoupled from backend views" comment. Can you share more
about it?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#490 (comment)>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAVMDZ_b1ZRJJbP11X78rFn6mmJ7C91Wks5rEo-agaJpZM4K2Fa2>
.
|
|
My colleague @yajo had the same talk and we are eager to see that. |
|
Does anyone else have thoughts on where this module should be located? |
|
I would really like for this to be at server-tools as |
|
Seems like we're just kind of going back and forth on the stay leave, so I'm changing my vote to |
|
Moved to OCA/server-tools#679 |
Help Needed: Ideally, the
web.kanban.abstract.testermodel should only be loaded during testing. Does anyone know how to do this?This PR mostly repackages the code in OCA/vertical-medical#121 and was also motivated by a WIP PR by @dreispt: OCA/server-tools#368.
web.kanban.stageweb.kanban.stagerecordsweb.kanban.abstractthat other models can inherit from to gain Kanban stage functionalityweb_kanban_abstract_view_kanban, which can be customized as needed for use with models that inherit fromweb.kanban.abstractweb.kanban.abstract.tester, which is needed forweb.kanban.abstractunit tests