GithubHelp home page GithubHelp logo

Comments (13)

pedrobaeza avatar pedrobaeza commented on July 30, 2024 1

I think the best is to make the PR and comment there instead of polluting this issues that is intended to coordinate migration efforts. I'm only involved in this coordination, not the modules themselves anyway.

from management-system.

dreispt avatar dreispt commented on July 30, 2024 1

@eugen-don Please commit changes on only one module on each PR, otherwise the reviewing process is very unpractical. The build will be red from missing dependencies, but don't worry. As soon as the dependencies are merged, you can rebase it on latest 10.0 and it will (hopefully) go green.
Don't forget to list the PR dependencies on the PR's description - that will help reviewers on what to look at first.

from management-system.

dreispt avatar dreispt commented on July 30, 2024 1

@eugen-don I'm not sure that your PRs are building on top on the port work already done for 9.0.
Each PR should handle one module, and you should extract the modules change history from 9.0, using the Git black magic explained at https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-10.0

You should then see in your PRs commits from other people, and that's expected.
Try it on a PR and ping us for a review.

from management-system.

ngrandjean avatar ngrandjean commented on July 30, 2024 1

Hello everyone,
If no one is working on it I'll do the migration of the following modules:

  • mgmtsystem_hazard
  • mgmtsystem_hazard_risk

from management-system.

eugen-don avatar eugen-don commented on July 30, 2024

@max3903
Sorry for the late reply, after reading the todo migration tutorial i realized few errors: In the modules mgmtsystem_action, mgmtsystem_nonconformity the mail sending method seems deprecated, i was trying to fix it but cant get it working.

Here are the ported modules so far from repo management-system:
mgmtsystem
mgmtsystem_action
mgmtsystem_audit
mgmtsystem_hazard
mgmtsystem_logistics
mgmtsystem_nonconformity
mgmtsystem_review
mgmtsystem_survey

from management-system.

max3903 avatar max3903 commented on July 30, 2024

Thanks @eugen-don. Can you make pull requests for each of those modules?

from management-system.

eugen-don avatar eugen-don commented on July 30, 2024

from management-system.

eugen-don avatar eugen-don commented on July 30, 2024

@pedrobaeza and @max3903
HI Guys, as you know im currently porting mgmtsystem_nonconformity to V 10.0
At this moment im updating my PRs in order to meet all of the OCA guidelines and conventions.

While reviewing mgmtsystem_action and mgmtsystem_nonconformity i discovered one of my commented code blocks where i replaced the method for getting the default stage for new actions and nonconformities with the new method odoo uses in its project module. We have in the mgmtsystem_nonconformity the method called _default_stage which is executed on record creation and returns the stage by the stages database ID mgmtsystem_nonconformity.stage_draft...

Odoo on the other hand switched their method to search the project stages for the record, that has its boolean field is_starting set to True and returns this stages id upon record creation.

This has the advantage that a user can delete the draft stage or even create a new one.

With our current method that returns the default stage by its database ID, the record creation for mgmtsystem_nonconformity fails if a user accidently deletes and reacreates the draft stage, since the database ID of the stage_draft changes.

Should i update the method from:
def _default_stage(self):
"""Return the default stage."""
return self.env.ref('mgmtsystem_nonconformity.stage_draft')

to something like ?

def _default_stage(self):
    return self.env['mgmtsystem.nonconformity.stage'].search(
        [('is_starting', '=', True)],
        limit=1)

Or should the changes be kept as small as possible?

Notice that Odoos aproach to getting the default stage will also fail if the user creates multiple stages with the field is_starting = True

EDIT:

Just found out that replacing the method would require to adjust some more views...
So ill leave the method as it was, since we can still change it later on.

from management-system.

eugen-don avatar eugen-don commented on July 30, 2024

@dreispt
thanks for the advice im on it.

from management-system.

eugen-don avatar eugen-don commented on July 30, 2024

@max3903 @dreispt

Could we leave my PRs open and only merge them after i write ready to merge in the comments ? Im not completely done with refactoring and am not sure on how to proceed with mgmtsystem_nonconformity...

from management-system.

max3903 avatar max3903 commented on July 30, 2024

@eugen-don Just rename the PR with "WIP" as a prefix. Remove it when ready.

from management-system.

eugen-don avatar eugen-don commented on July 30, 2024

ok thanks

from management-system.

github-actions avatar github-actions commented on July 30, 2024

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

from management-system.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.