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

[REF] 8.0 mgmtsystem_action #22

Merged
merged 13 commits into from
Nov 28, 2014

Conversation

llacroix
Copy link
Contributor

The current module inherit crm.claim while the state attribute doesn't exist anymore. I made some changes to use the stage_id instead but I'm not so sure it's a good idea. I'm open to suggestions.

@llacroix llacroix changed the title 8.0 mgmtsystem action [REF] mgmtsystem_action Nov 20, 2014
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling ea2e765 on savoirfairelinux:8.0-mgmtsystem_action into ad23dae on OCA:8.0.

@@ -43,6 +43,6 @@
'board_mgmtsystem_action.xml',
],
"demo": ['demo_action.xml'],
'installable': False,
'installable': True,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Not a blocker, but it would be nice if you removed the vim lines.

@llacroix llacroix changed the title [REF] mgmtsystem_action [REF] 8.0 mgmtsystem_action Nov 21, 2014
<field name="res_model">mgmtsystem.action</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_mgmtsystem_action_tree"/>
<field name="domain">[('state', 'in', ('draft','open','pending'))]</field>
<!-- TODO check that names match what's present -->

Choose a reason for hiding this comment

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

Is this a work in progress?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, but was looking for some pointers.

@coveralls
Copy link

Coverage Status

Coverage decreased (-40.38%) when pulling 2d7f622 on savoirfairelinux:8.0-mgmtsystem_action into d10997c on OCA:8.0.

@llacroix
Copy link
Contributor Author

Can someone have a look why travis crashes?

@dreispt
Copy link
Sponsor Member

dreispt commented Nov 22, 2014

Restarted it and it doesn't solve the issue.
It seems to be in the report module.
Could it be related to odoo/odoo#3811 ?

@pedrobaeza
Copy link
Member

Yeah, I'm experimenting same issue on l10n-spain branch, so it's related to odoo core. For now, I haven't investigated any solution.

@coveralls
Copy link

Coverage Status

Coverage decreased (-7.69%) when pulling 0546659 on savoirfairelinux:8.0-mgmtsystem_action into d10997c on OCA:8.0.

@llacroix
Copy link
Contributor Author

Good news. Seems to work now

@dreispt
Copy link
Sponsor Member

dreispt commented Nov 24, 2014

The state/stage stuff doesn't bother me a lot, since I believe that should be revisited at a later moment. So IMO the commented stuff on it can perfectly be left in the code for now.
As long as it's working, you have my 👍

@dreispt dreispt mentioned this pull request Nov 24, 2014
1 task
@bwrsandman
Copy link

Coverage has gone down -7.69%, please add tests for mgmtsystem_action/mgmtsystem_action.py

  • create
  • message_auto_subscribe
  • case_open
  • case_close
  • get_action_url

@dreispt
Copy link
Sponsor Member

dreispt commented Nov 24, 2014

Come on @bwrsandman: it's not like it's a new module. It's just a port from v7.
We can only demand that it's working on v8 and follows the style guide.

@bwrsandman
Copy link

This is a strong recommendation, I won't block it, but I won't approve it without tests.

@dreispt I have worked on porting the mgmsystem modules to v7 when I started and I know how much the code needs be better. Tests are the most beneficial when porting to a new version since behaviour is much more likely to do unintended things.

A drop in coverage (esp. from 100%) should be objected.

@dreispt
Copy link
Sponsor Member

dreispt commented Nov 24, 2014

I see, you're asking it but not demanding - that's OK.
I would ague the right comparison would be with v7's 46%.

From my PoV I would like to see the just "working" in v8 ASAP so that we have the base to improve it. Much of the current code is related to state/stage management, and that will probably be retired.
That's why I don't mind a lot about the missing tests now.

It is used and only contains things from mgmtsystem_nonconformity
@llacroix
Copy link
Contributor Author

Should I remove the workflow file, it doesn't seem to be required anymore? I'm not sure it is still relevant.

