forked from OCA/vertical-medical
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed commits: [345fdd3] Allow Rx substitution using GCN if not same product [bcfe1bd] Remove required from pathology in disease [ee23f93] Fix day reference [1b47c9f] Fix bugs and usability issues identified in LABS-362 Squashed commits: [94b0b23] [IMP] medical_medicament_us: Improve nested NDC form * Create custom nested NDC form with active toggle and split groups [a8b8b33] [IMP] medical: Move active toggle to abstract entity * Move active toggle button to abstract entity button box to reduce code dup [6e50f1d] [IMP] medical_medicament_us: Add active flag * Add an active flag for NDCs to allow for more granular reporting [1ec637c] [FIX] medical_center: Move centers in patient view * Move medical centers to right group in patient view, instead of title area [b3657e5] [IMP] medical: Patient view xpaths * Switch patient view xpaths to use pre-defined entity groups to provide commonality [43451d3] [FIX] website_sale_medical_prescription: Fix gender attribute [4117591] [FIX] website_medical_patient: Fix gender attribute [038ec40] [FIX] sale_medical_prescription: Fix attributes * Fix patients assigned as partners * Fix usage of dosage quantity as order line [7a3793f] [IMP] sale_stock_medical_prescription_us: Switch to product_uom * Switch reference to use product_uom days instead of now nonexistent medicament [1ce4261] [IMP] medical_medication: Remove uom data * Remove UOM data in favor of product_uom, which contains the same thing now [9be7200] [IMP] sale_stock_medical_prescription: Change rx force context key * Change context key to force prescription dispenses from `__rx_force__` to `rx_no_validate` to match partner Id validate skip introduced in OCA/partner-contact#373 [3742154] [IMP] medical_patient_us: Activate module [b7e00e7] [FIX] medical_medicament_us: Fix GCN display (#127) * [FIX] medical_medicament_us: Fix GCN display * Add `name_get` to display GCN with prepended zero pads. * [IMP] medical_medicament_us: Change GCN to int * Updates per PR * [FIX] website_sale_medical_medicament_us: Fix GCN * Update GCN to appropriate code
- Loading branch information
Showing
13 changed files
with
128 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo noupdate="1"> | ||
|
||
<record id="product_uom_category_time" model="product.uom.categ"> | ||
<field name="name">Time</field> | ||
</record> | ||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
partner-contact | ||
product-attribute | ||
# Waiting on merge of OCA/website#270 | ||
website https://github.com/laslabs/website.git release/10.0/website_field_autocomplete_related | ||
server-tools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
sale_stock_medical_prescription_us/models/sale_order_line.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2017 LasLabs Inc. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from odoo import api, models | ||
from odoo.exceptions import ValidationError | ||
|
||
|
||
class SaleOrderLine(models.Model): | ||
_inherit = 'sale.order.line' | ||
|
||
@api.multi | ||
@api.constrains('product_id', 'prescription_order_line_id') | ||
def _check_product(self): | ||
if self.env.context.get('rx_no_validate'): | ||
return True | ||
for record in self: | ||
try: | ||
super(SaleOrderLine, self)._check_product() | ||
except ValidationError: | ||
gcn = record.prescription_order_line_id.medicament_id.gcn_id | ||
equivalents = self.env['medical.medicament'].search([ | ||
('gcn_id', '=', gcn.id), | ||
]) | ||
if record.product_id not in equivalents.mapped('product_id'): | ||
raise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters