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

[ADD] estate: Implemented real estate module #116

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f7c4c20
[ADD] estate: add the real estate module
smee-odoo Aug 2, 2024
6098174
[IMP] estate: created estate_property model
smee-odoo Aug 2, 2024
3b798c1
[IMP] estate: created estate model
smee-odoo Aug 2, 2024
7388620
[IMP] estate: modified estate model
smee-odoo Aug 2, 2024
3c7c4c1
[IMP] estate: added relational fields
smee-odoo Aug 5, 2024
16b4f96
[IMP] estate: improved formatting
smee-odoo Aug 5, 2024
3d4c41a
[IMP] estate: added computed fields
smee-odoo Aug 6, 2024
98c4c41
[IMP] estate: improved formatting
smee-odoo Aug 6, 2024
2f9b93f
[IMP] estate: added buttons
smee-odoo Aug 7, 2024
0b53b05
[IMP] estate: formatting
smee-odoo Aug 7, 2024
670ae39
[IMP] estate: added constraints
smee-odoo Aug 8, 2024
8240b21
[IMP] estate: added view rules
smee-odoo Aug 12, 2024
1583f94
[IMP] estate: added stat button
smee-odoo Aug 12, 2024
3928be3
[IMP] estate: added python inheritence
smee-odoo Aug 13, 2024
32441d1
[IMP] estate: finished python inheritence
smee-odoo Aug 13, 2024
5768ab0
[IMP] estate: added model and view inheritence
smee-odoo Aug 14, 2024
feaba09
[IMP] estate: improved formatting
smee-odoo Aug 14, 2024
1dc144c
[ADD] estate_account: added estate_account module
smee-odoo Aug 14, 2024
867cca5
[IMP] estate: added Kanban View
smee-odoo Aug 16, 2024
9f9e81a
[IMP] estate: added a wizard to allow making multiple offers
smee-odoo Aug 27, 2024
8435dbf
[IMP] estate: added demo data
smee-odoo Aug 28, 2024
7100ca9
[IMP] estate: added reports
smee-odoo Aug 30, 2024
737fe19
[IMP] estate: added security rules
smee-odoo Sep 2, 2024
0e03e08
[IMP] estate: added web controller
smee-odoo Sep 2, 2024
e9361ec
[ADD] dental: created the dental module
smee-odoo Sep 4, 2024
0333ec0
[IMP] dental: added history and guarantors
smee-odoo Sep 5, 2024
0a19e28
[IMP] dental: added web controller
smee-odoo Sep 6, 2024
64b32ec
[IMP] dental: updated the web controller
smee-odoo Sep 10, 2024
f04efc0
[IMP] dental: updated web controller
smee-odoo Sep 12, 2024
4bd8e03
[ADD]dubbing_rooms: created dubbing rooms module
smee-odoo Sep 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dental/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import controller
32 changes: 32 additions & 0 deletions dental/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
'name': 'DENTAL',
'version': '1.2',
'description': "",
'depends': [
'base', 'website',
'mail', 'account'
],
'data': [
'security/ir.model.access.csv',

'data/data.xml',
'data/dental_data.xml',
'data/dental_tags.xml',

'views/dental_stage_views.xml',
'views/portal_template.xml',
'views/tag_views.xml',
'views/medical_history_views.xml',
'views/dental_views.xml',
'views/medical_aids_views.xml',
'views/medical_symptoms_views.xml',
'views/medication_views.xml',
'views/dental_menu.xml',
],
'demo': [

],
'installable': True,
'application': True,
'license': 'LGPL-3'
}
1 change: 1 addition & 0 deletions dental/controller/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import portal
99 changes: 99 additions & 0 deletions dental/controller/portal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
from odoo import http
from odoo.http import request
from odoo.addons.portal.controllers.portal import CustomerPortal
from odoo.addons.portal.controllers.portal import pager as portal_pager


class DentalPortal(CustomerPortal):
@http.route(['/my/dental', '/my/dental/page/<int:page>'], type='http', auth='user', website=True)
def portal_my_dental(self, page=1, **kw):
current = request.env.user.id
dental_patient = request.env['dental.patient']
domain = [('guarantor_id', '=', current)]

items_per_page = 2
total_users = dental_patient.search_count(domain)

pager = portal_pager(
url='/my/dental',
total=total_users,
page=int(page),
step=items_per_page,
)

users = dental_patient.search(
domain,
limit=items_per_page,
offset=pager['offset'],
)

return request.render('dental.portal_my_dental', {
'users': users,
'pager': pager
})

@http.route('/my/dental/<int:patient_id>', type='http', auth='user', website=True)
def portal_my_dental_user(self, patient_id, **kw):
patient = request.env['dental.patient'].browse(patient_id)
return request.render('dental.portal_my_dental_user', {
'patient': patient
})

