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

[9.0][MIG] medical #69

Merged
merged 6 commits into from
Oct 14, 2016
Merged

[9.0][MIG] medical #69

merged 6 commits into from
Oct 14, 2016

Conversation

lasley
Copy link

@lasley lasley commented Jan 31, 2016

I also changed the License to markdown version - looks nicer IMO

This was referenced Jan 31, 2016
@lasley lasley changed the title Upgrade medical to v9 & add tests Feature/9.0-medical Jan 31, 2016
@lasley lasley changed the title Feature/9.0-medical Feature/9.0 medical Jan 31, 2016
@pedrobaeza
Copy link
Member

I'm not sure if the license file should be changed as is a verbatim copy of the one provided by the FSF...

@lasley
Copy link
Author

lasley commented Feb 2, 2016

@pedrobaeza No problem, updated

`here <https://github.com/OCA/vertical-medical/issues/new?body=module:%20medical%0Aversion:%209.0.1.1.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
=======
`here <https://github.com/OCA/vertical-medical/issues/new?body=module:%20medical%0Aversion:%209.0.2.0.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
>>>>>>> feature/SMD-88-upgrade-allergy-support-in-medical.-9.0

Choose a reason for hiding this comment

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

Seems conflicted.

@lasley lasley mentioned this pull request Feb 4, 2016
@pedrobaeza pedrobaeza mentioned this pull request Feb 4, 2016
30 tasks
@@ -71,7 +71,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/vertical-medical/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
`here <https://github.com/OCA/vertical-medical/issues/new?body=module:%20medical%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`here <https://github.com/OCA/vertical-medical/issues/new?body=module:%20medical%0Aversion:%209.0.2.0.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Copy link
Member

Choose a reason for hiding this comment

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

Please put here only branch (9.0)

@pedrobaeza
Copy link
Member

I have made a rough code review. You're removing entirely some code and views, is this moved to another module?

@lasley
Copy link
Author

lasley commented Feb 4, 2016

Thanks @pedrobaeza -

Will apply the recommended fixes (and will apply recommendations to the other PRs where applicable).

All of the medical_appointment logic was moved to two separate modules (sorry I should have noted this in the comments of the PR):

  • medical_base_history - Contains the a slightly upgraded/more abstract form of the change tracking used in medical_appointment
  • medical_appointment - The actual appointment logic

Both of these are in #70

@abigailfoster abigailfoster mentioned this pull request Feb 4, 2016
1 task
@kenwmak kenwmak force-pushed the feature/9.0-medical branch 3 times, most recently from b798888 to 7930f14 Compare February 10, 2016 08:40
@lasley
Copy link
Author

lasley commented Feb 10, 2016

Hi all - I added a rough dependency chain in the wiki to help with reviewing of these PRs. Wasn't sure the best approach to take, so I went with text based- https://github.com/OCA/vertical-medical/wiki#dependency-chain

@lasley lasley force-pushed the feature/9.0-medical branch 2 times, most recently from e026166 to 9821ec3 Compare June 10, 2016 21:19
@coveralls
Copy link

coveralls commented Jun 10, 2016

Coverage Status

Changes Unknown when pulling 9821ec3 on laslabs:feature/9.0-medical into * on OCA:9.0*.

@coveralls
Copy link

coveralls commented Jun 10, 2016

Coverage Status

Changes Unknown when pulling 9821ec3 on laslabs:feature/9.0-medical into * on OCA:9.0*.

@lasley lasley added this to the 9.0 milestone Aug 15, 2016
woodbrettm referenced this pull request in LasLabs/vertical-medical Aug 17, 2016
…227-fix-prescription-order-line-kanban to release/9.0

* commit 'd6ae738f98160b52eced61def08812118c50fcf5':
  [FIX] medical_prescription: Fix search view ref in order_line action.
@lasley
Copy link
Author

lasley commented Sep 25, 2016

This has been rebased to include all changes in our v9 medical & is now ready for review

##############################################################################
# Copyright 2004 Tech-Receptives
# Copyright 2016 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

months = {
1: "January", 2: "February", 3: "March", 4: "April",
Copy link
Author

Choose a reason for hiding this comment

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

Please add translations to these strings

Choose a reason for hiding this comment

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

Fixed. Added translations to months of the year and days of the week.

Copy link
Member

Choose a reason for hiding this comment

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

Isn't this month list in any place across Odoo?

Copy link
Author

Choose a reason for hiding this comment

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

I have no idea TBH. This is leftover from legacy & I'm not even 100% where it's all being used. We'll probably remove entirely in v10, I just haven't had time to audit fully

Copy link
Member

Choose a reason for hiding this comment

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

OK, let's move this way for now.

Copy link
Author

Choose a reason for hiding this comment

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

@BMW95 - Please add a note in the ReadMe roadmap regarding the removal of medical constants

Choose a reason for hiding this comment

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

  • Is this something similar? After some searching I noticed the time_intervals dictionary (on line 1943) used in several base_ addons.
  • Couple addons I noticed using the months etc from medical (medical_physician being one).
  • Do you guys want me to add this to the roadmap section in the readme?

Choose a reason for hiding this comment

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

oh my bad sorry @lasley didn't catch your comment in time

Copy link
Author

@lasley lasley Sep 27, 2016

Choose a reason for hiding this comment

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

Nope time_intervals are deltas for using w/ math. These are meant for select fields (I think).

gender = fields.Selection([
('m', 'Male'),
('f', 'Female'),
], )
Copy link
Author

Choose a reason for hiding this comment

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

Putting the ) on the same line as the ] defeats the purpose of the trailing ,, which is to allow for addition of attributes without changing unrelated lines of code. Should be:

fields.Selection([
        ...
    ],
)

Choose a reason for hiding this comment

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

Done

Choose a reason for hiding this comment

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

@lasley Getting lint errors from that way. Can I do:

fields.Selection(
    [
        ...
    ],
)

?

('d', 'Divorced'),
('x', 'Separated'),
('z', 'law marriage'),
], )
Copy link
Author

Choose a reason for hiding this comment

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

Putting the ) on the same line as the ] defeats the purpose of the trailing ,, which is to allow for addition of attributes without changing unrelated lines of code. Should be:

fields.Selection([
        ...
    ],
)

Choose a reason for hiding this comment

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

Done

delta.days, _('d'), deceased
)
else:
years_months_days = _('No DoB !')
Copy link
Author

Choose a reason for hiding this comment

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

Remove the space between DoB and !

Choose a reason for hiding this comment

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

Done. Tests updated for that.

def _compute_deceased(self):
for rec_id in self:
if rec_id.dod:
rec_id.deceased = True
Copy link
Author

Choose a reason for hiding this comment

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

rec_id.deceased = bool(rec_id.dod)

Choose a reason for hiding this comment

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

aw nice man. Knew I was doing it a bit clunky, forget sometimes about that approach. Done.

)
last_name = fields.Char(
string='Last Name',
size=256,
help='Last Name',
help='Last name of the party',
Copy link
Author

Choose a reason for hiding this comment

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

s/party/partner

Choose a reason for hiding this comment

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

Field removed as per comment above.

string='Activation date',
help='Date of activation of the party',
string='Activation Date',
help='Date the party was activated',
)
last_name = fields.Char(
Copy link
Author

Choose a reason for hiding this comment

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

We should remove this - it's not used anywhere & will create confusion.

Please add isolation of first and last names into the roadmap as well. It should probably be in patient, not partner too.

Choose a reason for hiding this comment

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

Removed. Added "Separation of patient/res_partner name into first and last names." to roadmap in readme.

)
is_work = fields.Boolean(
string='Work',
help='Check if the party is a place of work',
Copy link
Author

Choose a reason for hiding this comment

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

s/party/partner

Choose a reason for hiding this comment

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

Done

is_person = fields.Boolean(
string='Person',
help='Check if the party is a person.',
help='Check if the party is a person',
Copy link
Author

Choose a reason for hiding this comment

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

s/party/partner

Choose a reason for hiding this comment

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

Done

Copy link
Author

Choose a reason for hiding this comment

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

No need to note done on each of the items. You only need comment on them if you have a question, comment, etc. When fully done, just drop a global comment advising of such

help='Check if the party is a person.',
help='Check if the party is a person',
)
is_school = fields.Boolean(
Copy link
Author

Choose a reason for hiding this comment

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

Add into roadmap (for v10):

Remove is_* attributes on in favor of res.partner.type model & a M2M relation

Choose a reason for hiding this comment

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

  • Added: "(Odoo v10) Remove all is_* fields (e.g. is_school, is_work, etc.) from res.partner and move to res.partner.type."
  • Visually grouped all the is_* fields together in the res.partner.py file

@lasley
Copy link
Author

lasley commented Sep 26, 2016

@BMW95 - comments inline. Side note - Those tests look so sexy now that you're using the demo data 🎉

@woodbrettm
Copy link

Ready for further review :)

)
is_person = fields.Boolean(
string='Person',
help='Check if the party is a person',
help='Check if the s/party/partner is a person',
Copy link
Author

Choose a reason for hiding this comment

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

Lmao s/party/partner means spelling error. Change word(s) on left side with words on right. This should say partner

Choose a reason for hiding this comment

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

oh hahahaha. Yeah wasn't quite sure what that meant.

Copy link
Author

Choose a reason for hiding this comment

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

Ask in chat next time 😉

@lasley
Copy link
Author

lasley commented Sep 27, 2016

Thanks @BMW95 - LGTM 👍

@lasley lasley changed the title Feature/9.0 medical [9.0][MIG] medical Sep 28, 2016
@lasley
Copy link
Author

lasley commented Sep 29, 2016

@t3ddftw please review when you get a chance.

relationship = fields.Char(
'Relationship',
string='Relationship',

Choose a reason for hiding this comment

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

This is superfluous given the field name.

@tedsalmon
Copy link

LGTM aside from the minor detail I noted. 👍

@lasley lasley merged commit 56c6757 into OCA:9.0 Oct 14, 2016
@lasley lasley deleted the feature/9.0-medical branch October 14, 2016 21:37
lasley referenced this pull request in LasLabs/vertical-medical Oct 22, 2016
* [MIG] Upgrade medical to 9.0.
* [FIX] medical: Fix file headers, add social insurance numbers to patients plus some other small additions and changes.
* [IMP] medical: Refactor tests to use demo data, add api.depends to some medical_patient model compute methods.
* [FIX] medical: Various adjustments to field definitions, patient logic. Add items to roadmap in readme.
* [FIX] medical: Fix help descriptions in res.partner file.
* [FIX] medical: Remove string attributes where the name of the field is the same as the string in res.partner.
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.

6 participants