Browse Source

[MIG] animal: Migration to 14.0

[FIX] animal: Modified by pre-commit

[FIX] animal: Replaced status button by archived widget
14.0
joseph 4 years ago
committed by Joseph Armas
parent
commit
88a6dbf55c
  1. 1
      README.md
  2. 10
      animal/README.rst
  3. 2
      animal/i18n/animal.pot
  4. 174
      animal/i18n/es.po
  5. 6
      animal/static/description/index.html
  6. 392
      animal/views/animal.xml
  7. 1
      animal/views/animal_breed.xml
  8. 1
      animal/views/animal_color.xml
  9. 1
      animal/views/animal_species.xml

1
README.md

@ -19,6 +19,7 @@ Available addons
----------------
addon | version | summary
--- | --- | ---
[animal](animal/) | 14.0.1.0.0 | Animal
[base_country_state_translatable](base_country_state_translatable/) | 14.0.1.0.0 | Translate Country States
[base_location](base_location/) | 14.0.1.0.1 | Enhanced zip/npa management system
[base_location_geonames_import](base_location_geonames_import/) | 14.0.1.0.0 | Import zip entries from Geonames

10
animal/README.rst

@ -14,13 +14,13 @@ Animal
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github
:target: https://github.com/OCA/partner-contact/tree/12.0/animal
:target: https://github.com/OCA/partner-contact/tree/14.0/animal
:alt: OCA/partner-contact
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/partner-contact-12-0/partner-contact-12-0-animal
:target: https://translation.odoo-community.org/projects/partner-contact-14-0/partner-contact-14-0-animal
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/134/12.0
:target: https://runbot.odoo-community.org/runbot/134/14.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@ -45,7 +45,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/partner-contact/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/partner-contact/issues/new?body=module:%20animal%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/partner-contact/issues/new?body=module:%20animal%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
@ -85,6 +85,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-max3903|
This module is part of the `OCA/partner-contact <https://github.com/OCA/partner-contact/tree/12.0/animal>`_ project on GitHub.
This module is part of the `OCA/partner-contact <https://github.com/OCA/partner-contact/tree/14.0/animal>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

2
animal/i18n/animal.pot

@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"

174
animal/i18n/es.po

@ -1,20 +1,21 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * animal
# * animal
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-10-19 17:08+0000\n"
"Last-Translator: Maxime Chambreuil <mchambreuil@opensourceintegrators.com>\n"
"Language-Team: none\n"
"Language: es\n"
"POT-Creation-Date: 2021-03-09 21:15+0000\n"
"PO-Revision-Date: 2021-03-09 21:35+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.10\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"Language: es\n"
"X-Generator: Poedit 2.4.2\n"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__message_needaction
@ -31,17 +32,26 @@ msgstr "Activo"
msgid "Activities"
msgstr "Actividades"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__activity_exception_decoration
msgid "Activity Exception Decoration"
msgstr "Decoración de excepción de actividad"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__activity_state
msgid "Activity State"
msgstr "Estado de la actividad"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__activity_type_icon
msgid "Activity Type Icon"
msgstr "Icono de tipo de actividad"
#. module: animal
#: model:ir.model,name:animal.model_animal
#: model:ir.module.category,name:animal.animal
#: model_terms:ir.ui.view,arch_db:animal.view_animal_form
msgid "Animal"
msgstr ""
msgstr "Animal"
#. module: animal
#: model:ir.model,name:animal.model_animal_breed
@ -60,16 +70,22 @@ msgstr "Especies"
#. module: animal
#: model:ir.actions.act_window,name:animal.action_animal
#: model:ir.ui.menu,name:animal.root
#: model:ir.ui.menu,name:animal.animal model:ir.ui.menu,name:animal.root
#: model_terms:ir.ui.view,arch_db:animal.view_animal_search
#: model_terms:ir.ui.view,arch_db:animal.view_animal_tree
msgid "Animals"
msgstr "Animales"
#. module: animal
#: model_terms:ir.ui.view,arch_db:animal.view_animal_form
#: model_terms:ir.ui.view,arch_db:animal.view_animal_search
msgid "Archived"
msgstr "Archivado"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__message_attachment_count
msgid "Attachment Count"
msgstr "Numero de archivos"
msgstr "Número de archivos"
#. module: animal
#: model_terms:ir.ui.view,arch_db:animal.view_animal_kanban
@ -79,7 +95,7 @@ msgstr "Avatar"
#. module: animal
#: model:animal.breed,name:animal.beagle
msgid "Beagle"
msgstr ""
msgstr "Beagle"
#. module: animal
#: model:animal.species,name:animal.bird
@ -94,7 +110,7 @@ msgstr "Fecha de nacimiento"
#. module: animal
#: model:animal.breed,name:animal.boxer
msgid "Boxer"
msgstr ""
msgstr "Boxer"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__breed_id
@ -116,12 +132,12 @@ msgstr "Razas"
#. module: animal
#: model:animal.breed,name:animal.bull_terrier
msgid "Bull Terrier"
msgstr ""
msgstr "Bull Terrier"
#. module: animal
#: model:animal.breed,name:animal.bulldog
msgid "Bulldog"
msgstr ""
msgstr "Bulldog"
#. module: animal
#: model:animal.species,name:animal.cat
@ -131,24 +147,24 @@ msgstr "Gato"
#. module: animal
#: model:animal.breed,name:animal.chihuahua
msgid "Chihuahua"
msgstr ""
msgstr "Chihuahua"
#. module: animal
#: model:animal.breed,name:animal.cocker
msgid "Cocker"
msgstr ""
msgstr "Cocker"
#. module: animal
#: model:animal.breed,name:animal.collie
msgid "Collie"
msgstr ""
msgstr "Collie"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__color_id
#: model_terms:ir.ui.view,arch_db:animal.view_animal_color_form
#: model_terms:ir.ui.view,arch_db:animal.view_animal_search
msgid "Color"
msgstr ""
msgstr "Color"
#. module: animal
#: model:ir.actions.act_window,name:animal.action_animal_color
@ -200,12 +216,12 @@ msgstr "Creado el"
#. module: animal
#: model:animal.breed,name:animal.dachshund
msgid "Dachshund"
msgstr ""
msgstr "Dachshund"
#. module: animal
#: model:animal.breed,name:animal.dalmatian
msgid "Dalmatian"
msgstr ""
msgstr "Dálmata"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__display_name
@ -218,7 +234,7 @@ msgstr "Nombre"
#. module: animal
#: model:animal.breed,name:animal.doberman
msgid "Doberman"
msgstr ""
msgstr "Doberman"
#. module: animal
#: model:animal.species,name:animal.dog
@ -228,10 +244,10 @@ msgstr "Perro"
#. module: animal
#: model:animal.breed,name:animal.english_cocker_spaniel
msgid "English Cocker Spaniel"
msgstr ""
msgstr "Cocker Spaniel Inglés"
#. module: animal
#: selection:animal,gender:0
#: model:ir.model.fields.selection,name:animal.selection__animal__gender__female
#: model_terms:ir.ui.view,arch_db:animal.view_animal_search
msgid "Female"
msgstr "Hembra"
@ -251,10 +267,15 @@ msgstr "Seguidores (Canales)"
msgid "Followers (Partners)"
msgstr "Seguidores (Contactos)"
#. module: animal
#: model:ir.model.fields,help:animal.field_animal__activity_type_icon
msgid "Font awesome icon e.g. fa-tasks"
msgstr "Font awesome icon ej. fa-tasks"
#. module: animal
#: model:animal.breed,name:animal.french_bulldog
msgid "French Bulldog"
msgstr ""
msgstr "Bulldog Francés"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__gender
@ -265,17 +286,17 @@ msgstr "Género"
#. module: animal
#: model:animal.breed,name:animal.german_shepard
msgid "German Shepard"
msgstr ""
msgstr "Pastor Alemán"
#. module: animal
#: model:animal.breed,name:animal.golden_retriever
msgid "Golden Retriever"
msgstr ""
msgstr "Golden Retriever"
#. module: animal
#: model:animal.breed,name:animal.great_dane
msgid "Great Dane"
msgstr ""
msgstr "Gran Danés"
#. module: animal
#: model_terms:ir.ui.view,arch_db:animal.view_animal_search
@ -283,7 +304,7 @@ msgid "Group By"
msgstr "Agrupar por"
#. module: animal
#: selection:animal,gender:0
#: model:ir.model.fields.selection,name:animal.selection__animal__gender__hermaphrodite
#: model_terms:ir.ui.view,arch_db:animal.view_animal_search
msgid "Hermaphrodite"
msgstr "Hermafrodita"
@ -297,19 +318,25 @@ msgid "ID"
msgstr "Id"
#. module: animal
#: model:ir.model.fields,help:animal.field_animal__message_unread
msgid "If checked new messages require your attention."
msgstr ""
#: model:ir.model.fields,field_description:animal.field_animal__activity_exception_icon
msgid "Icon"
msgstr "Ícono"
#. module: animal
#: model:ir.model.fields,help:animal.field_animal__activity_exception_icon
msgid "Icon to indicate an exception activity."
msgstr "Ícono para indicar una actividad de excepción."
#. module: animal
#: model:ir.model.fields,help:animal.field_animal__message_needaction
#: model:ir.model.fields,help:animal.field_animal__message_unread
msgid "If checked, new messages require your attention."
msgstr ""
msgstr "Si está marcado, nuevos mensajes requieren tu atención."
#. module: animal
#: model:ir.model.fields,help:animal.field_animal__message_has_error
msgid "If checked, some messages have a delivery error."
msgstr ""
msgstr "Si está marcado, algunos mensajes tienen un error en la entrega."
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__image
@ -324,12 +351,12 @@ msgstr "Es un seguidor"
#. module: animal
#: model:animal.breed,name:animal.jack_russell
msgid "Jack Russell"
msgstr ""
msgstr "Jack Russell"
#. module: animal
#: model:animal.breed,name:animal.labrador
msgid "Labrador"
msgstr ""
msgstr "Labrador"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal____last_update
@ -358,10 +385,10 @@ msgstr "Ultima modificación el"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__message_main_attachment_id
msgid "Main Attachment"
msgstr ""
msgstr "Adjunto principal"
#. module: animal
#: selection:animal,gender:0
#: model:ir.model.fields.selection,name:animal.selection__animal__gender__male
#: model_terms:ir.ui.view,arch_db:animal.view_animal_search
msgid "Male"
msgstr "Macho"
@ -374,7 +401,7 @@ msgstr "Gerente"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__message_has_error
msgid "Message Delivery error"
msgstr "Error de entrega"
msgstr "Error de entrega del mensaje"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__message_ids
@ -391,7 +418,7 @@ msgid "Name"
msgstr "Nombre"
#. module: animal
#: selection:animal,gender:0
#: model:ir.model.fields.selection,name:animal.selection__animal__gender__neutered
#: model_terms:ir.ui.view,arch_db:animal.view_animal_search
msgid "Neutered"
msgstr "Castrado/a"
@ -399,7 +426,7 @@ msgstr "Castrado/a"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__activity_date_deadline
msgid "Next Activity Deadline"
msgstr "Fecha limite de la próxima actividad"
msgstr "Fecha límite de la próxima actividad"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__activity_summary
@ -414,47 +441,37 @@ msgstr "Tipo de la próxima actividad"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__message_needaction_counter
msgid "Number of Actions"
msgstr "Numero de acciones"
msgstr "Número de acciones"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__message_has_error_counter
msgid "Number of error"
msgstr "Numero de errores"
msgid "Number of errors"
msgstr "Número de errores"
#. module: animal
#: model:ir.model.fields,help:animal.field_animal__message_needaction_counter
msgid "Number of messages which requires an action"
msgstr ""
msgstr "Número de mensajes que requieren una acción"
#. module: animal
#: model:ir.model.fields,help:animal.field_animal__message_has_error_counter
msgid "Number of messages with delivery error"
msgstr ""
msgstr "Número de mensajes con error de entrega"
#. module: animal
#: model:ir.model.fields,help:animal.field_animal__message_unread_counter
msgid "Number of unread messages"
msgstr ""
#. module: animal
#: selection:animal,activity_state:0
msgid "Overdue"
msgstr "Vencido"
#. module: animal
#: selection:animal,activity_state:0
msgid "Planned"
msgstr "Planeado"
msgstr "Número de mensajes sin leer"
#. module: animal
#: model:animal.breed,name:animal.pomeranian
msgid "Pomeranian"
msgstr ""
msgstr "Pomerania"
#. module: animal
#: model:animal.breed,name:animal.pug
msgid "Pug"
msgstr ""
msgstr "Pug"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__ref
@ -469,7 +486,7 @@ msgstr "Usuario responsable"
#. module: animal
#: model:animal.breed,name:animal.rottweiler
msgid "Rottweiler"
msgstr ""
msgstr "Rottweiler"
#. module: animal
#: model:animal.color,name:animal.salt
@ -479,7 +496,7 @@ msgstr "Sal y pimienta"
#. module: animal
#: model:animal.breed,name:animal.schnauzer
msgid "Schnauzer"
msgstr ""
msgstr "Schnauzer"
#. module: animal
#: model:ir.ui.menu,name:animal.settings
@ -489,12 +506,12 @@ msgstr "Ajustes"
#. module: animal
#: model:animal.breed,name:animal.shih_tzu
msgid "Shih Tzu"
msgstr ""
msgstr "Shih Tzu"
#. module: animal
#: model:animal.breed,name:animal.siberian_husky
msgid "Siberian Husky"
msgstr ""
msgstr "Husky Siberiano"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__size
@ -515,11 +532,16 @@ msgstr "Especies"
#. module: animal
#: model:ir.model.fields,help:animal.field_animal__activity_state
msgid "Status based on activities\n"
msgid ""
"Status based on activities\n"
"Overdue: Due date is already passed\n"
"Today: Activity date is today\n"
"Planned: Future activities."
msgstr ""
"Estado basado en actividades\n"
"Atrasado: La fecha de vencimiento ya ha pasado\n"
"Hoy: La fecha de la actividad es hoy\n"
"Planeado: Actividades futuras."
#. module: animal
#: model:ir.model.fields,help:animal.field_animal__image
@ -527,9 +549,9 @@ msgid "This field holds the photo of the animal."
msgstr "Foto del animal."
#. module: animal
#: selection:animal,activity_state:0
msgid "Today"
msgstr "Hoy"
#: model:ir.model.fields,help:animal.field_animal__activity_exception_decoration
msgid "Type of the exception activity on record."
msgstr "Tipo de actividad de excepción registrada."
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__message_unread
@ -539,17 +561,7 @@ msgstr "Nuevos mensajes"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__message_unread_counter
msgid "Unread Messages Counter"
msgstr ""
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__website_message_ids
msgid "Website Messages"
msgstr ""
#. module: animal
#: model:ir.model.fields,help:animal.field_animal__website_message_ids
msgid "Website communication history"
msgstr ""
msgstr "Contador de mensajes sin leer"
#. module: animal
#: model:ir.model.fields,field_description:animal.field_animal__weight
@ -559,7 +571,7 @@ msgstr "Peso (en kg)"
#. module: animal
#: model:animal.breed,name:animal.yorkshire_terrier
msgid "Yorkshire Terrier"
msgstr ""
msgstr "Yorkshire Terrier"
#. module: animal
#: model_terms:ir.ui.view,arch_db:animal.view_animal_color_tree

6
animal/static/description/index.html

@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/partner-contact/tree/12.0/animal"><img alt="OCA/partner-contact" src="https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/partner-contact-12-0/partner-contact-12-0-animal"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/134/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/partner-contact/tree/14.0/animal"><img alt="OCA/partner-contact" src="https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/partner-contact-14-0/partner-contact-14-0-animal"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/134/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module allows you to store animal information.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
@ -395,7 +395,7 @@ color.</li>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/partner-contact/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/partner-contact/issues/new?body=module:%20animal%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/partner-contact/issues/new?body=module:%20animal%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
@ -424,7 +424,7 @@ mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external" href="https://github.com/max3903"><img alt="max3903" src="https://github.com/max3903.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/partner-contact/tree/12.0/animal">OCA/partner-contact</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/partner-contact/tree/14.0/animal">OCA/partner-contact</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>

392
animal/views/animal.xml

@ -1,216 +1,216 @@
<odoo>
<data>
<!-- Animal Tree View -->
<record id="view_animal_tree" model="ir.ui.view">
<field name="name">animal.tree</field>
<field name="model">animal</field>
<field name="arch" type="xml">
<tree string="Animals">
<field name="ref" />
<field name="name" />
<field name="gender" />
<field name="species_id" />
<field name="breed_id" />
<field name="color_id" />
</tree>
</field>
</record>
<!-- Animal Tree View -->
<record id="view_animal_tree" model="ir.ui.view">
<field name="name">animal.tree</field>
<field name="model">animal</field>
<field name="arch" type="xml">
<tree string="Animals">
<field name="ref" />
<field name="name" />
<field name="gender" />
<field name="species_id" />
<field name="breed_id" />
<field name="color_id" />
</tree>
</field>
</record>
<!-- Animal Form View -->
<record id="view_animal_form" model="ir.ui.view">
<field name="name">animal.form</field>
<field name="model">animal</field>
<field name="arch" type="xml">
<form string="Animal">
<header />
<sheet>
<div class="oe_button_box" name="button_box">
<button
name="toggle_active"
type="object"
class="oe_stat_button"
icon="fa-archive"
>
<!-- Animal Form View -->
<record id="view_animal_form" model="ir.ui.view">
<field name="name">animal.form</field>
<field name="model">animal</field>
<field name="arch" type="xml">
<form string="Animal">
<sheet>
<widget
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
/>
<field name="active" invisible="1" />
<field name="image" widget='image' class="oe_avatar" />
<div class="oe_title">
<h1>
<field name="name" />
</h1>
<field
name="active"
widget="boolean_button"
options='{"terminology": "archive"}'
name="gender"
widget="radio"
options="{'horizontal': true}"
/>
</button>
</div>
<field name="image" widget='image' class="oe_avatar" />
<div class="oe_title">
<h1>
<field name="name" />
</h1>
</div>
<group id="main">
<group id="left">
<field name="species_id" />
<field
name="breed_id"
domain="[('species_id', '=', species_id)]"
/>
<field
name="color_id"
domain="[('breed_id', '=', breed_id)]"
/>
<field name="size" />
</group>
<group id="right">
<field name="ref" />
<field name="weight" />
<field name="birth_date" />
</group>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" />
<field name="activity_ids" widget="mail_activity" />
<field
name="gender"
widget="radio"
options="{'horizontal': true}"
name="message_ids"
widget="mail_thread"
options="{'post_refresh': 'recipients'}"
/>
</div>
<group id="main">
<group id="left">
<field name="species_id" />
<field
name="breed_id"
domain="[('species_id', '=', species_id)]"
/>
<field
name="color_id"
domain="[('breed_id', '=', breed_id)]"
/>
<field name="size" />
</group>
<group id="right">
<field name="ref" />
<field name="weight" />
<field name="birth_date" />
</group>
</group>
<notebook />
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" />
<field name="activity_ids" widget="mail_activity" />
<field
name="message_ids"
widget="mail_thread"
options="{'post_refresh': 'recipients'}"
/>
</div>
</form>
</field>
</record>
</form>
</field>
</record>
<!-- Animal Kanban View -->
<record id="view_animal_kanban" model="ir.ui.view">
<field name="name">animal.kanban</field>
<field name="model">animal</field>
<field name="arch" type="xml">
<kanban class="o_res_partner_kanban">
<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"
>
<t t-if="record.image.raw_value">
<img
class="o_kanban_image"
t-att-src="kanban_image('animal', 'image', record.id.raw_value)"
t-att-alt="record.name"
/>
</t>
<t t-else="">
<img
class="o_kanban_image"
alt="Avatar"
t-att-src='_s + "/animal/static/img/avatar.png"'
/>
</t>
<div class="oe_kanban_details">
<strong
class="o_kanban_record_title oe_partner_heading"
><field name="display_name" /></strong>
<div
class="o_kanban_tags_section oe_kanban_partner_categories"
/>
<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"
><field name="breed_id" />, <field
name="species_id"
/></li>
</ul>
<div class="oe_kanban_partner_links" />
<!-- Animal Kanban View -->
<record id="view_animal_kanban" model="ir.ui.view">
<field name="name">animal.kanban</field>
<field name="model">animal</field>
<field name="arch" type="xml">
<kanban class="o_res_partner_kanban">
<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"
>
<t t-if="record.image.raw_value">
<img
class="o_kanban_image"
t-att-src="kanban_image('animal', 'image', record.id.raw_value)"
t-att-alt="record.name"
/>
</t>
<t t-else="">
<img
class="o_kanban_image"
alt="Avatar"
t-att-src='_s + "/animal/static/img/avatar.png"'
/>
</t>
<div class="oe_kanban_details">
<strong
class="o_kanban_record_title oe_partner_heading"
><field name="display_name" /></strong>
<div
class="o_kanban_tags_section oe_kanban_partner_categories"
/>
<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"
><field name="breed_id" />, <field
name="species_id"
/></li>
</ul>
<div class="oe_kanban_partner_links" />
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
</t>
</templates>
</kanban>
</field>
</record>
<!-- Search for animal -->
<record id="view_animal_search" model="ir.ui.view">
<field name="name">animal.search</field>
<field name="model">animal</field>
<field name="arch" type="xml">
<search string="Animals">
<field
name="name"
filter_domain="['|', ('name', 'ilike', self), ('ref', 'ilike', self)]"
string="Name"
/>
<field name="species_id" />
<field name="breed_id" />
<field name="color_id" />
<field name="size" />
<separator />
<filter
string="Female"
domain="[('gender', '=', 'female')]"
name="female"
/>
<filter string="Male" domain="[('gender', '=', 'male')]" name="male" />
<filter
string="Hermaphrodite"
domain="[('gender', '=', 'hermaphrodite')]"
name="hermaphrodite"
/>
<filter
string="Neutered"
domain="[('gender', '=', 'neutered')]"
name="neutered"
/>
<separator />
<group expand="0" string="Group By">
<!-- Search for animal -->
<record id="view_animal_search" model="ir.ui.view">
<field name="name">animal.search</field>
<field name="model">animal</field>
<field name="arch" type="xml">
<search string="Animals">
<field
name="name"
filter_domain="['|', ('name', 'ilike', self), ('ref', 'ilike', self)]"
string="Name"
/>
<field name="species_id" />
<field name="breed_id" />
<field name="color_id" />
<field name="size" />
<separator />
<filter
name="gender"
string="Gender"
domain=""
context="{'group_by': 'gender'}"
string="Female"
domain="[('gender', '=', 'female')]"
name="female"
/>
<filter
name="species_id"
string="Species"
domain=""
context="{'group_by': 'species_id'}"
string="Male"
domain="[('gender', '=', 'male')]"
name="male"
/>
<filter
name="breed_id"
string="Breed"
domain=""
context="{'group_by': 'breed_id'}"
string="Hermaphrodite"
domain="[('gender', '=', 'hermaphrodite')]"
name="hermaphrodite"
/>
<filter
name="color_id"
string="Color"
domain=""
context="{'group_by': 'color_id'}"
string="Neutered"
domain="[('gender', '=', 'neutered')]"
name="neutered"
/>
</group>
</search>
</field>
</record>
<record id="action_animal" model="ir.actions.act_window">
<field name="name">Animals</field>
<field name="res_model">animal</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="search_view_id" ref="view_animal_search" />
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create an animal.
</p>
</field>
</record>
<separator />
<filter
string="Archived"
name="inactive"
domain="[('active', '=', False)]"
/>
<separator />
<group expand="0" string="Group By">
<filter
name="gender"
string="Gender"
domain=""
context="{'group_by': 'gender'}"
/>
<filter
name="species_id"
string="Species"
domain=""
context="{'group_by': 'species_id'}"
/>
<filter
name="breed_id"
string="Breed"
domain=""
context="{'group_by': 'breed_id'}"
/>
<filter
name="color_id"
string="Color"
domain=""
context="{'group_by': 'color_id'}"
/>
</group>
</search>
</field>
</record>
<record id="action_animal" model="ir.actions.act_window">
<field name="name">Animals</field>
<field name="res_model">animal</field>
<field name="view_mode">kanban,tree,form</field>
<field name="search_view_id" ref="view_animal_search" />
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create an animal.
</p>
</field>
</record>
</data>
</odoo>

1
animal/views/animal_breed.xml

@ -41,7 +41,6 @@
<record id="action_animal_breed" model="ir.actions.act_window">
<field name="name">Breeds</field>
<field name="res_model">animal.breed</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">

1
animal/views/animal_color.xml

@ -43,7 +43,6 @@
<record id="action_animal_color" model="ir.actions.act_window">
<field name="name">Colors</field>
<field name="res_model">animal.color</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">

1
animal/views/animal_species.xml

@ -42,7 +42,6 @@
<record id="action_animal_species" model="ir.actions.act_window">
<field name="name">Species</field>
<field name="res_model">animal.species</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">

Loading…
Cancel
Save