@http.route('/my/dental/<int:patient_id>/personal', type='http', auth='user', website=True)
def portal_my_dental_personal(self, patient_id, **kw):
patient = request.env['dental.patient'].browse(patient_id)
return request.render('dental.portal_my_dental_personal', {
'patient': patient
})

@http.route('/my/dental/<int:patient_id>/medical_history', type='http', auth='user', website=True)
def portal_my_dental_medical_history(self, patient_id, **kw):
medical_historys = request.env['medical.history'].search([('patient_id', '=', patient_id)])
return request.render('dental.portal_my_dental_medical_history', {
'medical_historys': medical_historys
})

@http.route('/my/dental/<int:patient_id>/medical_aid', type='http', auth='user', website=True)
def portal_my_dental_medical_aid(self, patient_id, **kw):
medical_aids = request.env['dental.patient'].browse(patient_id).insurance_id
return request.render('dental.portal_my_dental_medical_aid', {
'medical_aids': medical_aids
})

@http.route('/my/dental/<int:patient_id>/dental_history', type='http', auth='user', website=True)
def portal_my_dental_dental_history(self, patient_id, **kw):
medical_historys = request.env['medical.history'].search([('patient_id', '=', patient_id)])
return request.render('dental.portal_my_dental_dental_history', {
'medical_historys': medical_historys
})

@http.route('/my/dental/<int:patient_id>/dental_history/<int:history_id>', type='http', auth='user', website=True)
def portal_my_dental_medical_history_form(self, patient_id, history_id, **kw):
medical_historys = request.env['medical.history'].search(
[('patient_id', '=', patient_id)])
medical_history = medical_historys.browse(history_id)
return request.render('dental.portal_teeth_staining', {
'medical_history': medical_history,
})

@http.route('/dentalappointment', type='http', auth='user', website=True)
def portal_dental_appointment(self, **kw):
return request.render('dental.create_patient_form', {})

@http.route('/createpatient', type='http', auth='user', website=True)
def portal_create_patient(self, **kw):
vals = {
'name': kw.get("name"),
'birthdate': kw.get("birthdate"),
'stage_id': 1
}
new_patient = request.env['dental.patient'].sudo().create(vals)
return request.render('dental.create_patient_details_form', {
'patient_id': new_patient.id
})

@http.route('/createpatient/<int:patient_id>', type='http', auth='user', website=True)
def portal_dental_appointment_details(self, patient_id, **kw):
patient = request.env['dental.patient'].browse(patient_id)
patient.sudo().write(kw)
return request.render('dental.patient_created', {})
11 changes: 11 additions & 0 deletions dental/data/data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<odoo>

<record id="menu_dental" model="website.menu">
<field name="name">Dental Appointment</field>
<field name="url">/dentalappointment</field>
<field name="parent_id" ref="website.main_menu" />
<field name="sequence" type="int">100</field>
</record>

</odoo>
55 changes: 55 additions & 0 deletions dental/data/dental_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0"?>
<odoo noupdate="1">
<!-- Medical SYmptoms DATA -->

<record model="chronic.conditions" id="chronic_type1">
<field name="name">Diabetes- Type 2</field>
</record>
<record model="chronic.conditions" id="chronic_type2">
<field name="name">Heart Conditions</field>
</record>
<record model="dental.allergies" id="allergies_type1">
<field name="name">Latex</field>
</record>
<record model="dental.allergies" id="allergies_type2">
<field name="name">Mercury</field>
</record>
<record model="habits.substance" id="habits_type1">
<field name="name">Alcohol</field>
</record>

<!-- Medication DATA -->

<record model="dental.medication" id="medication_type1">
<field name="name">Acetaminophen</field>
</record>
<record model="dental.medication" id="medication_type2">
<field name="name">Corticosteroids</field>
</record>
<record model="dental.medication" id="medication_type3">
<field name="name">Ibuprofen</field>
</record>
<record model="dental.medication" id="medication_type4">
<field name="name">Pilocarpine</field>
</record>

<!-- Stage DATA -->

<record model="dental.stage" id="dental_stage_type1">
<field name="name">New</field>
<field name="sequence">1</field>
</record>
<record model="dental.stage" id="dental_stage_type2">
<field name="name">To Do Today</field>
<field name="sequence">2</field>
</record>
<record model="dental.stage" id="dental_stage_type3">
<field name="name">Done</field>
<field name="sequence">3</field>
</record>
<record model="dental.stage" id="dental_stage_type4">
<field name="name">To Invoice</field>
<field name="sequence">4</field>
</record>

