Browse Source

[FIX] animal: Fixed formatting and conventions

14.0
Joseph Armas 4 years ago
parent
commit
e13dba7209
  1. 2
      animal/__init__.py
  2. 1
      animal/__manifest__.py
  3. 2
      animal/models/__init__.py
  4. 67
      animal/views/animal.xml

2
animal/__init__.py

@ -1,3 +1 @@
# Copyright (C) 2020 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import models from . import models

1
animal/__manifest__.py

@ -22,7 +22,6 @@
"views/animal.xml", "views/animal.xml",
"views/menu.xml", "views/menu.xml",
], ],
"demo": [],
"application": True, "application": True,
"development_status": "Beta", "development_status": "Beta",
"maintainers": ["max3903"], "maintainers": ["max3903"],

2
animal/models/__init__.py

@ -1,5 +1,3 @@
# Copyright (C) 2020 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import ( from . import (
animal_species, animal_species,
animal_breed, animal_breed,

67
animal/views/animal.xml

@ -80,51 +80,54 @@
<field name="model">animal</field> <field name="model">animal</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<kanban class="o_res_partner_kanban"> <kanban class="o_res_partner_kanban">
<field name="id" />
<field name="image" />
<field name="name" />
<templates>
<t t-name="kanban-box">
<div
<field name="id" />
<field name="image" />
<field name="name" />
<templates>
<t t-name="kanban-box">
<div
class="oe_kanban_global_click o_kanban_record_has_image_fill o_res_partner_kanban" class="oe_kanban_global_click o_kanban_record_has_image_fill o_res_partner_kanban"
> >
<t t-if="record.image.raw_value">
<img
<t t-if="record.image.raw_value">
<img
class="o_kanban_image" class="o_kanban_image"
t-att-src="kanban_image('animal', 'image', record.id.raw_value)" t-att-src="kanban_image('animal', 'image', record.id.raw_value)"
t-att-alt="record.name" t-att-alt="record.name"
/> />
</t>
<t t-else="">
<img
</t>
<t t-else="">
<img
class="o_kanban_image" class="o_kanban_image"
alt="Avatar" alt="Avatar"
t-att-src='_s + "/animal/static/img/avatar.png"' t-att-src='_s + "/animal/static/img/avatar.png"'
/> />
</t>
<div class="oe_kanban_details">
<strong
</t>
<div class="oe_kanban_details">
<strong
class="o_kanban_record_title oe_partner_heading" class="o_kanban_record_title oe_partner_heading"
><field name="display_name" /></strong>
<div
>
<field name="display_name" />
</strong>
<div
class="o_kanban_tags_section oe_kanban_partner_categories" class="o_kanban_tags_section oe_kanban_partner_categories"
/> />
<ul>
<li t-if="record.gender.raw_value"><field
name="gender"
/></li>
<li
<ul>
<li t-if="record.gender.raw_value">
<field name="gender" />
</li>
<li
t-if="record.species_id.raw_value and record.breed_id.raw_value" t-if="record.species_id.raw_value and record.breed_id.raw_value"
><field name="breed_id" />, <field
name="species_id"
/></li>
</ul>
<div class="oe_kanban_partner_links" />
</div>
>
<field name="breed_id" />
<field name="species_id" />
</li>
</ul>
<div class="oe_kanban_partner_links" />
</div> </div>
</t>
</templates>
</kanban>
</div>
</t>
</templates>
</kanban>
</field> </field>
</record> </record>
@ -207,9 +210,7 @@
<field name="view_mode">kanban,tree,form</field> <field name="view_mode">kanban,tree,form</field>
<field name="search_view_id" ref="view_animal_search" /> <field name="search_view_id" ref="view_animal_search" />
<field name="help" type="html"> <field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create an animal.
</p>
<p class="o_view_nocontent_smiling_face">Create an animal</p>
</field> </field>
</record> </record>
</data> </data>

Loading…
Cancel
Save