Skip to content
Snippets Groups Projects
Commit 5d51d2a5 authored by Marco Folco's avatar Marco Folco
Browse files

Merge branch 'SOF-36-Relacionar_boca_atencion' into '12.0-stage'

[MOD] health attention point

See merge request !29
parents 82a6b443 95d61892
No related branches found
No related tags found
1 merge request!29[MOD] health attention point
......@@ -35,7 +35,6 @@
"views/health_insurance_view.xml",
"views/health_insurance_plan_view.xml",
"views/res_partner_views.xml",
"views/health_attention_point_view.xml",
"data/general.xml",
"data/res_partner_data.xml",
# "views/health_insurance_tariff_view.xml",
......
......@@ -17,7 +17,6 @@ class HealthAttentionPoint(models.Model):
_name = "health.attention.point"
_description = "Health Attention Point"
code = fields.Char('Code')
address = fields.Char('Address')
alias = fields.Char('Alias')
insurance_alias = fields.Char('Insurance Alias')
SOFSA_alias = fields.Char('SOFSA Alias')
insurance_plan_id = fields.Many2one('health.insurance.plan','Related insurance plan')
......@@ -29,6 +29,7 @@ class HealthInsurancePlan(models.Model):
invoicing_type = fields.Selection(
[('tax', 'Taxed'), ('no_tax', 'No Taxed'), ('na', 'N/A')],
string='Invoicing Type', default='na')
attention_point_ids = fields.One2many('health.attention.point','insurance_plan_id','Related attention points')
@api.constrains('code', 'partner_id')
def check_no_duplicated_ref(self):
......
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<!-- Form View -->
<record id="health_attention_point_view_form" model="ir.ui.view">
<field name="name">health.attention.point.form</field>
<field name="model">health.attention.point</field>
<field name="arch" type="xml">
<form string="Health Attention Point">
<sheet>
<group>
<field name="code"/>
<field name="address"/>
</group>
<group>
<field name="alias"/>
</group>
<group>
<field name="insurance_plan_id"/>
</group>
</sheet>
</form>
</field>
</record>
<!-- Tree View -->
<record id="health_attention_point_view_tree" model="ir.ui.view">
<field name="name">health.attention.point.tree</field>
<field name="model">health.attention.point</field>
<field name="arch" type="xml">
<tree string="Health Attention Point">
<field name="code"/>
<field name="address"/>
<field name="alias"/>
<field name="insurance_plan_id"/>
</tree>
</field>
</record>
<!-- Action View -->
<record id="health_attention_point_action" model="ir.actions.act_window">
<field name="name">Health Attention Points</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">health.attention.point</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Menu Item -->
<menuitem id="menu_health_attention_point" name="Health Attention Points"
parent="health_insurance.menu_health_insurance_root"
action="health_attention_point_action"
sequence="30" groups="base.group_user"/>
</data>
</odoo>
......@@ -28,6 +28,9 @@
<field name="code"/>
<field name="invoicing_type" />
</group>
<group>
<field name="attention_point_ids"/>
</group>
<footer>
<group string="Observations" name="observations">
<field name="observations" nolabel="1"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment