-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
Conversation
d3b8ec6
to
953116f
Compare
d575380
to
953116f
Compare
I'm not sure if the license file should be changed as is a verbatim copy of the one provided by the FSF... |
@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 | ||
|
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.
Seems conflicted.
@@ -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**>`_. |
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.
Please put here only branch (9.0)
I have made a rough code review. You're removing entirely some code and views, is this moved to another module? |
Thanks @pedrobaeza - Will apply the recommended fixes (and will apply recommendations to the other PRs where applicable). All of the
Both of these are in #70 |
3572b9d
to
7930f14
Compare
b798888
to
7930f14
Compare
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 |
e026166
to
9821ec3
Compare
Changes Unknown when pulling 9821ec3 on laslabs:feature/9.0-medical into * on OCA:9.0*. |
Changes Unknown when pulling 9821ec3 on laslabs:feature/9.0-medical into * on OCA:9.0*. |
…227-fix-prescription-order-line-kanban to release/9.0 * commit 'd6ae738f98160b52eced61def08812118c50fcf5': [FIX] medical_prescription: Fix search view ref in order_line action.
…ents plus some other small additions and changes.
…me medical_patient model compute methods.
9821ec3
to
8c2f92e
Compare
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", |
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.
Please add translations to these strings
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.
Fixed. Added translations to months of the year and days of the week.
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.
Isn't this month list in any place across Odoo?
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.
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
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.
OK, let's move this way for now.
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.
@BMW95 - Please add a note in the ReadMe roadmap regarding the removal of medical constants
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.
- 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?
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.
oh my bad sorry @lasley didn't catch your comment in time
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.
Nope time_intervals
are deltas for using w/ math. These are meant for select fields (I think).
gender = fields.Selection([ | ||
('m', 'Male'), | ||
('f', 'Female'), | ||
], ) |
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.
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([
...
],
)
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.
Done
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.
('d', 'Divorced'), | ||
('x', 'Separated'), | ||
('z', 'law marriage'), | ||
], ) |
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.
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([
...
],
)
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.
Done
delta.days, _('d'), deceased | ||
) | ||
else: | ||
years_months_days = _('No DoB !') |
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.
Remove the space between DoB and !
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.
Done. Tests updated for that.
def _compute_deceased(self): | ||
for rec_id in self: | ||
if rec_id.dod: | ||
rec_id.deceased = True |
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.
rec_id.deceased = bool(rec_id.dod)
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.
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', |
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.
s/party/partner
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.
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( |
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.
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.
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.
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', |
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.
s/party/partner
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.
Done
is_person = fields.Boolean( | ||
string='Person', | ||
help='Check if the party is a person.', | ||
help='Check if the party is a person', |
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.
s/party/partner
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.
Done
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.
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( |
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 into roadmap (for v10):
Remove is_*
attributes on in favor of res.partner.type
model & a M2M relation
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.
- 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
@BMW95 - comments inline. Side note - Those tests look so sexy now that you're using the demo data 🎉 |
…c. Add items to roadmap in readme.
79950d5
to
8e1ac5a
Compare
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', |
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.
Lmao s/party/partner
means spelling error. Change word(s) on left side with words on right. This should say partner
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.
oh hahahaha. Yeah wasn't quite sure what that meant.
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.
Ask in chat next time 😉
Thanks @BMW95 - LGTM 👍 |
@t3ddftw please review when you get a chance. |
relationship = fields.Char( | ||
'Relationship', | ||
string='Relationship', |
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.
This is superfluous given the field name.
LGTM aside from the minor detail I noted. 👍 |
…s the same as the string in res.partner.
* [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.
I also changed the License to markdown version - looks nicer IMO