Skip to content

Commit

Permalink
Update day UOM to fix SMD-303
Browse files Browse the repository at this point in the history
  • Loading branch information
lasley committed Jul 28, 2017
1 parent 75279b4 commit 9e5bd5c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions medical_medication/demo/medical_patient_medication_demo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<field name="dose_uom_id" ref="product.product_uom_unit" />
<field name="pathology_id" ref="medical_medication.medical_pathology_pathology_4" />
<field name="duration">1</field>
<field name="duration_uom_id" ref="medical_medication.product_uom_day" />
<field name="duration_uom_id" ref="product.product_uom_day" />
</record>

<record id="medical_patient_medication_medication_2" model="medical.patient.medication">
Expand Down Expand Up @@ -64,7 +64,7 @@
<field name="dose_uom_id" ref="product.product_uom_unit" />
<field name="suggested_administration_hours">10</field>
<field name="duration">1</field>
<field name="duration_uom_id" ref="medical_medication.product_uom_day" />
<field name="duration_uom_id" ref="product.product_uom_day" />
</record>

<record id="medical_patient_medication_medication_4" model="medical.patient.medication">
Expand Down Expand Up @@ -100,7 +100,7 @@
<field name="medicament_id" ref="medical_medication.medical_medicament_aralen_1" />
<field name="pathology_id" ref="medical_pathology.medical_pathology_medical_pathology_2" />
<field name="duration">30</field>
<field name="duration_uom_id" ref="medical_medication.product_uom_day" />
<field name="duration_uom_id" ref="product.product_uom_day" />
<field name="frequency">6</field>
<field name="frequency_uom_id" ref="medical_medication.product_uom_hour" />
<field name="medication_dosage_id" ref="medical_medication.420449005" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<field name="frequency">8</field>
<field name="frequency_uom_id" ref="medical_medication.product_uom_hour" />
<field name="duration">10</field>
<field name="duration_uom_id" ref="medical_medication.product_uom_day" />
<field name="duration_uom_id" ref="product.product_uom_day" />
<field name="medication_dosage_id" ref="medical_medication.307469008" />
</record>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<field name="frequency">12</field>
<field name="frequency_uom_id" ref="medical_medication.product_uom_hour" />
<field name="duration">15</field>
<field name="duration_uom_id" ref="medical_medication.product_uom_day" />
<field name="duration_uom_id" ref="product.product_uom_day" />
<field name="medication_dosage_id" ref="medical_medication.307470009" />
</record>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<field name="quantity">1</field>
<field name="dose_uom_id" ref="product.product_uom_unit" />
<field name="frequency">1</field>
<field name="frequency_uom_id" ref="medical_medication.product_uom_day" />
<field name="frequency_uom_id" ref="product.product_uom_day" />
<field name="duration">1</field>
<field name="duration_uom_id" ref="medical_medication.product_uom_year" />
</record>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class MedicalPrescriptionOrderLine(models.Model):

@api.multi
def _compute_dispense_remain(self):
day_uom_id = self.env.ref('medical_medication.product_uom_day')
day_uom_id = self.env.ref('product.product_uom_day')
for record in self:

if not record.duration_uom_id or record.duration <= 0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def setUp(self):
).dispensed_ids[-1]

self.uom_day = self.env.ref(
'medical_medication.product_uom_day'
'product.product_uom_day'
)
self.uom_dozen = self.env.ref(
'product.product_uom_dozen'
Expand Down

0 comments on commit 9e5bd5c

Please sign in to comment.