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 nonconformity #25

Merged
merged 64 commits into from
Aug 4, 2015

Conversation

llacroix
Copy link
Contributor

Removed base_status dependency and reimplemented some of the methods that were missing to keep the cases working.

depends on

@llacroix llacroix mentioned this pull request Nov 21, 2014
4 tasks
@@ -22,7 +22,9 @@
from openerp.tools.translate import _
from openerp import netsvc
from openerp.osv import fields, orm
from openerp.addons.base_status.base_state import base_state

#from openerp.addons.base_status.base_state import base_state

Choose a reason for hiding this comment

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

Please remove this commented line

@bwrsandman
Copy link

As a general rule, unless the classes are very small (case of one2many). We strongly recommend you split python/xml files by model involved.

https://lists.launchpad.net/openerp-community/msg06955.html

@bwrsandman bwrsandman added this to the 8.0 milestone Nov 24, 2014
res = self.name_get()
return dict(res)

_constraints = [
Copy link
Contributor Author

Choose a reason for hiding this comment

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

_constraint not present in mgmtsystem_nonconformity_origin.py. yet the code is almost the same. We could technically subclass both class and clone the implementation or just add a type instead of copying code.

Choose a reason for hiding this comment

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

Good catch on the constraint.

I haven't done this, but I think to clone a class you can do this:

class mgmtsystem_nonconformity_origin(models.Model):
    _name = "mgmtsystem.nonconformity.origin"
    _inherit = "mgmtsystem.nonconformity.cause"

If that doesn't work, you can use an abstract model and then subclass from that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but I'd rather subclass them as origin aren't causes and causes aren't origin. If it's fine to inherit only for the structure only then it could be fine but if there is a way to get all origins and it will catch all causes too it won't make sense.

@bwrsandman
Copy link

depends on #35

@bwrsandman
Copy link

pep8:

./mgmtsystem_nonconformity/models/mgmtsystem_nonconformity.py:79:8: E121 continuation line under-indented for hanging indent

@dreispt
Copy link
Sponsor Member

dreispt commented Dec 13, 2014

Could we have this to not depend on document_page_procedure?
We may want to manage NCs is Odoo but prefer to manage Procudure Docs elsewhere.

@max3903
Copy link
Sponsor Member

max3903 commented Dec 14, 2014

@dreispt having a dependency on document_page_procedure does not necessarily mean you manage your documentation content in Odoo. We use it as a list to reference the content in another application. The day we want to put everything in Odoo, we just have to transfer the content and drop the other application.

If you want to drop the dependency, you will have to create a new field to provide the list of procedures (quality), environmental aspects (environment), and other thing in other systems.

I am sure you will agree with me that any Management Systems software should come with a documentation system, so why Odoo should be different here.

@max3903 max3903 removed the 8.0 label Feb 13, 2015
@max3903 max3903 mentioned this pull request Feb 14, 2015
26 tasks
@llacroix llacroix mentioned this pull request Apr 1, 2015
2 tasks
@llacroix llacroix force-pushed the 8.0-mgmtsystem_nonconformity branch from 0ef651b to c7e0c10 Compare April 7, 2015 13:16
@@ -3,6 +3,7 @@
<data>

<record id="action_mgmtsystem_nonconformity" model="ir.actions.act_window">
<field name="name">board.mgmtsystem.nonconformity.act_window</field>
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

name should be a human readable text

Choose a reason for hiding this comment

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

Or it can be ommited

@bwrsandman bwrsandman force-pushed the 8.0-mgmtsystem_nonconformity branch from e4a43eb to 26e2fd9 Compare May 13, 2015 21:34
@bwrsandman
Copy link

@max3903, @dreispt please test

@dreispt
Copy link
Sponsor Member

dreispt commented May 14, 2015

Thanks @bwrsandman !

stage_id = fields.Many2one(
'mgmtsystem.action.stage',
'Stage',
default=lambda self: self.get_default_stage()
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

You can use: default=get_default_stage

Choose a reason for hiding this comment

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

I use lambda so get_default_stage can be overriden. AFAIK setting default to a member function directly does not allow it to be overriden the way that a call to self. does.

@dreispt dreispt self-assigned this May 21, 2015
@bwrsandman
Copy link

@dreispt Most other porting PRs are dependent on this one, do you think your adjustments can be made after merging this?

@max3903
Copy link
Sponsor Member

max3903 commented Jun 2, 2015

I think we added a name field on version 7 and I don't see it here.

Otherwise
👍

@ghost
Copy link

ghost commented Jul 29, 2015

Hi! @dreispt, @max3903

May I include Spanish translation in this branch 8.0-mgmtsystem_nonconformity ?

@max3903
Copy link
Sponsor Member

max3903 commented Jul 29, 2015

@gs-clearcorp Sure!

@ghost
Copy link

ghost commented Jul 29, 2015

PR here savoirfairelinux#18

@dreispt
Copy link
Sponsor Member

dreispt commented Aug 4, 2015

@bwrsandman @max3903 Good enough today is better than perfect tomorrow, so yes, go ahead.
@max3903 I won't be able do to work on this, so maybe the idea can be put into the roadmap.

@max3903
Copy link
Sponsor Member

max3903 commented Aug 4, 2015

@dreispt not sure what you want to add, but here it is #84

👍

@max3903 max3903 mentioned this pull request Aug 4, 2015
1 task
@dreispt
Copy link
Sponsor Member

dreispt commented Aug 4, 2015

👍

dreispt added a commit that referenced this pull request Aug 4, 2015
…mity

Port mgmtsystem_nonconformity to 8.0
@dreispt dreispt merged commit 86857c5 into OCA:8.0 Aug 4, 2015
@max3903 max3903 mentioned this pull request Nov 6, 2015
3 tasks
@max3903 max3903 mentioned this pull request Mar 25, 2016
7 tasks
tschanzt pushed a commit to camptocamp/management-system that referenced this pull request Jun 26, 2019
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