<record model="workflow.transition" id="mgmtsystem_action_transition_close">

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.33%) when pulling 6559279 on savoirfairelinux:8.0-mgmtsystem_action into d10997c on OCA:8.0.

When doing `case.user_id = None`, it will throw this error:

    IntegrityError: null value in column "partner_id" violates not-null
    constraint
@dreispt
Copy link
Sponsor Member

dreispt commented Nov 25, 2014

👏

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 304e365 on savoirfairelinux:8.0-mgmtsystem_action into d10997c on OCA:8.0.

@pedrobaeza
Copy link
Member

Excellent coverage!

You can remove openupgrade analysis file and migration scripts, because they are for v7. You should build another ones for v8 if there are changes in DB layout.

@bwrsandman
Copy link

👍
You could add a test case with no user_id to get 100% coverage if you want.

As for the transition, I still think it's in use. What makes you think it should be removed?

@max3903
Copy link
Sponsor Member

max3903 commented Nov 25, 2014

Workflow is not relevant if people involved in the action are added as followers and receive notifications of state changes.

@pedrobaeza
Copy link
Member

@bwrsandman, are you asking me? I ask about removing migration files because it's for v6 to v7 migration, not for v7 to v8.

@bwrsandman
Copy link

@pedrobaeza Sorry for the confusion: I am asking @llacroix

Should I remove the workflow file, it doesn't seem to be required anymore? I'm not sure it is still relevant.

@llacroix
Copy link
Contributor Author

@bwrsandman The workflow transition was calling case_close which only do things related to mgmtsystem_nonconformity In that case, the workflow for transition should be moved to the mgmtsystem_nonconformity module.

The other workflow for case_open seems to send email and the url in the email is http://localhost:8080. Unless it gets replaced automagically somewhere else the url is wrong.

@llacroix
Copy link
Contributor Author

@pedrobaeza how about updating from 6 to 8 ? Is it possible or the "safe" way would be to update from 6 to 7 and from 7 to 8.

Right now, there is no migration from 7 to 8 the model didn't change as far as I can tell.

@bwrsandman
Copy link

@llacroix good point, that should be moved to NC, then,

Unless it gets replaced automagically somewhere else the url is wrong.

The url will get changed depending on your deployment. Try changing your port, you'll see it changes.

how about updating from 6 to 8 ?

You can only do an upgrade from one version to the next:
6.0 -> 8.0 is actually 6.0 -> 6.1 -> 7.0 -> 8.0

Maybe in the future OpenUpgrade could support such a high jump but it is not the case today.

That being said, I don't really mind if the old migrations stay, they serve as examples for future migration scripts and they shouldn't cause any problems for people in v8

@pedrobaeza
Copy link
Member

OK, we have those scripts on v7 branch, but if you want to keep it, it's not a blocking issue.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling b5f3e37 on savoirfairelinux:8.0-mgmtsystem_action into d10997c on OCA:8.0.

@llacroix
Copy link
Contributor Author

Is there anything else to do so we can pass to other modules? Many modules can't be merged because they depend on this one.

@dreispt
Copy link
Sponsor Member

dreispt commented Nov 26, 2014

@llacroix To merge this ASAP.
AFAICT there are no blocking issues, right?

@bwrsandman
Copy link

👍 No huge issue (in fact it looks amazing), but I would wait for @max3903 to approve

@max3903
Copy link
Sponsor Member

max3903 commented Nov 28, 2014

👍

bwrsandman added a commit that referenced this pull request Nov 28, 2014
@bwrsandman bwrsandman merged commit ab18896 into OCA:8.0 Nov 28, 2014
llacroix referenced this pull request in savoirfairelinux/management-system Dec 29, 2014
[ADD] document_url: Module to attach URLs as documents
@llacroix llacroix mentioned this pull request Apr 1, 2015
4 tasks
@max3903 max3903 mentioned this pull request Apr 7, 2015
26 tasks
tschanzt pushed a commit to camptocamp/management-system that referenced this pull request Jun 26, 2019
BSCOS-100 Language and tags on company's contacts form
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.

None yet

7 participants