</odoo>
108 changes: 108 additions & 0 deletions dental/data/dental_tags.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data noupdate="1">
<!-- Incisors -->
<record id="dental_tag_incisor_upper_left_1" model="dental.tags">
<field name="name">Upper Left Central Incisor</field>
</record>
<record id="dental_tag_incisor_upper_left_2" model="dental.tags">
<field name="name">Upper Left Lateral Incisor</field>
</record>
<record id="dental_tag_incisor_upper_right_1" model="dental.tags">
<field name="name">Upper Right Central Incisor</field>
</record>
<record id="dental_tag_incisor_upper_right_2" model="dental.tags">
<field name="name">Upper Right Lateral Incisor</field>
</record>
<record id="dental_tag_incisor_lower_left_1" model="dental.tags">
<field name="name">Lower Left Central Incisor</field>
</record>
<record id="dental_tag_incisor_lower_left_2" model="dental.tags">
<field name="name">Lower Left Lateral Incisor</field>
</record>
<record id="dental_tag_incisor_lower_right_1" model="dental.tags">
<field name="name">Lower Right Central Incisor</field>
</record>
<record id="dental_tag_incisor_lower_right_2" model="dental.tags">
<field name="name">Lower Right Lateral Incisor</field>
</record>

<!-- Canines -->
<record id="dental_tag_canine_upper_left" model="dental.tags">
<field name="name">Upper Left Canine</field>
</record>
<record id="dental_tag_canine_upper_right" model="dental.tags">
<field name="name">Upper Right Canine</field>
</record>
<record id="dental_tag_canine_lower_left" model="dental.tags">
<field name="name">Lower Left Canine</field>
</record>
<record id="dental_tag_canine_lower_right" model="dental.tags">
<field name="name">Lower Right Canine</field>
</record>

<!-- Premolars -->
<record id="dental_tag_premolar_upper_left_1" model="dental.tags">
<field name="name">Upper Left First Premolar</field>
</record>
<record id="dental_tag_premolar_upper_left_2" model="dental.tags">
<field name="name">Upper Left Second Premolar</field>
</record>
<record id="dental_tag_premolar_upper_right_1" model="dental.tags">
<field name="name">Upper Right First Premolar</field>
</record>
<record id="dental_tag_premolar_upper_right_2" model="dental.tags">
<field name="name">Upper Right Second Premolar</field>
</record>
<record id="dental_tag_premolar_lower_left_1" model="dental.tags">
<field name="name">Lower Left First Premolar</field>
</record>
<record id="dental_tag_premolar_lower_left_2" model="dental.tags">
<field name="name">Lower Left Second Premolar</field>
</record>
<record id="dental_tag_premolar_lower_right_1" model="dental.tags">
<field name="name">Lower Right First Premolar</field>
</record>
<record id="dental_tag_premolar_lower_right_2" model="dental.tags">
<field name="name">Lower Right Second Premolar</field>
</record>

<!-- Molars -->
<record id="dental_tag_molar_upper_left_1" model="dental.tags">
<field name="name">Upper Left First Molar</field>
</record>
<record id="dental_tag_molar_upper_left_2" model="dental.tags">
<field name="name">Upper Left Second Molar</field>
</record>
<record id="dental_tag_molar_upper_left_3" model="dental.tags">
<field name="name">Upper Left Third Molar (Wisdom Tooth)</field>
</record>
<record id="dental_tag_molar_upper_right_1" model="dental.tags">
<field name="name">Upper Right First Molar</field>
</record>
<record id="dental_tag_molar_upper_right_2" model="dental.tags">
<field name="name">Upper Right Second Molar</field>
</record>
<record id="dental_tag_molar_upper_right_3" model="dental.tags">
<field name="name">Upper Right Third Molar (Wisdom Tooth)</field>
</record>
<record id="dental_tag_molar_lower_left_1" model="dental.tags">
<field name="name">Lower Left First Molar</field>
</record>
<record id="dental_tag_molar_lower_left_2" model="dental.tags">
<field name="name">Lower Left Second Molar</field>
</record>
<record id="dental_tag_molar_lower_left_3" model="dental.tags">
<field name="name">Lower Left Third Molar (Wisdom Tooth)</field>
</record>
<record id="dental_tag_molar_lower_right_1" model="dental.tags">
<field name="name">Lower Right First Molar</field>
</record>
<record id="dental_tag_molar_lower_right_2" model="dental.tags">
<field name="name">Lower Right Second Molar</field>
</record>
<record id="dental_tag_molar_lower_right_3" model="dental.tags">
<field name="name">Lower Right Third Molar (Wisdom Tooth)</field>
</record>
</data>
</odoo>
7 changes: 7 additions & 0 deletions dental/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from . import dental_patients
from . import medical_aids
from . import medical_symptoms
from . import medication
from . import medical_history
from . import dental_tags
from . import dental_stage
7 changes: 7 additions & 0 deletions dental/models/account_move.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# from odoo import models, fields


# class AccountMove(models.Model):
# _inherit = "account.move"

# patient_id = fields.Many2one('dental.patient', string="Patient name")
Loading