Parcourir la source

Modulo de granja

sebas il y a 4 ans
commit
92779b8f81
97 fichiers modifiés avec 12918 ajouts et 0 suppressions
  1. 17 0
      .project
  2. 8 0
      .pydevproject
  3. 2 0
      .settings/org.eclipse.core.resources.prefs
  4. 85 0
      README.rst
  5. 6 0
      __init__.py
  6. BIN
      __init__.pyc
  7. 74 0
      __openerp__.py
  8. 14 0
      data/farm_data.xml
  9. 3055 0
      i18n/es.po
  10. 3055 0
      i18n/farm.pot
  11. 8 0
      models/__init__.py
  12. BIN
      models/__init__.pyc
  13. 41 0
      models/abort_event.py
  14. BIN
      models/abort_event.pyc
  15. 77 0
      models/abstract_event.py
  16. BIN
      models/abstract_event.pyc
  17. 13 0
      models/account_invoice.py
  18. BIN
      models/account_invoice.pyc
  19. 95 0
      models/analitic_sales.py
  20. BIN
      models/analitic_sales.pyc
  21. 537 0
      models/animal.py
  22. BIN
      models/animal.pyc
  23. 370 0
      models/animal_group.py
  24. BIN
      models/animal_group.pyc
  25. 210 0
      models/consume_stock.py
  26. BIN
      models/consume_stock.pyc
  27. 147 0
      models/event_order.py
  28. BIN
      models/event_order.pyc
  29. 207 0
      models/farrowing_event.py
  30. BIN
      models/farrowing_event.pyc
  31. 82 0
      models/feed_abstract_event.py
  32. BIN
      models/feed_abstract_event.pyc
  33. 158 0
      models/feed_event.py
  34. BIN
      models/feed_event.pyc
  35. 123 0
      models/feed_inventory.py
  36. BIN
      models/feed_inventory.pyc
  37. 92 0
      models/foster_event.py
  38. BIN
      models/foster_event.pyc
  39. 114 0
      models/insemination_event.py
  40. BIN
      models/insemination_event.pyc
  41. 75 0
      models/medication_event.py
  42. BIN
      models/medication_event.pyc
  43. 37 0
      models/move_event.py
  44. BIN
      models/move_event.pyc
  45. 47 0
      models/pregnancy_diagnosis_event.py
  46. BIN
      models/pregnancy_diagnosis_event.pyc
  47. 19 0
      models/product.py
  48. BIN
      models/product.pyc
  49. 86 0
      models/production.py
  50. BIN
      models/production.pyc
  51. 505 0
      models/purchse_analytics.py
  52. BIN
      models/purchse_analytics.pyc
  53. 195 0
      models/removal_event.py
  54. BIN
      models/removal_event.pyc
  55. 13 0
      models/res_company.py
  56. BIN
      models/res_company.pyc
  57. 258 0
      models/semen_extration_event.py
  58. BIN
      models/semen_extration_event.pyc
  59. 162 0
      models/specie.py
  60. BIN
      models/specie.pyc
  61. 298 0
      models/stock.py
  62. BIN
      models/stock.pyc
  63. 443 0
      models/transformation_event.py
  64. BIN
      models/transformation_event.pyc
  65. 28 0
      models/user.py
  66. 240 0
      models/weaning_event.py
  67. BIN
      models/weaning_event.pyc
  68. 18 0
      security/farm_security.xml
  69. 61 0
      security/ir.model.access.csv
  70. 30 0
      views/abort_event.xml
  71. 71 0
      views/abstract_event.xml
  72. 30 0
      views/account_invoice.xml
  73. 205 0
      views/animal.xml
  74. 119 0
      views/animal_group.xml
  75. 21 0
      views/breed.xml
  76. 66 0
      views/consume_stock.xml
  77. 45 0
      views/event_move.xml
  78. 76 0
      views/event_order.xml
  79. 114 0
      views/farm_menu.xml
  80. 67 0
      views/farrowing_event.xml
  81. 94 0
      views/feed_event.xml
  82. 34 0
      views/foster_event.xml
  83. 35 0
      views/insemination_event.xml
  84. 57 0
      views/medication_event.xml
  85. 39 0
      views/move_event.xml
  86. 34 0
      views/pregnancy_diagnosis_event.xml
  87. 20 0
      views/product.xml
  88. 16 0
      views/production.xml
  89. 105 0
      views/purchase_analytics.xml
  90. 37 0
      views/removal_event.xml
  91. 15 0
      views/res_company.xml
  92. 91 0
      views/semen_extraction_event.xml
  93. 93 0
      views/specie.xml
  94. 195 0
      views/stock.xml
  95. 29 0
      views/tag.xml
  96. 43 0
      views/trasformation_event.xml
  97. 62 0
      views/weaning_event.xml

+ 17 - 0
.project

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>farm</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.python.pydev.PyDevBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.python.pydev.pythonNature</nature>
+	</natures>
+</projectDescription>

+ 8 - 0
.pydevproject

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?eclipse-pydev version="1.0"?><pydev_project>
+<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
+<path>/${PROJECT_DIR_NAME}</path>
+</pydev_pathproperty>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
+</pydev_project>

+ 2 - 0
.settings/org.eclipse.core.resources.prefs

@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/__openerp__.py=utf-8

+ 85 - 0
README.rst

@@ -0,0 +1,85 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+   :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
+   :alt: License: AGPL-3
+
+==============
+Farm
+==============
+
+
+This module was written to to control the process and cost of an animal farm for the production of meat products.
+It allows full traceability of lots of animals and foods that are fed well as origin (parents).
+Animals remains localized and the phase in which they are.
+Imputed costs of food, medication and general expenses to determine the net profit of the sales.
+
+Installation
+============
+
+To install this module, you need to:
+
+* clone the branch 8.0 of the repository https://github.com/OCA/vertical-agriculture
+* add the path to this repository in your configuration (addons-path)
+* update the module list
+* search for "farm" in your addons
+* install the module
+
+
+Usage
+=====
+
+To use this module, you need to:
+
+* product
+* stock
+* mrp
+* mrp_lot_cost (Revisar si mandar al repositorio de mrp o dejar aqui)
+
+.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
+   :alt: Try me on Runbot
+   :target: https://runbot.odoo-community.org/runbot/{repo_id}/{branch}
+
+.. repo_id is available in https://github.com/OCA/maintainer-tools/blob/master/tools/repos_with_ids.txt
+.. branch is "8.0" for example
+
+Known issues / Roadmap
+======================
+
+* semen_extraction does not pick materials of correct stock.location
+
+
+Bug Tracker
+===========
+
+Bugs are tracked on `GitHub Issues <https://github.com/OCA/
+https://github.com/OCA/vertical-agriculture/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 `here <https://github.com/OCA/
+https://github.com/OCA/vertical-agriculture/issues/new?body=module:%20
+farm%0Aversion:%20
+8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
+
+
+Credits
+=======
+
+Contributors
+------------
+
+* Alexander Ezquevo <alexander@acysos.com>
+
+Based in module farm of tryton developed by NaN·tic 
+
+Maintainer
+----------
+
+.. image:: https://odoo-community.org/logo.png
+   :alt: Odoo Community Association
+   :target: https://odoo-community.org
+
+This module is maintained by the OCA.
+
+OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
+
+To contribute to this module, please visit http://odoo-community.org.

+ 6 - 0
__init__.py

@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from . import models

BIN
__init__.pyc


+ 74 - 0
__openerp__.py

@@ -0,0 +1,74 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    @authors: Alexander Ezquevo <alexander@acysos.com>
+#    Copyright (C) 2015  Acysos S.L.
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+{
+    "name": "Addon for Animal farms",
+    "version": "8.2",
+    "license": "AGPL-3",
+    "author": "Acysos S.L.",
+    "website": "www.acysos.com",
+    "contributors": ['Alexander Ezquevo alexander@acysos.com', ],
+    "images": [],
+    "category": "Specific IndustrY",
+    "depends": [
+        "product",
+        "stock",
+        "mrp",
+        "mrp_lot_cost",
+        "purchase",
+        "account",
+        "sale",
+    ],
+    "data": [
+        "views/specie.xml",
+        "views/tag.xml",
+        "views/event_order.xml",
+        "views/abstract_event.xml",
+        "views/feed_event.xml",
+        "views/medication_event.xml",
+        "views/product.xml",
+        "views/animal.xml",
+        "views/breed.xml",
+        "views/animal_group.xml",
+        "views/stock.xml",
+        "views/abort_event.xml",
+        "views/pregnancy_diagnosis_event.xml",
+        "views/farrowing_event.xml",
+        "views/foster_event.xml",
+        "views/insemination_event.xml",
+        "views/move_event.xml",
+        "views/removal_event.xml",
+        "views/weaning_event.xml",
+        "views/trasformation_event.xml",
+        "views/production.xml",
+        "views/semen_extraction_event.xml",
+        "views/consume_stock.xml",
+        "views/farm_menu.xml",
+        "views/res_company.xml",
+        "views/event_move.xml",
+        "data/farm_data.xml",
+        "views/purchase_analytics.xml",
+        "views/account_invoice.xml",
+        "security/farm_security.xml",
+        "security/ir.model.access.csv",
+        
+    ],
+    "installable": True,
+}

+ 14 - 0
data/farm_data.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data noupdate="0">
+        <record id="analytic_journal_farm" model="account.analytic.journal">
+            <field name="code">FAR</field>
+            <field name="name">Farm</field>
+            <field name="type">general</field>
+        </record>
+        <record id="seq_type_farm_line" model="ir.sequence.type">
+            <field name="name">FarmLine</field>
+            <field name="code">farm.specie.farm_line</field>
+        </record>
+     </data>
+</openerp>

+ 3055 - 0
i18n/es.po

@@ -0,0 +1,3055 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+#	* farm
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-10-20 10:15+0000\n"
+"PO-Revision-Date: 2017-10-20 10:15+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: \n"
+
+#. module: farm
+#: field:farm.animal.female_cycle,abort_event:0
+msgid "Abort"
+msgstr "Aborto"
+
+#. module: farm
+#: view:farm.abort.event:farm.view_abort_event_form
+msgid "Abort Event"
+msgstr "Evento de Aborto"
+
+#. module: farm
+#: field:farm.event.order,abort_events:0
+msgid "Abort Events"
+msgstr "Eventos de Aborto"
+
+#. module: farm
+#: selection:farm.event.order,event_type:0
+msgid "Aborts"
+msgstr "Abortos"
+
+#. module: farm
+#: help:farm.animal,state:0
+msgid "According to NPPC Production and FinancialStandards there are four status for breedingsows The status change is event driven:arrivaldate, entry date mating event and removal event"
+msgstr "Según Producción NPPC y Normas Financieras hay cuatro de estado para cerdas de cría El cambio de estado es probocado por eventos: Llegada, apareamiento y eliminación"
+
+#. module: farm
+#: field:farm.animal,active:0
+#: field:farm.animal.group,active:0
+msgid "Active"
+msgstr "Activo"
+
+#. module: farm
+#: field:farm.animal,account:0
+#: field:farm.animal.group,account:0
+msgid "Analytic Account"
+msgstr "Cuenta Analítica"
+
+#. module: farm
+#: field:farm.abort.event,animal:0
+#: view:farm.animal:farm.view_animal_form
+#: view:farm.animal:farm.view_animal_tree
+#: field:farm.animal.weight,animal:0
+#: field:farm.event,animal:0
+#: field:farm.event.feed_mixin,animal:0
+#: field:farm.event.import.mixin,animal:0
+#: field:farm.farrowing.event,animal:0
+#: field:farm.feed.animal_location_date,animal:0
+#: field:farm.feed.event,animal:0
+#: field:farm.foster.event,animal:0
+#: field:farm.insemination.event,animal:0
+#: field:farm.medication.event,animal:0
+#: field:farm.move.event,animal:0
+#: field:farm.pregnancy_diagnosis.event,animal:0
+#: field:farm.removal.event,animal:0
+#: field:farm.semen_extraction.event,animal:0
+#: field:farm.transformation.event,animal:0
+#: field:farm.weaning.event,animal:0
+#: model:ir.ui.menu,name:farm.menu_farm_animal
+#: field:stock.lot_farm.animal,animal:0
+msgid "Animal"
+msgstr "Animal"
+
+#. module: farm
+#: view:farm.animal.group:farm.view_animal_group
+#: view:farm.animal.group:farm.view_animal_group_tree
+#: field:stock.lot_farm.animal.group,animal_group:0
+msgid "Animal Group"
+msgstr "Grupo de Animales"
+
+#. module: farm
+#: view:stock.lot_farm.animal:farm.view_stock_lot_animal_form
+#: view:stock.lot_farm.animal.group:farm.view_stock_lot_animal_group_form
+msgid "Animal Group Tag"
+msgstr "Etiqueta de Grupo Animales"
+
+#. module: farm
+#: view:farm.animal.group.weight:farm.view_animal_group_weigth
+#: view:farm.animal.group.weight:farm.view_animal_group_weigth_tree
+msgid "Animal Group Weigth"
+msgstr "Peso de Grupo Animales"
+
+#. module: farm
+#: view:farm.move.event:farm.view_move_event_form
+msgid "Animal Move"
+msgstr "Movimiento animal"
+
+#. module: farm
+#: model:ir.actions.act_window,name:farm.location_open_animal_moves
+#: view:stock.location:farm.stock_location_form_farm_view
+msgid "Animal Moves"
+msgstr "Movimientos Animales"
+
+#. module: farm
+#: field:farm.abort.event,animal_type:0
+#: field:farm.event,animal_type:0
+#: field:farm.event.feed_mixin,animal_type:0
+#: field:farm.event.import.mixin,animal_type:0
+#: field:farm.event.order,animal_type:0
+#: field:farm.farrowing.event,animal_type:0
+#: field:farm.feed.animal_location_date,animal_type:0
+#: field:farm.feed.event,animal_type:0
+#: field:farm.foster.event,animal_type:0
+#: field:farm.insemination.event,animal_type:0
+#: field:farm.medication.event,animal_type:0
+#: field:farm.move.event,animal_type:0
+#: field:farm.pregnancy_diagnosis.event,animal_type:0
+#: field:farm.removal.event,animal_type:0
+#: field:farm.semen_extraction.event,animal_type:0
+#: field:farm.transformation.event,animal_type:0
+#: field:farm.weaning.event,animal_type:0
+msgid "Animal Type"
+msgstr "Tipo de Animal"
+
+#. module: farm
+#: field:farm.transformation.event,to_animal_type:0
+msgid "Animal Type to Trasform"
+msgstr "Tipo de Animal al que Trasformar"
+
+#. module: farm
+#: selection:farm.move.event,weight_record:0
+msgid "Animal Weight"
+msgstr "Peso Animal"
+
+#. module: farm
+#: model:ir.ui.menu,name:farm.menu_farm_animal_group
+msgid "Animal group"
+msgstr "Grupo de Animal"
+
+#. module: farm
+#: model:ir.actions.act_window,name:farm.farm_animal_group_view
+msgid "Animal groups"
+msgstr "Grupos de animales"
+
+#. module: farm
+#: field:stock.production.lot,animal_type:0
+msgid "Animal type"
+msgstr "Tipo Animal"
+
+#. module: farm
+#: field:farm.tags,animals:0
+#: model:ir.actions.act_window,name:farm.farm_animal_view
+#: model:ir.ui.menu,name:farm.menu_farm_animals
+msgid "Animals"
+msgstr "Animales"
+
+#. module: farm
+#: view:farm.move.event:farm.view_move_event_tree
+msgid "Animals Moves"
+msgstr "Movimientos Animales"
+
+#. module: farm
+#: field:farm.animal,arrival_date:0
+#: field:farm.animal.group,arrival_date:0
+msgid "Arrival Date"
+msgstr "Fecha de Llegada"
+
+#. module: farm
+#: field:purchase.order.line,end_date:0
+msgid "Bill end date"
+msgstr "Fin Periodo Factura"
+
+#. module: farm
+#: model:ir.model,name:farm.model_mrp_bom
+msgid "Bill of Material"
+msgstr "Lista de material"
+
+#. module: farm
+#: field:purchase.order.line,start_date:0
+msgid "Bill start day"
+msgstr "Inicio Periodo Factura"
+
+#. module: farm
+#: field:farm.animal,birthdate:0
+msgid "Birthdate"
+msgstr "Fecha Nacimiento"
+
+#. module: farm
+#: field:farm.animal,breed:0
+#: field:farm.animal.group,breed:0
+#: view:farm.specie.breed:farm.view_breed_form
+msgid "Breed"
+msgstr "Raza"
+
+#. module: farm
+#: field:farm.specie,breeds:0
+msgid "Breeds"
+msgstr "Razas"
+
+#. module: farm
+#: view:farm.semen_extraction.event:farm.view_semen_extraction_event_form
+msgid "Calc. Doses"
+msgstr "Calc. Dosis"
+
+#. module: farm
+#: field:farm.semen_extraction.event,semen_calculated_qty:0
+msgid "Calc. Semen Produced Qty"
+msgstr "Calc. Cantidad Producidos de Semen "
+
+#. module: farm
+#: field:farm.semen_extraction.event,solvent_calculated_qty:0
+msgid "Calc. semen solvent Qty"
+msgstr "Calc. Cantidad Disolvente de semen"
+
+#. module: farm
+#: field:farm.semen_extraction.event,dose_calculated_units:0
+msgid "Calculated Doses"
+msgstr "Dosis Calculado"
+
+#. module: farm
+#: help:farm.semen_extraction.event,dose_calculated_units:0
+msgid "Calculates the number of doses based on Container (BoM) and Semen Produced Qty. The quantity is expressed in the UoM of the Container.\n"
+"You have to save the event to see this calculated value."
+msgstr "Calculates the number of doses based on Container (BoM) and Semen Produced Qty. The quantity is expressed in the UoM of the Container.\n"
+"You have to save the event to see this calculated value."
+
+#. module: farm
+#: selection:farm.feed.inventory,state:0
+#: selection:farm.feed.inventory.mixin,state:0
+#: selection:farm.feed.provisional_inventory,state:0
+msgid "Cancelled"
+msgstr "Cancelado"
+
+#. module: farm
+#: code:addons/farm/models/purchse_analytics.py:86
+#, python-format
+msgid "Choose farm or yard"
+msgstr "Elige granja o corral"
+
+#. module: farm
+#: model:ir.model,name:farm.model_res_company
+msgid "Companies"
+msgstr "Compañías"
+
+#. module: farm
+#: model:ir.ui.menu,name:farm.menu_farm_consume_stock
+msgid "Comsume Stock"
+msgstr "Consumir Stock"
+
+#. module: farm
+#: field:farm.event.feed_mixin,feed_quantity:0
+#: field:farm.feed.event,feed_quantity:0
+#: field:farm.medication.event,feed_quantity:0
+msgid "Comsumed Cuantity"
+msgstr "Cantidad Consumida"
+
+#. module: farm
+#: model:ir.ui.menu,name:farm.menu_farm_configuration
+msgid "Configuration"
+msgstr "Configuración"
+
+#. module: farm
+#: view:farm.consume.stock:farm.view_consume_stock_form
+msgid "Confirm Consume"
+msgstr "Confirmar Consumo"
+
+#. module: farm
+#: view:farm.event.order:farm.view_event_order_form
+#: view:farm.removal.event:farm.view_removal_event_form
+#: view:farm.semen_extraction.event:farm.view_semen_extraction_event_form
+msgid "Confirm Order"
+msgstr "Confirmar Orden"
+
+#. module: farm
+#: selection:farm.consume.stock,state:0
+msgid "Confirmed"
+msgstr "Confirmado"
+
+#. module: farm
+#: view:farm.consume.stock:farm.view_consume_stock_form
+msgid "Consume stock"
+msgstr "Consumir stock"
+
+#. module: farm
+#: model:ir.actions.act_window,name:farm.farm_consume_stock_view
+msgid "ConsumeStock"
+msgstr "ConsumeStock"
+
+#. module: farm
+#: field:farm.animal,consumed_feed:0
+msgid "Consumed Feed (kg)"
+msgstr "Alimento Consumido (kg)"
+
+#. module: farm
+#: field:res.company,feed_account:0
+msgid "Consumed Feed Account"
+msgstr "Cuenta de Alimento Consumido"
+
+#. module: farm
+#: field:farm.animal.group,consumed_feed:0
+msgid "Consumed Feed per Animal (kg)"
+msgstr "Comida consumido por Animal (kg)"
+
+#. module: farm
+#: field:farm.feed.animal_location_date,consumed_qty:0
+msgid "Consumed Qty"
+msgstr "Cantidad Consumida"
+
+#. module: farm
+#: field:farm.feed.animal_location_date,consumed_qty_animal:0
+msgid "Consumed Qty, per Animal"
+msgstr "Cantidad Consumida por Animal"
+
+#. module: farm
+#: field:farm.semen_extraction.dose,bom:0
+msgid "Container"
+msgstr "Contenedor"
+
+#. module: farm
+#: field:mrp.analitic.remain,qty_per_unit:0
+msgid "Cost per unit"
+msgstr "Coste por unidad"
+
+#. module: farm
+#: field:farm.abort.event,create_uid:0
+#: field:farm.animal,create_uid:0
+#: field:farm.animal.female_cycle,create_uid:0
+#: field:farm.animal.group,create_uid:0
+#: field:farm.animal.group.weight,create_uid:0
+#: field:farm.animal.weight,create_uid:0
+#: field:farm.consume.stock,create_uid:0
+#: field:farm.event.order,create_uid:0
+#: field:farm.farrowing.event,create_uid:0
+#: field:farm.farrowing.event_female_cycle,create_uid:0
+#: field:farm.farrowing.event_group,create_uid:0
+#: field:farm.farrowing.problem,create_uid:0
+#: field:farm.feed.animal_location_date,create_uid:0
+#: field:farm.feed.event,create_uid:0
+#: field:farm.feed.inventory,create_uid:0
+#: field:farm.feed.provisional_inventory,create_uid:0
+#: field:farm.feed.stock.location,create_uid:0
+#: field:farm.foster.event,create_uid:0
+#: field:farm.foster.locations,create_uid:0
+#: field:farm.future_maders.locations,create_uid:0
+#: field:farm.insemination.event,create_uid:0
+#: field:farm.medication.event,create_uid:0
+#: field:farm.move.event,create_uid:0
+#: field:farm.pregnancy_diagnosis.event,create_uid:0
+#: field:farm.removal.event,create_uid:0
+#: field:farm.removal.reason,create_uid:0
+#: field:farm.removal.type,create_uid:0
+#: field:farm.semen_extraction.dose,create_uid:0
+#: field:farm.semen_extraction.event,create_uid:0
+#: field:farm.specie,create_uid:0
+#: field:farm.specie.breed,create_uid:0
+#: field:farm.specie.farm_line,create_uid:0
+#: field:farm.specie.ir.model,create_uid:0
+#: field:farm.tags,create_uid:0
+#: field:farm.transformation.event,create_uid:0
+#: field:farm.transit.locations,create_uid:0
+#: field:farm.weaning.event,create_uid:0
+#: field:farm.weaning.event_female_cycle,create_uid:0
+#: field:mrp.analitic.remain,create_uid:0
+#: field:purchase.analitic.remain,create_uid:0
+#: field:stock.location.silo_stock.location,create_uid:0
+#: field:stock.lot_farm.animal,create_uid:0
+#: field:stock.lot_farm.animal.group,create_uid:0
+msgid "Created by"
+msgstr "Creado por"
+
+#. module: farm
+#: field:farm.abort.event,create_date:0
+#: field:farm.animal,create_date:0
+#: field:farm.animal.female_cycle,create_date:0
+#: field:farm.animal.group,create_date:0
+#: field:farm.animal.group.weight,create_date:0
+#: field:farm.animal.weight,create_date:0
+#: field:farm.consume.stock,create_date:0
+#: field:farm.event.order,create_date:0
+#: field:farm.farrowing.event,create_date:0
+#: field:farm.farrowing.event_female_cycle,create_date:0
+#: field:farm.farrowing.event_group,create_date:0
+#: field:farm.farrowing.problem,create_date:0
+#: field:farm.feed.animal_location_date,create_date:0
+#: field:farm.feed.event,create_date:0
+#: field:farm.feed.inventory,create_date:0
+#: field:farm.feed.provisional_inventory,create_date:0
+#: field:farm.feed.stock.location,create_date:0
+#: field:farm.foster.event,create_date:0
+#: field:farm.foster.locations,create_date:0
+#: field:farm.future_maders.locations,create_date:0
+#: field:farm.insemination.event,create_date:0
+#: field:farm.medication.event,create_date:0
+#: field:farm.move.event,create_date:0
+#: field:farm.pregnancy_diagnosis.event,create_date:0
+#: field:farm.removal.event,create_date:0
+#: field:farm.removal.reason,create_date:0
+#: field:farm.removal.type,create_date:0
+#: field:farm.semen_extraction.dose,create_date:0
+#: field:farm.semen_extraction.event,create_date:0
+#: field:farm.specie,create_date:0
+#: field:farm.specie.breed,create_date:0
+#: field:farm.specie.farm_line,create_date:0
+#: field:farm.specie.ir.model,create_date:0
+#: field:farm.tags,create_date:0
+#: field:farm.transformation.event,create_date:0
+#: field:farm.transit.locations,create_date:0
+#: field:farm.weaning.event,create_date:0
+#: field:farm.weaning.event_female_cycle,create_date:0
+#: field:mrp.analitic.remain,create_date:0
+#: field:purchase.analitic.remain,create_date:0
+#: field:stock.location.silo_stock.location,create_date:0
+#: field:stock.lot_farm.animal,create_date:0
+#: field:stock.lot_farm.animal.group,create_date:0
+msgid "Created on"
+msgstr "Creado el"
+
+#. module: farm
+#: field:farm.animal,current_cycle:0
+msgid "Current Cycle"
+msgstr "Ciclo actual"
+
+#. module: farm
+#: field:farm.animal,farm:0
+#: field:farm.animal.group,farm:0
+msgid "Current Farm"
+msgstr "Granja Actual"
+
+#. module: farm
+#: field:farm.animal,location:0
+msgid "Current Location"
+msgstr "Localizacion Actual"
+
+#. module: farm
+#: field:farm.animal,current_weight:0
+msgid "Current Weight"
+msgstr "Peso actual"
+
+#. module: farm
+#: field:farm.animal.group,location:0
+msgid "Current location"
+msgstr "Localización Actual"
+
+#. module: farm
+#: field:farm.animal.group,current_weight:0
+msgid "Current weight"
+msgstr "Peso actual"
+
+#. module: farm
+#: field:res.users,customer_payment_mode:0
+msgid "Customer Payment Mode"
+msgstr "Modo de pago del cliente"
+
+#. module: farm
+#: field:farm.animal,cycles:0
+msgid "Cycles)"
+msgstr "Ciclos"
+
+#. module: farm
+#: field:farm.consume.stock,date:0
+#: field:farm.feed.animal_location_date,date:0
+#: field:mrp.analitic.remain,date:0
+msgid "Date"
+msgstr "Fecha"
+
+#. module: farm
+#: field:farm.abort.event,timestamp:0
+#: field:farm.animal.weight,timestamp:0
+#: field:farm.event,timestamp:0
+#: field:farm.event.feed_mixin,timestamp:0
+#: field:farm.event.import.mixin,timestamp:0
+#: field:farm.event.order,timestamp:0
+#: field:farm.farrowing.event,timestamp:0
+#: field:farm.feed.event,timestamp:0
+#: field:farm.feed.inventory,timestamp:0
+#: field:farm.feed.inventory.mixin,timestamp:0
+#: field:farm.feed.provisional_inventory,timestamp:0
+#: field:farm.foster.event,timestamp:0
+#: field:farm.insemination.event,timestamp:0
+#: field:farm.medication.event,timestamp:0
+#: field:farm.move.event,timestamp:0
+#: field:farm.pregnancy_diagnosis.event,timestamp:0
+#: field:farm.removal.event,timestamp:0
+#: field:farm.semen_extraction.event,timestamp:0
+#: field:farm.transformation.event,timestamp:0
+#: field:farm.weaning.event,timestamp:0
+msgid "Date & Time"
+msgstr "Dia y Hora"
+
+#. module: farm
+#: field:farm.animal.group.weight,timestamp:0
+msgid "Date & time"
+msgstr "Dia y Hora"
+
+#. module: farm
+#: field:farm.animal.female_cycle,ordination_date:0
+msgid "Date for ordination"
+msgstr "Fecha para la ordenación"
+
+#. module: farm
+#: field:farm.animal.group,transition_days:0
+msgid "Days in Transition"
+msgstr "Days in Transition"
+
+#. module: farm
+#: field:farm.animal.group,fattening_days:0
+msgid "Days in fatening"
+msgstr "Días de engorde"
+
+#. module: farm
+#: field:farm.animal.female_cycle,dead:0
+#: field:farm.farrowing.event,dead:0
+msgid "Dead"
+msgstr "Muerto"
+
+#. module: farm
+#: field:res.users,property_delivery_carrier:0
+msgid "Delivery Method"
+msgstr "Método de entrega"
+
+#. module: farm
+#: field:farm.move.event,to_location:0
+#: field:farm.transformation.event,to_location:0
+msgid "Destination"
+msgstr "Destino"
+
+#. module: farm
+#: field:farm.transformation.event,to_animal:0
+msgid "Destination Animal"
+msgstr "Animal de Destino"
+
+#. module: farm
+#: field:farm.transformation.event,to_animal_group:0
+msgid "Destination Group"
+msgstr "Grupo de Destino"
+
+#. module: farm
+#: code:addons/farm/models/transformation_event.py:56
+#, python-format
+msgid "Destination animal type no compatible"
+msgstr "Animal de destino incompatible"
+
+#. module: farm
+#: view:farm.consume.stock:farm.farm_consume_stock_search_view
+#: field:farm.consume.stock,to_location:0
+msgid "Destinity"
+msgstr "Destino"
+
+#. module: farm
+#: field:farm.animal.female_cycle,diagnosis_events:0
+msgid "Diagnosis"
+msgstr "Diagnostico"
+
+#. module: farm
+#: field:farm.abort.event,display_name:0
+#: field:farm.animal,display_name:0
+#: field:farm.animal.female_cycle,display_name:0
+#: field:farm.animal.group,display_name:0
+#: field:farm.animal.group.weight,display_name:0
+#: field:farm.animal.weight,display_name:0
+#: field:farm.consume.stock,display_name:0
+#: field:farm.event,display_name:0
+#: field:farm.event.feed_mixin,display_name:0
+#: field:farm.event.import.mixin,display_name:0
+#: field:farm.event.order,display_name:0
+#: field:farm.farrowing.event,display_name:0
+#: field:farm.farrowing.event_female_cycle,display_name:0
+#: field:farm.farrowing.event_group,display_name:0
+#: field:farm.farrowing.problem,display_name:0
+#: field:farm.feed.animal_location_date,display_name:0
+#: field:farm.feed.event,display_name:0
+#: field:farm.feed.inventory,display_name:0
+#: field:farm.feed.inventory.mixin,display_name:0
+#: field:farm.feed.provisional_inventory,display_name:0
+#: field:farm.feed.stock.location,display_name:0
+#: field:farm.foster.event,display_name:0
+#: field:farm.foster.locations,display_name:0
+#: field:farm.future_maders.locations,display_name:0
+#: field:farm.insemination.event,display_name:0
+#: field:farm.medication.event,display_name:0
+#: field:farm.move.event,display_name:0
+#: field:farm.pregnancy_diagnosis.event,display_name:0
+#: field:farm.removal.event,display_name:0
+#: field:farm.removal.reason,display_name:0
+#: field:farm.removal.type,display_name:0
+#: field:farm.semen_extraction.dose,display_name:0
+#: field:farm.semen_extraction.event,display_name:0
+#: field:farm.specie,display_name:0
+#: field:farm.specie.breed,display_name:0
+#: field:farm.specie.farm_line,display_name:0
+#: field:farm.specie.ir.model,display_name:0
+#: field:farm.tags,display_name:0
+#: field:farm.transformation.event,display_name:0
+#: field:farm.transit.locations,display_name:0
+#: field:farm.weaning.event,display_name:0
+#: field:farm.weaning.event_female_cycle,display_name:0
+#: field:mrp.analitic.remain,display_name:0
+#: field:purchase.analitic.remain,display_name:0
+#: field:stock.location.silo_stock.location,display_name:0
+#: field:stock.lot_farm.animal,display_name:0
+#: field:stock.lot_farm.animal.group,display_name:0
+msgid "Display Name"
+msgstr "Display Name"
+
+#. module: farm
+#: field:farm.consume.stock,type:0
+msgid "Distribution Type"
+msgstr "Tipo de distribución"
+
+#. module: farm
+#: field:farm.insemination.event,dose_bom:0
+#: view:farm.semen_extraction.dose:farm.view_dose_form
+#: view:farm.semen_extraction.dose:farm.view_dose_tree
+msgid "Dose"
+msgstr "Dosis"
+
+#. module: farm
+#: field:farm.semen_extraction.event,dose_bom:0
+msgid "Dose Container"
+msgstr "Container de Dosis"
+
+#. module: farm
+#: field:farm.semen_extraction.dose,dose_product:0
+msgid "Dose Product"
+msgstr "Producto de la Dosis"
+
+#. module: farm
+#: field:farm.semen_extraction.event,doses_semen_qty:0
+msgid "Dose Semen Qty"
+msgstr "Dosis Cantidad de semen"
+
+#. module: farm
+#: field:mrp.bom,specie:0
+msgid "Dose Specie"
+msgstr "Especie de la Dosis"
+
+#. module: farm
+#: field:farm.insemination.event,dose_lot:0
+msgid "Dose lot"
+msgstr "Lote de la Dosis"
+
+#. module: farm
+#: field:farm.insemination.event,dose_product:0
+msgid "Dose product"
+msgstr "Producto de la Dosis"
+
+#. module: farm
+#: field:farm.semen_extraction.event,doses:0
+msgid "Doses"
+msgstr "Dosis"
+
+#. module: farm
+#: field:farm.semen_extraction.event,dose_location:0
+msgid "Doses Location"
+msgstr "Localizacion Dosis"
+
+#. module: farm
+#: selection:farm.abort.event,state:0
+#: selection:farm.consume.stock,state:0
+#: selection:farm.event,state:0
+#: selection:farm.event.feed_mixin,state:0
+#: selection:farm.event.import.mixin,state:0
+#: selection:farm.event.order,state:0
+#: selection:farm.farrowing.event,state:0
+#: selection:farm.feed.event,state:0
+#: selection:farm.feed.inventory,state:0
+#: selection:farm.feed.inventory.mixin,state:0
+#: selection:farm.feed.provisional_inventory,state:0
+#: selection:farm.foster.event,state:0
+#: selection:farm.insemination.event,state:0
+#: selection:farm.medication.event,state:0
+#: selection:farm.move.event,state:0
+#: selection:farm.pregnancy_diagnosis.event,state:0
+#: selection:farm.removal.event,state:0
+#: selection:farm.semen_extraction.dose,state:0
+#: selection:farm.semen_extraction.event,state:0
+#: selection:farm.transformation.event,state:0
+#: selection:farm.weaning.event,state:0
+msgid "Draft"
+msgstr "Borrador"
+
+#. module: farm
+#: field:farm.abort.event,employee:0
+#: field:farm.event,employee:0
+#: field:farm.event.feed_mixin,employee:0
+#: field:farm.event.import.mixin,employee:0
+#: field:farm.event.order,employee:0
+#: field:farm.farrowing.event,employee:0
+#: field:farm.feed.event,employee:0
+#: field:farm.foster.event,employee:0
+#: field:farm.insemination.event,employee:0
+#: field:farm.medication.event,employee:0
+#: field:farm.move.event,employee:0
+#: field:farm.pregnancy_diagnosis.event,employee:0
+#: field:farm.removal.event,employee:0
+#: field:farm.semen_extraction.event,employee:0
+#: field:farm.transformation.event,employee:0
+#: field:farm.weaning.event,employee:0
+msgid "Employee"
+msgstr "Empleado"
+
+#. module: farm
+#: help:farm.abort.event,employee:0
+#: help:farm.event,employee:0
+#: help:farm.event.feed_mixin,employee:0
+#: help:farm.event.import.mixin,employee:0
+#: help:farm.event.order,employee:0
+#: help:farm.farrowing.event,employee:0
+#: help:farm.feed.event,employee:0
+#: help:farm.foster.event,employee:0
+#: help:farm.insemination.event,employee:0
+#: help:farm.medication.event,employee:0
+#: help:farm.move.event,employee:0
+#: help:farm.pregnancy_diagnosis.event,employee:0
+#: help:farm.removal.event,employee:0
+#: help:farm.semen_extraction.event,employee:0
+#: help:farm.transformation.event,employee:0
+#: help:farm.weaning.event,employee:0
+msgid "Employee that did the job."
+msgstr "Empleado Realizador del Trabajo."
+
+#. module: farm
+#: field:farm.event.feed_mixin,end_date:0
+#: field:farm.feed.event,end_date:0
+#: field:farm.medication.event,end_date:0
+msgid "End Date"
+msgstr "Fecha Fin"
+
+#. module: farm
+#: help:farm.event.feed_mixin,end_date:0
+#: help:farm.feed.event,end_date:0
+#: help:farm.medication.event,end_date:0
+msgid "End date of the period in which the givenquantity of product was consumed. It is the dateof event's timestamp."
+msgstr "Fecha de finalización del período en que se consume la cantidad dada de producto. Es la fecha de indicación de la hora del evento."
+
+#. module: farm
+#: view:farm.consume.stock:farm.view_consume_stock_tree
+#: view:farm.event:farm.view_abstract_event_form
+#: view:farm.event:farm.view_abstract_event_tree
+#: view:farm.move.event:farm.view_move_event_form
+#: view:farm.move.event:farm.view_move_event_tree
+#: field:farm.semen_extraction.dose,event:0
+msgid "Event"
+msgstr "Evento"
+
+#. module: farm
+#: field:farm.event.order,event_type:0
+msgid "Event Type"
+msgstr "Tipo Evento"
+
+#. module: farm
+#: view:farm.event.order:farm.view_event_order_tree
+msgid "Event order"
+msgstr "Orden de Evento"
+
+#. module: farm
+#: model:ir.actions.act_window,name:farm.farm_event_order_view
+msgid "EventOrder"
+msgstr "OrdenEvento"
+
+#. module: farm
+#: model:ir.ui.menu,name:farm.menu_farm_events
+msgid "Events"
+msgstr "Eventos"
+
+#. module: farm
+#: field:farm.specie.farm_line,event_order_sequence:0
+msgid "Events Orders' Sequence"
+msgstr "Secuencia de orden de evento"
+
+#. module: farm
+#: field:stock.warehouse,external:0
+msgid "External"
+msgstr "Externa"
+
+#. module: farm
+#: field:farm.specie.farm_line,semen_lot_sequence:0
+msgid "Extracted Semen Lots' Sequence"
+msgstr "Sequencia de lotes de semen extraido"
+
+#. module: farm
+#: model:ir.actions.act_window,name:farm.farm_semen_extraction_view
+msgid "Extraction Event"
+msgstr "Evento de Extracción"
+
+#. module: farm
+#: field:stock.location,factory:0
+msgid "Factory"
+msgstr "Fabrica"
+
+#. module: farm
+#: field:account.invoice.line,farm:0
+#: field:farm.abort.event,farm:0
+#: view:farm.animal:farm.animal_search_view
+#: view:farm.animal.group:farm.animal_group_search_view
+#: selection:farm.consume.stock,type:0
+#: field:farm.event,farm:0
+#: field:farm.event.feed_mixin,farm:0
+#: field:farm.event.import.mixin,farm:0
+#: field:farm.event.order,farm:0
+#: field:farm.farrowing.event,farm:0
+#: view:farm.feed.event:farm.feed_event_search_view
+#: field:farm.feed.event,farm:0
+#: field:farm.foster.event,farm:0
+#: field:farm.insemination.event,farm:0
+#: field:farm.medication.event,farm:0
+#: field:farm.move.event,farm:0
+#: field:farm.pregnancy_diagnosis.event,farm:0
+#: field:farm.removal.event,farm:0
+#: field:farm.semen_extraction.event,farm:0
+#: field:farm.specie.farm_line,farm:0
+#: field:farm.transformation.event,farm:0
+#: field:farm.weaning.event,farm:0
+#: model:ir.module.category,name:farm.module_category_farm
+#: model:ir.ui.menu,name:farm.menu_farm
+#: view:product.template:farm.product_template_form_farm_view
+#: field:purchase.analitic.remain,farm:0
+#: view:purchase.order.line:farm.farm_purchase_line_search_view
+#: field:purchase.order.line,farm:0
+msgid "Farm"
+msgstr "Granja"
+
+#. module: farm
+#: view:farm.specie.farm_line:farm.view_farm_line_form
+#: view:farm.specie.farm_line:farm.view_farm_line_tree
+#: model:ir.ui.menu,name:farm.menu_farm_configuration_farm_line
+msgid "Farm Line"
+msgstr "Linea Granja"
+
+#. module: farm
+#: model:ir.actions.act_window,name:farm.farm_purchase_line
+msgid "Farm Purchase Line"
+msgstr "Linea compra granja"
+
+#. module: farm
+#: field:stock.location,farm_yard:0
+msgid "Farm Yard"
+msgstr "Corral"
+
+#. module: farm
+#: model:ir.actions.act_window,name:farm.farm_farm_line_view
+msgid "FarmLine"
+msgstr "LineaGranja"
+
+#. module: farm
+#: field:farm.specie,farm_lines:0
+msgid "Farms"
+msgstr "Granjas"
+
+#. module: farm
+#: field:farm.animal.female_cycle,farrowing_event:0
+msgid "Farrowing"
+msgstr "Parto"
+
+#. module: farm
+#: view:farm.farrowing.event:farm.view_farrowing_event_form
+#: field:farm.farrowing.event_female_cycle,event:0
+#: field:farm.farrowing.event_group,event:0
+msgid "Farrowing Event"
+msgstr "Evento de Parto"
+
+#. module: farm
+#: view:farm.farrowing.event_female_cycle:farm.view_farrowing_event_female_cycle_form
+msgid "Farrowing Event - Female Cycle"
+msgstr "Evento de Parto - Ciclo Hembra"
+
+#. module: farm
+#: field:farm.foster.event,farrowing_group:0
+#: field:farm.weaning.event,farrowing_group:0
+msgid "Farrowing Group"
+msgstr "Grupo de Parto"
+
+#. module: farm
+#: field:product.template,farrowing_price:0
+msgid "Farrowing Price"
+msgstr "Precio de Parto"
+
+#. module: farm
+#: selection:farm.event.order,event_type:0
+#: field:farm.event.order,farrowing_events:0
+msgid "Farrowings"
+msgstr "Partos"
+
+#. module: farm
+#: selection:farm.animal.group,state:0
+msgid "Faten up"
+msgstr "Cebo"
+
+#. module: farm
+#: field:farm.event.feed_mixin,feed_product:0
+#: selection:farm.event.order,event_type:0
+#: field:farm.feed.event,feed_product:0
+#: field:farm.medication.event,feed_product:0
+msgid "Feed"
+msgstr "Alimento"
+
+#. module: farm
+#: view:farm.feed.event:farm.view_feed_event_form
+msgid "Feed Event"
+msgstr "Evento Alimentación"
+
+#. module: farm
+#: field:farm.feed.inventory,feed_events:0
+#: field:farm.feed.inventory.mixin,feed_events:0
+#: field:farm.feed.provisional_inventory,feed_events:0
+msgid "Feed Events"
+msgstr "Eventos Alimentación"
+
+#. module: farm
+#: field:farm.event.feed_mixin,feed_lot:0
+#: field:farm.feed.event,feed_lot:0
+#: field:farm.medication.event,feed_lot:0
+msgid "Feed Lot"
+msgstr "Lote Alimento"
+
+#. module: farm
+#: field:farm.event.feed_mixin,feed_location:0
+#: field:farm.feed.event,feed_location:0
+#: field:farm.medication.event,feed_location:0
+msgid "Feed Source"
+msgstr "Fuente Alimentación"
+
+#. module: farm
+#: field:farm.medication.event,feed_product_uom_category:0
+msgid "Feed Uom Category"
+msgstr "Unidad Medida Alimento"
+
+#. module: farm
+#: view:farm.feed.event:farm.farm_feed_event_graph_view
+msgid "Feed diagram"
+msgstr "Grafico pienso"
+
+#. module: farm
+#: view:farm.animal:farm.view_animal_form
+#: view:farm.animal.group:farm.view_animal_group
+#: model:ir.actions.act_window,name:farm.animal_group2_open_feed_events
+#: model:ir.actions.act_window,name:farm.animal_open_feed_events
+msgid "Feed events"
+msgstr "Alimentacion"
+
+#. module: farm
+#: field:farm.specie,feed_lost_found_location:0
+msgid "Feed transit"
+msgstr "Transito Alimentacion"
+
+#. module: farm
+#: selection:farm.abort.event,animal_type:0
+#: selection:farm.animal,sex:0
+#: selection:farm.animal,type:0
+#: field:farm.animal.female_cycle,animal:0
+#: selection:farm.event,animal_type:0
+#: selection:farm.event.feed_mixin,animal_type:0
+#: selection:farm.event.import.mixin,animal_type:0
+#: selection:farm.event.order,animal_type:0
+#: selection:farm.farrowing.event,animal_type:0
+#: selection:farm.feed.animal_location_date,animal_type:0
+#: selection:farm.feed.event,animal_type:0
+#: selection:farm.foster.event,animal_type:0
+#: selection:farm.insemination.event,animal_type:0
+#: selection:farm.medication.event,animal_type:0
+#: selection:farm.move.event,animal_type:0
+#: selection:farm.pregnancy_diagnosis.event,animal_type:0
+#: selection:farm.removal.event,animal_type:0
+#: selection:farm.semen_extraction.event,animal_type:0
+#: selection:farm.transformation.event,animal_type:0
+#: selection:farm.transformation.event,to_animal_type:0
+#: selection:farm.weaning.event,animal_type:0
+#: selection:stock.production.lot,animal_type:0
+msgid "Female"
+msgstr "Hembra"
+
+#. module: farm
+#: field:farm.weaning.event,female_cycle:0
+msgid "Female Cicle"
+msgstr "Ciclo Hembra"
+
+#. module: farm
+#: field:farm.abort.event,female_cycle:0
+#: view:farm.animal.female_cycle:farm.view_cycle_form
+#: view:farm.animal.female_cycle:farm.view_cycle_tree
+#: field:farm.farrowing.event,female_cycle:0
+#: field:farm.farrowing.event_female_cycle,cycle:0
+#: field:farm.foster.event,female_cycle:0
+#: field:farm.foster.event,move:0
+#: field:farm.foster.event,pair_event:0
+#: field:farm.pregnancy_diagnosis.event,female_cycle:0
+#: field:farm.weaning.event_female_cycle,cycle:0
+msgid "Female Cycle"
+msgstr "Ciclo Hembra"
+
+#. module: farm
+#: field:farm.weaning.event,female_to_location:0
+msgid "Female Destination"
+msgstr "Destino Hembra"
+
+#. module: farm
+#: field:farm.weaning.event,female_move:0
+msgid "Female Stock Move"
+msgstr "Movimiento Hembra"
+
+#. module: farm
+#: field:farm.insemination.event,female_cycle:0
+msgid "Female cycle"
+msgstr "Ciclo Hembra"
+
+#. module: farm
+#: field:farm.specie,female_product:0
+msgid "Female's Product"
+msgstr "Producto Hembra"
+
+#. module: farm
+#: field:farm.specie.farm_line,has_female:0
+msgid "Females"
+msgstr "Hembras"
+
+#. module: farm
+#: field:farm.specie,female_enabled:0
+msgid "Females Enabled"
+msgstr "Hembras Activadas"
+
+#. module: farm
+#: field:farm.specie.farm_line,female_sequence:0
+msgid "Females' Sequence"
+msgstr "Sequencia Hembras"
+
+#. module: farm
+#: code:addons/farm/models/purchse_analytics.py:102
+#, python-format
+msgid "Final date after current date"
+msgstr "Fecha final anteriora fecha actual"
+
+#. module: farm
+#: field:farm.animal,first_mating:0
+msgid "First Mating"
+msgstr "Primer apareamiento"
+
+#. module: farm
+#: field:farm.semen_extraction.event,formula_result:0
+msgid "Formula Result"
+msgstr "Resultado Formula"
+
+#. module: farm
+#: view:farm.foster.locations:farm.view_foster_location_form
+#: view:farm.future_maders.locations:farm.view_future_location_form
+#: view:farm.transit.locations:farm.view_transit_location_form
+msgid "Foste Location"
+msgstr "Localizacion de adopcion"
+
+#. module: farm
+#: view:farm.foster.event:farm.view_foster_event_form
+msgid "Foster Event"
+msgstr "Evento Adopción"
+
+#. module: farm
+#: field:farm.specie,foster_location:0
+msgid "Foster Location"
+msgstr "Localización Adopcion"
+
+#. module: farm
+#: field:farm.animal.female_cycle,fostered:0
+msgid "Fostered"
+msgstr "Adoptado"
+
+#. module: farm
+#: field:farm.animal.female_cycle,foster_events:0
+#: selection:farm.event.order,event_type:0
+#: field:farm.event.order,foster_events:0
+#: field:farm.foster.event,quantity:0
+msgid "Fosters"
+msgstr "Adopciones"
+
+#. module: farm
+#: field:farm.specie,future_maders_location:0
+msgid "Future maders location"
+msgstr "Localización Futuras Madres"
+
+#. module: farm
+#: field:purchase.order.line,general_expense:0
+msgid "General Expense"
+msgstr "Gasto general"
+
+#. module: farm
+#: model:ir.ui.menu,name:farm.menu_farm_purchase_line
+msgid "General expenses"
+msgstr "Gastos generales"
+
+#. module: farm
+#: code:addons/farm/models/purchse_analytics.py:84
+#, python-format
+msgid "General expenses can't mixin with other purchases"
+msgstr "Los gastos generales no pueden mezclarse con las compras"
+
+#. module: farm
+#: help:farm.animal,removal_date:0
+msgid "Get information from the corresponding removal event."
+msgstr "Obtener información desde el evento de eliminación correspondiente."
+
+#. module: farm
+#: field:farm.abort.event,animal_group:0
+#: selection:farm.abort.event,animal_type:0
+#: field:farm.animal.group.weight,party:0
+#: field:farm.event,animal_group:0
+#: selection:farm.event,animal_type:0
+#: field:farm.event.feed_mixin,animal_group:0
+#: selection:farm.event.feed_mixin,animal_type:0
+#: field:farm.event.import.mixin,animal_group:0
+#: selection:farm.event.import.mixin,animal_type:0
+#: selection:farm.event.order,animal_type:0
+#: field:farm.farrowing.event,animal_group:0
+#: selection:farm.farrowing.event,animal_type:0
+#: field:farm.farrowing.event_group,animal_group:0
+#: field:farm.feed.animal_location_date,animal_group:0
+#: selection:farm.feed.animal_location_date,animal_type:0
+#: field:farm.feed.event,animal_group:0
+#: selection:farm.feed.event,animal_type:0
+#: field:farm.foster.event,animal_group:0
+#: selection:farm.foster.event,animal_type:0
+#: field:farm.insemination.event,animal_group:0
+#: selection:farm.insemination.event,animal_type:0
+#: field:farm.medication.event,animal_group:0
+#: selection:farm.medication.event,animal_type:0
+#: field:farm.move.event,animal_group:0
+#: selection:farm.move.event,animal_type:0
+#: field:farm.pregnancy_diagnosis.event,animal_group:0
+#: selection:farm.pregnancy_diagnosis.event,animal_type:0
+#: field:farm.removal.event,animal_group:0
+#: selection:farm.removal.event,animal_type:0
+#: field:farm.semen_extraction.event,animal_group:0
+#: selection:farm.semen_extraction.event,animal_type:0
+#: field:farm.transformation.event,animal_group:0
+#: selection:farm.transformation.event,animal_type:0
+#: selection:farm.transformation.event,to_animal_type:0
+#: field:farm.weaning.event,animal_group:0
+#: selection:farm.weaning.event,animal_type:0
+#: field:stock.production.lot,animal_group:0
+#: selection:stock.production.lot,animal_type:0
+msgid "Group"
+msgstr "Grupo"
+
+#. module: farm
+#: selection:farm.move.event,weight_record:0
+msgid "Group Weight"
+msgstr "Peso del Grupo"
+
+#. module: farm
+#: view:farm.animal:farm.animal_search_view
+#: view:farm.animal.group:farm.animal_group_search_view
+#: view:farm.consume.stock:farm.farm_consume_stock_search_view
+#: view:farm.feed.event:farm.feed_event_search_view
+#: view:purchase.order.line:farm.farm_purchase_line_search_view
+msgid "Group by..."
+msgstr "Agrupar por..."
+
+#. module: farm
+#: help:farm.weaning.event,weared_group:0
+msgid "Group in which weaned animals shouldbe added to. If left blank they will keepthe same group."
+msgstr "Grupo en el que los animales destetados deben añadirse. Si se deja en blanco se mantendrán el mismo grupo."
+
+#. module: farm
+#: field:farm.specie,group_product:0
+msgid "Group's Product"
+msgstr "Producto grupo"
+
+#. module: farm
+#: field:farm.specie.farm_line,has_group:0
+#: field:farm.tags,animal_group:0
+msgid "Groups"
+msgstr "Grupos"
+
+#. module: farm
+#: field:farm.specie,group_enabled:0
+msgid "Groups Enabled"
+msgstr "Grupos Activados"
+
+#. module: farm
+#: field:farm.specie.farm_line,group_sequence:0
+msgid "Groups' Sequence"
+msgstr "Sequencia Grupos"
+
+#. module: farm
+#: model:ir.module.category,description:farm.module_category_farm
+msgid "Helps you manage your farms"
+msgstr "Permite administra granjas"
+
+#. module: farm
+#: field:farm.abort.event,id:0
+#: field:farm.animal,id:0
+#: field:farm.animal.female_cycle,id:0
+#: field:farm.animal.group,id:0
+#: field:farm.animal.group.weight,id:0
+#: field:farm.animal.weight,id:0
+#: field:farm.consume.stock,id:0
+#: field:farm.event,id:0
+#: field:farm.event.feed_mixin,id:0
+#: field:farm.event.import.mixin,id:0
+#: field:farm.event.order,id:0
+#: field:farm.farrowing.event,id:0
+#: field:farm.farrowing.event_female_cycle,id:0
+#: field:farm.farrowing.event_group,id:0
+#: field:farm.farrowing.problem,id:0
+#: field:farm.feed.animal_location_date,id:0
+#: field:farm.feed.event,id:0
+#: field:farm.feed.inventory,id:0
+#: field:farm.feed.inventory.mixin,id:0
+#: field:farm.feed.provisional_inventory,id:0
+#: field:farm.feed.stock.location,id:0
+#: field:farm.foster.event,id:0
+#: field:farm.foster.locations,id:0
+#: field:farm.future_maders.locations,id:0
+#: field:farm.insemination.event,id:0
+#: field:farm.medication.event,id:0
+#: field:farm.move.event,id:0
+#: field:farm.pregnancy_diagnosis.event,id:0
+#: field:farm.removal.event,id:0
+#: field:farm.removal.reason,id:0
+#: field:farm.removal.type,id:0
+#: field:farm.semen_extraction.dose,id:0
+#: field:farm.semen_extraction.event,id:0
+#: field:farm.specie,id:0
+#: field:farm.specie.breed,id:0
+#: field:farm.specie.farm_line,id:0
+#: field:farm.specie.ir.model,id:0
+#: field:farm.tags,id:0
+#: field:farm.transformation.event,id:0
+#: field:farm.transit.locations,id:0
+#: field:farm.weaning.event,id:0
+#: field:farm.weaning.event_female_cycle,id:0
+#: field:mrp.analitic.remain,id:0
+#: field:purchase.analitic.remain,id:0
+#: field:stock.location.silo_stock.location,id:0
+#: field:stock.lot_farm.animal,id:0
+#: field:stock.lot_farm.animal.group,id:0
+msgid "ID"
+msgstr "ID"
+
+#. module: farm
+#: help:farm.foster.event,quantity:0
+msgid "If this quantity is negative it isa Foster Out."
+msgstr "Si la cantidad es negativa es el origen de la adopción."
+
+#. module: farm
+#: field:farm.abort.event,imported:0
+#: field:farm.event.import.mixin,imported:0
+#: field:farm.farrowing.event,imported:0
+#: field:farm.foster.event,imported:0
+#: field:farm.insemination.event,imported:0
+#: field:farm.weaning.event,imported:0
+msgid "Imported"
+msgstr "Importado"
+
+#. module: farm
+#: model:ir.actions.server,name:farm.impute_analitics_action
+msgid "Impute analitics"
+msgstr "Imputar gastos"
+
+#. module: farm
+#: selection:farm.consume.stock,state:0
+msgid "In progress"
+msgstr "En progreso"
+
+#. module: farm
+#: help:farm.specie.farm_line,has_female:0
+msgid "In this farm there are females."
+msgstr "En esta granja hay hembras."
+
+#. module: farm
+#: help:farm.specie.farm_line,has_group:0
+msgid "In this farm there are groups."
+msgstr "En esta granja hay grupos."
+
+#. module: farm
+#: help:farm.specie.farm_line,has_individual:0
+msgid "In this farm there are individuals."
+msgstr "En esta granja hay individuos."
+
+#. module: farm
+#: help:farm.specie.farm_line,has_male:0
+msgid "In this farm there are males."
+msgstr "En esta granja hay machos."
+
+#. module: farm
+#: help:stock.location,silo:0
+msgid "Indicates that the location is a silo."
+msgstr "Induca que la localización es un silo."
+
+#. module: farm
+#: help:stock.location,locations_to_fed:0
+msgid "Indicates the locations the silo feeds. Note that this will only be a default value."
+msgstr "Indica la ubicación donde se deposita el pienso resultante del silo. Tenga en cuenta que esto sólo será un valor predeterminado."
+
+#. module: farm
+#: help:farm.animal,location:0
+msgid "Indicates where the animal currently resides."
+msgstr "Indica donde reside el animal."
+
+#. module: farm
+#: selection:farm.abort.event,animal_type:0
+#: selection:farm.animal,type:0
+#: selection:farm.event,animal_type:0
+#: selection:farm.event.feed_mixin,animal_type:0
+#: selection:farm.event.import.mixin,animal_type:0
+#: selection:farm.event.order,animal_type:0
+#: selection:farm.farrowing.event,animal_type:0
+#: selection:farm.feed.animal_location_date,animal_type:0
+#: selection:farm.feed.event,animal_type:0
+#: selection:farm.foster.event,animal_type:0
+#: selection:farm.insemination.event,animal_type:0
+#: selection:farm.medication.event,animal_type:0
+#: selection:farm.move.event,animal_type:0
+#: selection:farm.pregnancy_diagnosis.event,animal_type:0
+#: selection:farm.removal.event,animal_type:0
+#: selection:farm.semen_extraction.event,animal_type:0
+#: selection:farm.transformation.event,animal_type:0
+#: selection:farm.transformation.event,to_animal_type:0
+#: selection:farm.weaning.event,animal_type:0
+#: selection:stock.production.lot,animal_type:0
+msgid "Individual"
+msgstr "Individuo"
+
+#. module: farm
+#: field:farm.specie,individual_product:0
+msgid "Individual's Product"
+msgstr "Producto de individuo"
+
+#. module: farm
+#: field:farm.specie.farm_line,has_individual:0
+msgid "Individuals"
+msgstr "Individuos"
+
+#. module: farm
+#: field:farm.specie,individual_enabled:0
+msgid "Individuals Enabled"
+msgstr "Individuos activados"
+
+#. module: farm
+#: field:farm.specie.farm_line,individual_sequence:0
+msgid "Individuals' Sequence"
+msgstr "Secuencia individuos"
+
+#. module: farm
+#: field:farm.animal,initial_location:0
+msgid "Initial Location"
+msgstr "Localización inicial"
+
+#. module: farm
+#: field:farm.animal.group,initial_location:0
+msgid "Initial location"
+msgstr "Localización inicial"
+
+#. module: farm
+#: field:farm.animal.group,initial_quantity:0
+msgid "Initial quantity"
+msgstr "Cantidad Inicial"
+
+#. module: farm
+#: field:purchase.order.line,imputed:0
+msgid "Inputed"
+msgstr "Imputado"
+
+#. module: farm
+#: field:farm.event.order,insemination_events:0
+msgid "Insemination"
+msgstr "Inseminación"
+
+#. module: farm
+#: field:farm.animal,days_from_insemination:0
+msgid "Insemination Days"
+msgstr "Días de inseminación"
+
+#. module: farm
+#: view:farm.insemination.event:farm.view_insemination_event_form
+msgid "Insemination Event"
+msgstr "Evento de Inseminación"
+
+#. module: farm
+#: field:farm.animal.female_cycle,insemination_events:0
+#: selection:farm.event.order,event_type:0
+msgid "Inseminations"
+msgstr "Inseminaciones"
+
+#. module: farm
+#: field:farm.feed.event,feed_inventory:0
+#: field:farm.feed.provisional_inventory,inventory:0
+#: field:farm.feed.stock.location,inventory:0
+#: model:ir.model,name:farm.model_stock_inventory
+msgid "Inventory"
+msgstr "Inventario"
+
+#. module: farm
+#: model:ir.model,name:farm.model_stock_inventory_line
+msgid "Inventory Line"
+msgstr "Línea inventario"
+
+#. module: farm
+#: model:ir.model,name:farm.model_stock_location
+msgid "Inventory Locations"
+msgstr "Ubicaciones de inventario"
+
+#. module: farm
+#: field:farm.feed.animal_location_date,inventory_qty:0
+msgid "Inventoryes"
+msgstr "Inventarios"
+
+#. module: farm
+#: model:ir.model,name:farm.model_account_invoice
+msgid "Invoice"
+msgstr "Factura"
+
+#. module: farm
+#: model:ir.model,name:farm.model_account_invoice_line
+msgid "Invoice Line"
+msgstr "Línea de factura"
+
+#. module: farm
+#: selection:farm.animal.female_cycle,state:0
+#: selection:farm.animal.group,state:0
+msgid "Lactating"
+msgstr "Lactando"
+
+#. module: farm
+#: field:farm.animal.female_cycle,days_between_farrowing_weaning:0
+msgid "Lactating Days"
+msgstr "Días de lactancia"
+
+#. module: farm
+#: field:farm.animal,last_extraction:0
+msgid "Last Extraction"
+msgstr "Última extracción"
+
+#. module: farm
+#: field:farm.abort.event,__last_update:0
+#: field:farm.animal,__last_update:0
+#: field:farm.animal.female_cycle,__last_update:0
+#: field:farm.animal.group,__last_update:0
+#: field:farm.animal.group.weight,__last_update:0
+#: field:farm.animal.weight,__last_update:0
+#: field:farm.consume.stock,__last_update:0
+#: field:farm.event,__last_update:0
+#: field:farm.event.feed_mixin,__last_update:0
+#: field:farm.event.import.mixin,__last_update:0
+#: field:farm.event.order,__last_update:0
+#: field:farm.farrowing.event,__last_update:0
+#: field:farm.farrowing.event_female_cycle,__last_update:0
+#: field:farm.farrowing.event_group,__last_update:0
+#: field:farm.farrowing.problem,__last_update:0
+#: field:farm.feed.animal_location_date,__last_update:0
+#: field:farm.feed.event,__last_update:0
+#: field:farm.feed.inventory,__last_update:0
+#: field:farm.feed.inventory.mixin,__last_update:0
+#: field:farm.feed.provisional_inventory,__last_update:0
+#: field:farm.feed.stock.location,__last_update:0
+#: field:farm.foster.event,__last_update:0
+#: field:farm.foster.locations,__last_update:0
+#: field:farm.future_maders.locations,__last_update:0
+#: field:farm.insemination.event,__last_update:0
+#: field:farm.medication.event,__last_update:0
+#: field:farm.move.event,__last_update:0
+#: field:farm.pregnancy_diagnosis.event,__last_update:0
+#: field:farm.removal.event,__last_update:0
+#: field:farm.removal.reason,__last_update:0
+#: field:farm.removal.type,__last_update:0
+#: field:farm.semen_extraction.dose,__last_update:0
+#: field:farm.semen_extraction.event,__last_update:0
+#: field:farm.specie,__last_update:0
+#: field:farm.specie.breed,__last_update:0
+#: field:farm.specie.farm_line,__last_update:0
+#: field:farm.specie.ir.model,__last_update:0
+#: field:farm.tags,__last_update:0
+#: field:farm.transformation.event,__last_update:0
+#: field:farm.transit.locations,__last_update:0
+#: field:farm.weaning.event,__last_update:0
+#: field:farm.weaning.event_female_cycle,__last_update:0
+#: field:mrp.analitic.remain,__last_update:0
+#: field:purchase.analitic.remain,__last_update:0
+#: field:stock.location.silo_stock.location,__last_update:0
+#: field:stock.lot_farm.animal,__last_update:0
+#: field:stock.lot_farm.animal.group,__last_update:0
+msgid "Last Modified on"
+msgstr "Modificado por última vez el"
+
+#. module: farm
+#: field:farm.abort.event,write_uid:0
+#: field:farm.animal,write_uid:0
+#: field:farm.animal.female_cycle,write_uid:0
+#: field:farm.animal.group,write_uid:0
+#: field:farm.animal.group.weight,write_uid:0
+#: field:farm.animal.weight,write_uid:0
+#: field:farm.consume.stock,write_uid:0
+#: field:farm.event.order,write_uid:0
+#: field:farm.farrowing.event,write_uid:0
+#: field:farm.farrowing.event_female_cycle,write_uid:0
+#: field:farm.farrowing.event_group,write_uid:0
+#: field:farm.farrowing.problem,write_uid:0
+#: field:farm.feed.animal_location_date,write_uid:0
+#: field:farm.feed.event,write_uid:0
+#: field:farm.feed.inventory,write_uid:0
+#: field:farm.feed.provisional_inventory,write_uid:0
+#: field:farm.feed.stock.location,write_uid:0
+#: field:farm.foster.event,write_uid:0
+#: field:farm.foster.locations,write_uid:0
+#: field:farm.future_maders.locations,write_uid:0
+#: field:farm.insemination.event,write_uid:0
+#: field:farm.medication.event,write_uid:0
+#: field:farm.move.event,write_uid:0
+#: field:farm.pregnancy_diagnosis.event,write_uid:0
+#: field:farm.removal.event,write_uid:0
+#: field:farm.removal.reason,write_uid:0
+#: field:farm.removal.type,write_uid:0
+#: field:farm.semen_extraction.dose,write_uid:0
+#: field:farm.semen_extraction.event,write_uid:0
+#: field:farm.specie,write_uid:0
+#: field:farm.specie.breed,write_uid:0
+#: field:farm.specie.farm_line,write_uid:0
+#: field:farm.specie.ir.model,write_uid:0
+#: field:farm.tags,write_uid:0
+#: field:farm.transformation.event,write_uid:0
+#: field:farm.transit.locations,write_uid:0
+#: field:farm.weaning.event,write_uid:0
+#: field:farm.weaning.event_female_cycle,write_uid:0
+#: field:mrp.analitic.remain,write_uid:0
+#: field:purchase.analitic.remain,write_uid:0
+#: field:stock.location.silo_stock.location,write_uid:0
+#: field:stock.lot_farm.animal,write_uid:0
+#: field:stock.lot_farm.animal.group,write_uid:0
+msgid "Last Updated by"
+msgstr "Ultima actualización por"
+
+#. module: farm
+#: field:farm.abort.event,write_date:0
+#: field:farm.animal,write_date:0
+#: field:farm.animal.female_cycle,write_date:0
+#: field:farm.animal.group,write_date:0
+#: field:farm.animal.group.weight,write_date:0
+#: field:farm.animal.weight,write_date:0
+#: field:farm.consume.stock,write_date:0
+#: field:farm.event.order,write_date:0
+#: field:farm.farrowing.event,write_date:0
+#: field:farm.farrowing.event_female_cycle,write_date:0
+#: field:farm.farrowing.event_group,write_date:0
+#: field:farm.farrowing.problem,write_date:0
+#: field:farm.feed.animal_location_date,write_date:0
+#: field:farm.feed.event,write_date:0
+#: field:farm.feed.inventory,write_date:0
+#: field:farm.feed.provisional_inventory,write_date:0
+#: field:farm.feed.stock.location,write_date:0
+#: field:farm.foster.event,write_date:0
+#: field:farm.foster.locations,write_date:0
+#: field:farm.future_maders.locations,write_date:0
+#: field:farm.insemination.event,write_date:0
+#: field:farm.medication.event,write_date:0
+#: field:farm.move.event,write_date:0
+#: field:farm.pregnancy_diagnosis.event,write_date:0
+#: field:farm.removal.event,write_date:0
+#: field:farm.removal.reason,write_date:0
+#: field:farm.removal.type,write_date:0
+#: field:farm.semen_extraction.dose,write_date:0
+#: field:farm.semen_extraction.event,write_date:0
+#: field:farm.specie,write_date:0
+#: field:farm.specie.breed,write_date:0
+#: field:farm.specie.farm_line,write_date:0
+#: field:farm.specie.ir.model,write_date:0
+#: field:farm.tags,write_date:0
+#: field:farm.transformation.event,write_date:0
+#: field:farm.transit.locations,write_date:0
+#: field:farm.weaning.event,write_date:0
+#: field:farm.weaning.event_female_cycle,write_date:0
+#: field:mrp.analitic.remain,write_date:0
+#: field:purchase.analitic.remain,write_date:0
+#: field:stock.location.silo_stock.location,write_date:0
+#: field:stock.lot_farm.animal,write_date:0
+#: field:stock.lot_farm.animal.group,write_date:0
+msgid "Last Updated on"
+msgstr "Ultima actualización el"
+
+#. module: farm
+#: field:farm.animal,last_produced_group:0
+msgid "Last produced group"
+msgstr "Last produced group"
+
+#. module: farm
+#: field:farm.semen_extraction.dose,sequence:0
+msgid "Line Num"
+msgstr "Numero de Linea"
+
+#. module: farm
+#: field:farm.animal.female_cycle,live:0
+#: field:farm.farrowing.event,live:0
+msgid "Live"
+msgstr "Vivo"
+
+#. module: farm
+#: view:farm.animal:farm.animal_search_view
+#: view:farm.animal.group:farm.animal_group_search_view
+#: field:farm.event.feed_mixin,location:0
+#: view:farm.feed.event:farm.feed_event_search_view
+#: field:farm.feed.event,location:0
+#: field:farm.feed.stock.location,location:0
+#: field:farm.foster.locations,location:0
+#: field:farm.future_maders.locations,location:0
+#: field:farm.medication.event,location:0
+#: field:farm.transit.locations,location:0
+#: view:purchase.order.line:farm.farm_purchase_line_search_view
+#: field:stock.location.silo_stock.location,location:0
+msgid "Location"
+msgstr "Localización"
+
+#. module: farm
+#: field:farm.feed.animal_location_date,location:0
+msgid "Location fed"
+msgstr "Localizacion de alimento"
+
+#. module: farm
+#: view:stock.location.silo_stock.location:farm.view_silo_location_form
+msgid "Location to Feed"
+msgstr "localizacion de Alimentación"
+
+#. module: farm
+#: field:stock.location,locations_to_fed:0
+msgid "Location to fed"
+msgstr "Localizacion para alimentación"
+
+#. module: farm
+#: field:farm.feed.inventory,dest_locations:0
+#: field:farm.feed.inventory.mixin,dest_locations:0
+#: field:farm.feed.provisional_inventory,dest_locations:0
+msgid "Location to feed"
+msgstr "Localizacion para alimentación"
+
+#. module: farm
+#: field:farm.weaning.event,lost_move:0
+msgid "Lost Stock  Move"
+msgstr "Movimiento Stock perdido"
+
+#. module: farm
+#: field:farm.abort.event,lot:0
+#: field:farm.animal.group,lot:0
+#: field:farm.consume.stock,lot_id:0
+#: field:farm.event,lot:0
+#: field:farm.event.feed_mixin,lot:0
+#: field:farm.event.import.mixin,lot:0
+#: field:farm.farrowing.event,lot:0
+#: field:farm.feed.event,lot:0
+#: field:farm.foster.event,lot:0
+#: field:farm.insemination.event,lot:0
+#: field:farm.medication.event,lot:0
+#: field:farm.move.event,lot:0
+#: field:farm.pregnancy_diagnosis.event,lot:0
+#: field:farm.removal.event,lot:0
+#: field:farm.semen_extraction.dose,lot:0
+#: field:farm.semen_extraction.event,lot:0
+#: field:farm.transformation.event,lot:0
+#: field:farm.weaning.event,lot:0
+#: field:stock.lot_farm.animal,lot:0
+#: field:stock.lot_farm.animal.group,lot:0
+msgid "Lot"
+msgstr "Lote"
+
+#. module: farm
+#: model:ir.model,name:farm.model_stock_production_lot
+msgid "Lot/Serial"
+msgstr "Lote/Nº de serie"
+
+#. module: farm
+#: selection:farm.abort.event,animal_type:0
+#: selection:farm.animal,sex:0
+#: selection:farm.animal,type:0
+#: selection:farm.event,animal_type:0
+#: selection:farm.event.feed_mixin,animal_type:0
+#: selection:farm.event.import.mixin,animal_type:0
+#: selection:farm.event.order,animal_type:0
+#: selection:farm.farrowing.event,animal_type:0
+#: selection:farm.feed.animal_location_date,animal_type:0
+#: selection:farm.feed.event,animal_type:0
+#: selection:farm.foster.event,animal_type:0
+#: selection:farm.insemination.event,animal_type:0
+#: selection:farm.medication.event,animal_type:0
+#: selection:farm.move.event,animal_type:0
+#: selection:farm.pregnancy_diagnosis.event,animal_type:0
+#: selection:farm.removal.event,animal_type:0
+#: selection:farm.semen_extraction.event,animal_type:0
+#: selection:farm.transformation.event,animal_type:0
+#: selection:farm.transformation.event,to_animal_type:0
+#: selection:farm.weaning.event,animal_type:0
+msgid "Male"
+msgstr "Macho"
+
+#. module: farm
+#: field:farm.specie,male_product:0
+msgid "Male's Product"
+msgstr "Producto Macho"
+
+#. module: farm
+#: selection:stock.production.lot,animal_type:0
+msgid "Male)"
+msgstr "Macho"
+
+#. module: farm
+#: field:farm.specie.farm_line,has_male:0
+msgid "Males"
+msgstr "Machos"
+
+#. module: farm
+#: field:farm.specie,male_enabled:0
+msgid "Males Enabled"
+msgstr "Machos activados"
+
+#. module: farm
+#: field:farm.specie.farm_line,male_sequence:0
+msgid "Males' Sequence"
+msgstr "Sequencia Machos"
+
+#. module: farm
+#: model:res.groups,name:farm.group_farm_manager
+msgid "Manager"
+msgstr "Responsable"
+
+#. module: farm
+#: model:ir.model,name:farm.model_mrp_production
+msgid "Manufacturing Order"
+msgstr "Órden de producción"
+
+#. module: farm
+#: selection:farm.animal,state:0
+#: selection:farm.animal.female_cycle,state:0
+msgid "Mated"
+msgstr "Cubierta"
+
+#. module: farm
+#: field:stock.location,animal_max:0
+#: field:stock.warehouse,animal_max:0
+msgid "Max num of animals"
+msgstr "nº maximo de animales"
+
+#. module: farm
+#: field:farm.medication.event,medicated_feed:0
+msgid "Medicated Feed"
+msgstr "Pienso medicado"
+
+#. module: farm
+#: field:farm.event.order,medication_events:0
+msgid "Medication"
+msgstr "Medicación"
+
+#. module: farm
+#: view:farm.medication.event:farm.view_medication_event_form
+msgid "Medication Event"
+msgstr "Evento de Medicación"
+
+#. module: farm
+#: view:farm.animal:farm.view_animal_form
+#: view:farm.animal.group:farm.view_animal_group
+#: model:ir.actions.act_window,name:farm.animal_group_open_medication_events
+#: model:ir.actions.act_window,name:farm.animal_open_medication_events
+msgid "Medication events"
+msgstr "Eventos medicación"
+
+#. module: farm
+#: field:farm.medication.event,medication_in_feed:0
+msgid "Medication in feed"
+msgstr "Pienso medicamentoso"
+
+#. module: farm
+#: selection:farm.event.order,event_type:0
+msgid "Medications"
+msgstr "Medicaciones"
+
+#. module: farm
+#: field:farm.specie.ir.model,model:0
+msgid "Model"
+msgstr "Modelo"
+
+#. module: farm
+#: view:farm.feed.event:farm.feed_event_search_view
+msgid "Month"
+msgstr "Mes"
+
+#. module: farm
+#: code:addons/farm/models/semen_extration_event.py:109
+#, python-format
+msgid "More semen in doses than produced"
+msgstr "Mas semen en las dosis que el producido"
+
+#. module: farm
+#: field:farm.animal.group,mother:0
+msgid "Mother"
+msgstr "Madre"
+
+#. module: farm
+#: field:farm.semen_extraction.event,semen_move:0
+msgid "Move"
+msgstr "Movimiento"
+
+#. module: farm
+#: field:farm.farrowing.event,mummified:0
+msgid "Mummified"
+msgstr "Momificado"
+
+#. module: farm
+#: field:farm.farrowing.problem,name:0
+#: field:farm.removal.reason,name:0
+#: field:farm.removal.type,name:0
+#: field:farm.specie.breed,name:0
+#: field:farm.tags,name:0
+msgid "Name"
+msgstr "Nombre"
+
+#. module: farm
+#: help:farm.specie,name:0
+msgid "Name of the specie. ie. \"Pig\""
+msgstr "Nombre de la especie. ejem. \"Porcina\""
+
+#. module: farm
+#: selection:farm.pregnancy_diagnosis.event,result:0
+msgid "Negative"
+msgstr "Negativo"
+
+#. module: farm
+#: selection:stock.production.lot,animal_type:0
+msgid "No animal"
+msgstr "No animal"
+
+#. module: farm
+#: selection:farm.pregnancy_diagnosis.event,result:0
+msgid "Non conclusive"
+msgstr "No concluyentes"
+
+#. module: farm
+#: field:farm.abort.event,notes:0
+#: field:farm.animal,notes:0
+#: field:farm.animal.group,notes:0
+#: field:farm.event,notes:0
+#: field:farm.event.feed_mixin,notes:0
+#: field:farm.event.import.mixin,notes:0
+#: field:farm.event.order,notes:0
+#: field:farm.farrowing.event,notes:0
+#: field:farm.feed.event,notes:0
+#: field:farm.foster.event,notes:0
+#: field:farm.insemination.event,notes:0
+#: field:farm.medication.event,notes:0
+#: field:farm.move.event,notes:0
+#: field:farm.pregnancy_diagnosis.event,notes:0
+#: field:farm.removal.event,notes:0
+#: field:farm.semen_extraction.event,notes:0
+#: field:farm.transformation.event,notes:0
+#: field:farm.weaning.event,notes:0
+msgid "Notes"
+msgstr "Notas"
+
+#. module: farm
+#: field:account.invoice.line,animal_qty:0
+msgid "Num of animals"
+msgstr "Num. animales"
+
+#. module: farm
+#: field:farm.feed.animal_location_date,animale_qty:0
+#: view:website:account.report_invoice_document
+msgid "Num. Animals"
+msgstr "Num. Animales"
+
+#. module: farm
+#: field:farm.event.feed_mixin,quantity:0
+#: field:farm.feed.event,quantity:0
+#: field:farm.medication.event,quantity:0
+msgid "Num. of animals"
+msgstr "Num. de animales"
+
+#. module: farm
+#: field:farm.animal,number:0
+#: field:farm.animal.group,number:0
+msgid "Number"
+msgstr "Numero"
+
+#. module: farm
+#: help:farm.feed.animal_location_date,inventory_qty:0
+msgid "Number of Inventories which includethis date."
+msgstr "Número de inventarios que incluyen esta fecha."
+
+#. module: farm
+#: help:farm.animal.female_cycle,days_between_farrowing_weaning:0
+msgid "Number of days between Farrowing and Weaning."
+msgstr "Number of days between Farrowing and Weaning."
+
+#. module: farm
+#: field:farm.animal.group.weight,quantity:0
+msgid "Number of individuals"
+msgstr "Numero de individuos"
+
+#. module: farm
+#: help:farm.animal.female_cycle,removed:0
+msgid "Number of removed animals from Produced Group. Diference between born live and weaned, computing Fostered diference."
+msgstr "Number of removed animals from Produced Group. Diference between born live and weaned, computing Fostered diference."
+
+#. module: farm
+#: field:farm.animal.female_cycle,sequence:0
+msgid "Num. cycle"
+msgstr "Num. ciclo"
+
+#. module: farm
+#: selection:farm.pregnancy_diagnosis.event,result:0
+msgid "Observed not Pregnant"
+msgstr "Observado no embarazada"
+
+#. module: farm
+#: code:addons/farm/models/farrowing_event.py:48
+#, python-format
+msgid "Only diagnosticated pregnant females can be farrow"
+msgstr "Solo las hembras diagnosticadas pueden parir"
+
+#. module: farm
+#: code:addons/farm/models/abort_event.py:22
+#, python-format
+msgid "Only females can abort"
+msgstr "Solo las hembras pueden abortar"
+
+#. module: farm
+#: code:addons/farm/models/insemination_event.py:31
+#, python-format
+msgid "Only females can be bred"
+msgstr "Solo las hembras pueden ser inseminadas"
+
+#. module: farm
+#: code:addons/farm/models/pregnancy_diagnosis_event.py:28
+#, python-format
+msgid "Only females can be diagnosed"
+msgstr "Solo las hembras pueden ser diagnosticadas"
+
+#. module: farm
+#: code:addons/farm/models/farrowing_event.py:45
+#, python-format
+msgid "Only females can be farrow"
+msgstr "Solo las hembras pueden parir"
+
+#. module: farm
+#: code:addons/farm/models/foster_event.py:34
+#, python-format
+msgid "Only females can foster a group"
+msgstr "Solo las hembras pueden adoptar"
+
+#. module: farm
+#: code:addons/farm/models/weaning_event.py:66
+#, python-format
+msgid "Only females can wean a group"
+msgstr "Un grupo solo puede ser destetado de una hembra"
+
+#. module: farm
+#: code:addons/farm/models/foster_event.py:37
+#, python-format
+msgid "Only lactating females can foster a group"
+msgstr "Solo hembras en lactancia pueden adoptar"
+
+#. module: farm
+#: code:addons/farm/models/weaning_event.py:69
+#, python-format
+msgid "Only lactating females can wean a group"
+msgstr "Solo las hembras lactantes pueden destetar un grupo"
+
+#. module: farm
+#: code:addons/farm/models/pregnancy_diagnosis_event.py:31
+#, python-format
+msgid "Only mated females can be diagnosed"
+msgstr "Solo las hembras cubiertas pueden ser diagnosticadas"
+
+#. module: farm
+#: code:addons/farm/models/abort_event.py:25
+#, python-format
+msgid "Only pregnat females can abort"
+msgstr "Solo las hembras preñadas pueden abortar"
+
+#. module: farm
+#: field:farm.abort.event,job_order:0
+#: field:farm.event,job_order:0
+#: field:farm.event.feed_mixin,job_order:0
+#: field:farm.event.import.mixin,job_order:0
+#: field:farm.farrowing.event,job_order:0
+#: field:farm.feed.event,job_order:0
+#: field:farm.foster.event,job_order:0
+#: field:farm.insemination.event,job_order:0
+#: field:farm.medication.event,job_order:0
+#: field:farm.move.event,job_order:0
+#: field:farm.pregnancy_diagnosis.event,job_order:0
+#: field:farm.removal.event,job_order:0
+#: field:farm.semen_extraction.event,job_order:0
+#: field:farm.transformation.event,job_order:0
+#: field:farm.weaning.event,job_order:0
+msgid "Order"
+msgstr "Orden"
+
+#. module: farm
+#: field:farm.animal,origin:0
+#: field:farm.animal.group,origin:0
+#: view:farm.consume.stock:farm.farm_consume_stock_search_view
+#: field:farm.consume.stock,origin:0
+#: field:farm.move.event,from_location:0
+#: field:farm.removal.event,from_location:0
+#: field:farm.transformation.event,from_location:0
+msgid "Origin"
+msgstr "Origen"
+
+#. module: farm
+#: field:farm.foster.event,pair_female:0
+msgid "Pair Female"
+msgstr "Par Hembra"
+
+#. module: farm
+#: selection:farm.pregnancy_diagnosis.event,result:0
+msgid "Positive"
+msgstr "Positivo"
+
+#. module: farm
+#: field:farm.event.order,pregnancy_diagnosis_events:0
+msgid "Pregnanci Diagnosis"
+msgstr "Diagnostico de Embarazo"
+
+#. module: farm
+#: view:farm.pregnancy_diagnosis.event:farm.view_pregnancy_diagnosis_event_form
+msgid "Pregnanci Diagnosis Event"
+msgstr "Evento de Diagnostico de Embarazo"
+
+#. module: farm
+#: selection:farm.event.order,event_type:0
+msgid "Pregnancy Diagnosis"
+msgstr "Diagnostico de Embarazo"
+
+#. module: farm
+#: field:farm.animal.female_cycle,pregnant:0
+#: selection:farm.animal.female_cycle,state:0
+msgid "Pregnat"
+msgstr "Embarazada"
+
+#. module: farm
+#: field:farm.feed.inventory,prev_inventory:0
+msgid "Previous Inventory"
+msgstr "Inventario Previo"
+
+#. module: farm
+#: field:farm.feed.provisional_inventory,prev_inventory_date:0
+msgid "Previous Inventory Date"
+msgstr "Fecha de Inventario Previo"
+
+#. module: farm
+#: field:farm.farrowing.event,problem:0
+msgid "Problem"
+msgstr "Problema"
+
+#. module: farm
+#: field:farm.farrowing.event,produced_group:0
+msgid "Produced Group"
+msgstr "Grupo producido"
+
+#. module: farm
+#: field:farm.consume.stock,product_id:0
+#: view:purchase.order.line:farm.farm_purchase_line_search_view
+msgid "Product"
+msgstr "Producto"
+
+#. module: farm
+#: model:ir.model,name:farm.model_product_template
+msgid "Product Template"
+msgstr "Plantilla de producto"
+
+#. module: farm
+#: field:farm.specie,sale_product:0
+msgid "Product denomination in sales"
+msgstr "Denominacion del producto en ventas"
+
+#. module: farm
+#: help:farm.specie,semen_product:0
+msgid "Product for the mixture of semen to raise the expected quality.\n"
+"It is used in the Production lots produced in the Extraction Events and in the BoM containers for doses used in deliveries to farms for inseminations."
+msgstr "Producto de la mezcla de semen para elevar la calidad esperada.  n Se utiliza en los lotes de producción producidos en los Eventos de extracción y en los contenedores de lista de materiales para dosis utilizadas en las entregas a las granjas para inseminaciones."
+
+#. module: farm
+#: selection:farm.animal,state:0
+msgid "Prospective"
+msgstr "Futura"
+
+#. module: farm
+#: model:ir.model,name:farm.model_purchase_order
+msgid "Purchase Order"
+msgstr "Pedido de compra"
+
+#. module: farm
+#: model:ir.model,name:farm.model_purchase_order_line
+msgid "Purchase Order Line"
+msgstr "Línea pedido de compra"
+
+#. module: farm
+#: view:purchase.order.line:farm.view_farm_purchase_line_form
+msgid "Purchase line"
+msgstr "Linea compra"
+
+#. module: farm
+#: view:purchase.order.line:farm.view_farm_purchase_line_tree
+msgid "Purchase lines"
+msgstr "Lineas de compra"
+
+#. module: farm
+#: selection:farm.animal,origin:0
+#: selection:farm.animal.group,origin:0
+msgid "Purchased"
+msgstr "Comprado"
+
+#. module: farm
+#: model:ir.ui.menu,name:farm.menu_farm_purchases
+msgid "Purchases"
+msgstr "Compras"
+
+#. module: farm
+#: field:farm.animal,purpose:0
+msgid "Purpose"
+msgstr "Proposito"
+
+#. module: farm
+#: field:farm.feed.event,feed_quantity_animal_day:0
+msgid "Qty. per Animal Day"
+msgstr "Cantidad por Animal Día"
+
+#. module: farm
+#: field:farm.animal.group,quantity:0
+#: field:farm.consume.stock,quantity:0
+#: field:farm.feed.inventory,quantity:0
+#: field:farm.feed.inventory.mixin,quantity:0
+#: field:farm.feed.provisional_inventory,quantity:0
+#: field:farm.move.event,quantity:0
+#: field:farm.removal.event,quantity:0
+#: field:farm.semen_extraction.dose,quantity:0
+#: field:farm.transformation.event,quantity:0
+#: field:farm.weaning.event,quantity:0
+msgid "Quantity"
+msgstr "Cantidad"
+
+#. module: farm
+#: code:addons/farm/models/removal_event.py:183
+#: code:addons/farm/models/removal_event.py:186
+#: code:addons/farm/models/transformation_event.py:107
+#, python-format
+msgid "Quantity no compatible"
+msgstr "Cantidad no compatible"
+
+#. module: farm
+#: field:stock.warehouse,radius:0
+msgid "Radius"
+msgstr "Radio"
+
+#. module: farm
+#: selection:farm.animal,origin:0
+#: selection:farm.animal.group,origin:0
+msgid "Raised"
+msgstr "Criado"
+
+#. module: farm
+#: help:farm.animal.group,origin:0
+msgid "Raised means that this group was born inthe farm. Otherwise, it was purchased."
+msgstr "Criado significa que este grupo nació en la granja. De lo contrario, fue comprado."
+
+#. module: farm
+#: field:farm.removal.event,reason:0
+msgid "Reason"
+msgstr "Motivo"
+
+#. module: farm
+#: field:farm.event.order,name:0
+msgid "Reference"
+msgstr "Referencia"
+
+#. module: farm
+#: field:farm.semen_extraction.event,semen_remaining_qty:0
+msgid "Remaining Semen"
+msgstr "Remaining Semen"
+
+#. module: farm
+#: field:farm.animal,removal_date:0
+msgid "Removal Date"
+msgstr "Fecha de Eliminación"
+
+#. module: farm
+#: view:farm.removal.event:farm.view_removal_event_form
+#: model:ir.actions.act_window,name:farm.farm_removal_view
+#: model:ir.ui.menu,name:farm.menu_farm_removal_event
+msgid "Removal Event"
+msgstr "Evento de Eliminación"
+
+#. module: farm
+#: field:farm.animal.group,removal_date:0
+msgid "Removal date"
+msgstr "Fecha de Eliminación"
+
+#. module: farm
+#: field:farm.animal,removal_reason:0
+msgid "Removal reason"
+msgstr "Motivo de Eliminación"
+
+#. module: farm
+#: selection:farm.animal,state:0
+msgid "Removed"
+msgstr "Eliminado"
+
+#. module: farm
+#: field:farm.specie,removed_location:0
+msgid "Removed Location"
+msgstr "Localización de eliminación"
+
+#. module: farm
+#: field:farm.animal.female_cycle,removed:0
+msgid "Removed Quantity"
+msgstr "Cantidad eliminada"
+
+#. module: farm
+#: selection:farm.animal,purpose:0
+msgid "Replacement"
+msgstr "Reemplazo"
+
+#. module: farm
+#: field:farm.pregnancy_diagnosis.event,result:0
+msgid "Result"
+msgstr "Resultado"
+
+#. module: farm
+#: selection:farm.animal,purpose:0
+msgid "Sale"
+msgstr "Venta"
+
+#. module: farm
+#: view:farm.animal:farm.animal_search_view
+msgid "Search Animal"
+msgstr "Buscar Animal"
+
+#. module: farm
+#: view:farm.animal.group:farm.animal_group_search_view
+#: view:purchase.order.line:farm.farm_purchase_line_search_view
+msgid "Search Animal group"
+msgstr "Buscar grupo animales"
+
+#. module: farm
+#: view:farm.consume.stock:farm.farm_consume_stock_search_view
+msgid "Search consume stock"
+msgstr "Buscar consumir existencias"
+
+#. module: farm
+#: view:farm.feed.event:farm.feed_event_search_view
+msgid "Search feed event"
+msgstr "Buscar evento alimentación"
+
+#. module: farm
+#: help:farm.transformation.event,to_animal_group:0
+msgid "Select a Destination Group if youwant to add the transformed animals tothis group. To create a new group leave it empty."
+msgstr "Seleccione un grupo de destino si desea agregar los animales transformadas para este grupo."
+
+#. module: farm
+#: help:res.users,customer_payment_mode:0
+msgid "Select the default payment mode for this customer."
+msgstr "Seleccione el modo de pago predeterminado para este cliente."
+
+#. module: farm
+#: help:res.users,supplier_payment_mode:0
+msgid "Select the default payment mode for this supplier."
+msgstr "Seleccione el modo de pago predeterminado para este proveedor."
+
+#. module: farm
+#: field:mrp.bom,semen_dose:0
+msgid "Semen Dose"
+msgstr "Dosis Semen"
+
+#. module: farm
+#: field:farm.specie.farm_line,dose_lot_sequence:0
+msgid "Semen Dose Lots' Sequence"
+msgstr "Secuencia lotes dosis semen"
+
+#. module: farm
+#: field:farm.semen_extraction.event,untreated_semen_qty:0
+msgid "Semen Extracted Qty"
+msgstr "Cantidad de Semen Extraido"
+
+#. module: farm
+#: model:ir.ui.menu,name:farm.menu_farm_extraction_event
+msgid "Semen Extraction"
+msgstr "Extracción de Semen"
+
+#. module: farm
+#: view:farm.semen_extraction.event:farm.view_semen_extraction_event_form
+msgid "Semen Extraction Event"
+msgstr "Evento de Extracción de Semen"
+
+#. module: farm
+#: field:farm.animal,extractions:0
+msgid "Semen Extractions"
+msgstr "Extraciones de Semen"
+
+#. module: farm
+#: field:farm.semen_extraction.event,semen_qty:0
+msgid "Semen Producec Quantity"
+msgstr "Cantidad de Semen producido"
+
+#. module: farm
+#: field:farm.semen_extraction.dose,semen_qty:0
+msgid "Semen Qty"
+msgstr "Cantidad de Semen"
+
+#. module: farm
+#: field:farm.semen_extraction.event,semen_lot:0
+msgid "Semen lot"
+msgstr "Lote Semen"
+
+#. module: farm
+#: field:farm.semen_extraction.event,semen_product:0
+#: field:farm.specie,semen_product:0
+msgid "Semen's Product"
+msgstr "Producto Semen"
+
+#. module: farm
+#: help:farm.specie.farm_line,female_sequence:0
+msgid "Sequence used for female production lots and animals."
+msgstr "Secuencia utilizada para lotes de hembras."
+
+#. module: farm
+#: help:farm.specie.farm_line,group_sequence:0
+msgid "Sequence used for group production lots and animals."
+msgstr "Secuencia utilizada para lotes de grupos."
+
+#. module: farm
+#: help:farm.specie.farm_line,individual_sequence:0
+msgid "Sequence used for individual lots and animals."
+msgstr "Secuencia utilizada para lotes de individuos."
+
+#. module: farm
+#: help:farm.specie.farm_line,male_sequence:0
+msgid "Sequence used for male lots and animals."
+msgstr "Secuencia utilizada para lotes de machos."
+
+#. module: farm
+#: help:farm.specie.farm_line,event_order_sequence:0
+msgid "Sequence used for the Event Orders in this farm."
+msgstr "Secuencia utilizada para eventos de orden en esta granja."
+
+#. module: farm
+#: view:purchase.order:farm.farm_purchase_order_form_inherit
+msgid "Set Analitics"
+msgstr "Imputar gastos"
+
+#. module: farm
+#: field:stock.inventory,feed_analitic:0
+msgid "Set Feed Analitic"
+msgstr "Imputar a Pienso"
+
+#. module: farm
+#: field:farm.animal,sex:0
+msgid "Sex"
+msgstr "Sexo"
+
+#. module: farm
+#: field:farm.feed.inventory,location:0
+#: field:farm.feed.inventory.mixin,location:0
+#: field:farm.feed.provisional_inventory,location:0
+#: field:stock.location,silo:0
+msgid "Silo"
+msgstr "Silo"
+
+#. module: farm
+#: selection:farm.animal.group,state:0
+msgid "Sold"
+msgstr "Vendido"
+
+#. module: farm
+#: field:farm.abort.event,specie:0
+#: field:farm.animal,specie:0
+#: field:farm.animal.group,specie:0
+#: field:farm.event,specie:0
+#: field:farm.event.feed_mixin,specie:0
+#: field:farm.event.import.mixin,specie:0
+#: field:farm.event.order,specie:0
+#: field:farm.farrowing.event,specie:0
+#: field:farm.feed.event,specie:0
+#: field:farm.feed.inventory,specie:0
+#: field:farm.feed.inventory.mixin,specie:0
+#: field:farm.feed.provisional_inventory,specie:0
+#: field:farm.foster.event,specie:0
+#: field:farm.insemination.event,specie:0
+#: field:farm.medication.event,specie:0
+#: field:farm.move.event,specie:0
+#: field:farm.pregnancy_diagnosis.event,specie:0
+#: field:farm.removal.event,specie:0
+#: field:farm.semen_extraction.dose,specie:0
+#: field:farm.semen_extraction.event,specie:0
+#: view:farm.specie:farm.view_specie_form
+#: view:farm.specie:farm.view_specie_tree
+#: field:farm.specie.breed,specie:0
+#: field:farm.specie.farm_line,specie:0
+#: field:farm.specie.ir.model,specie:0
+#: field:farm.transformation.event,specie:0
+#: field:farm.weaning.event,specie:0
+#: model:ir.actions.act_window,name:farm.farm_specie_view
+#: model:ir.ui.menu,name:farm.menu_farm_configuration_specie
+msgid "Specie"
+msgstr "Especie"
+
+#. module: farm
+#: field:farm.removal.event,specific_lot:0
+msgid "Specific lot"
+msgstr "Lote especifico"
+
+#. module: farm
+#: field:farm.event.feed_mixin,start_date:0
+#: field:farm.feed.event,start_date:0
+#: field:farm.medication.event,start_date:0
+msgid "Start Date"
+msgstr "Fecha inicio"
+
+#. module: farm
+#: help:farm.event.feed_mixin,start_date:0
+#: help:farm.feed.event,start_date:0
+#: help:farm.medication.event,start_date:0
+msgid "Start date of the period inwhich the given quantity of product wasconsumed."
+msgstr "Fecha de inicio del período en que se consume la cantidad dada de producto."
+
+#. module: farm
+#: field:farm.abort.event,state:0
+#: view:farm.animal:farm.animal_search_view
+#: field:farm.animal,state:0
+#: field:farm.animal.female_cycle,state:0
+#: view:farm.animal.group:farm.animal_group_search_view
+#: field:farm.animal.group,state:0
+#: view:farm.consume.stock:farm.farm_consume_stock_search_view
+#: field:farm.consume.stock,state:0
+#: field:farm.event,state:0
+#: field:farm.event.feed_mixin,state:0
+#: field:farm.event.import.mixin,state:0
+#: field:farm.event.order,state:0
+#: field:farm.farrowing.event,state:0
+#: view:farm.feed.event:farm.feed_event_search_view
+#: field:farm.feed.event,state:0
+#: field:farm.foster.event,state:0
+#: field:farm.insemination.event,state:0
+#: field:farm.medication.event,state:0
+#: field:farm.move.event,state:0
+#: field:farm.pregnancy_diagnosis.event,state:0
+#: field:farm.removal.event,state:0
+#: field:farm.semen_extraction.event,state:0
+#: field:farm.transformation.event,state:0
+#: field:farm.weaning.event,state:0
+msgid "State"
+msgstr "Estado"
+
+#. module: farm
+#: field:farm.feed.inventory,state:0
+#: field:farm.feed.inventory.mixin,state:0
+#: field:farm.feed.provisional_inventory,state:0
+msgid "States"
+msgstr "Estados"
+
+#. module: farm
+#: field:farm.farrowing.event,stillborn:0
+msgid "Stillborn"
+msgstr "Nacido Muerto"
+
+#. module: farm
+#: field:farm.event.feed_mixin,move:0
+#: field:farm.farrowing.event,move:0
+#: field:farm.feed.event,move:0
+#: field:farm.medication.event,move:0
+#: field:farm.move.event,move:0
+#: field:farm.removal.event,move:0
+#: field:farm.transformation.event,move:0
+#: model:ir.model,name:farm.model_stock_move
+msgid "Stock Move"
+msgstr "Movimiento de existencias"
+
+#. module: farm
+#: field:farm.insemination.event,move:0
+msgid "Stock move"
+msgstr "Movimiento de existencias"
+
+#. module: farm
+#: field:res.users,supplier_payment_mode:0
+msgid "Supplier Payment Mode"
+msgstr "Modo de pago del proveedor"
+
+#. module: farm
+#: field:farm.animal.group,tags:0
+#: view:farm.tags:farm.view_tag_form
+#: view:farm.tags:farm.view_tag_tree
+#: model:ir.actions.act_window,name:farm.farm_tag_view
+#: model:ir.ui.menu,name:farm.menu_farm_configuration_tag
+msgid "Tag"
+msgstr "Etiqueta"
+
+#. module: farm
+#: field:farm.animal,tags:0
+msgid "Tags"
+msgstr "Etiquetas"
+
+#. module: farm
+#: field:farm.event.order,trasformation_events:0
+msgid "Tasformation Events"
+msgstr "Eventos de transformación"
+
+#. module: farm
+#: help:farm.animal,initial_location:0
+msgid "The Location where the animal was reached or where it was allocated when it was purchased.\n"
+"It is used as historical information and to get Serial Number."
+msgstr "El lugar donde llegó el animal o en los que se asignó cuando fue comprado.  N Se utiliza como información histórica y para obtener el Número de Serie."
+
+#. module: farm
+#: help:farm.animal.group,initial_location:0
+msgid "The Location where the group wasreached or where it was allocated whenit was purchased.\n"
+"It is used ashistorical information and to getSerial Number."
+msgstr "El lugar donde llegó el grupo o en los que se asignó cuando fue comprado.  N Se utiliza como información histórica y para obtener el Número de Serie."
+
+#. module: farm
+#: help:farm.animal,arrival_date:0
+msgid "The date this animal arrived (if itwas purchased) or when it was born."
+msgstr "La fecha de este animal llegó (si fue comprado) o cuando nació."
+
+#. module: farm
+#: help:farm.animal.group,arrival_date:0
+msgid "The date this group arrived (if it waspurchased) or when it was born."
+msgstr "La fecha de este grupo llegó (si fue comprado) o cuando nació."
+
+#. module: farm
+#: help:farm.feed.event,feed_inventory:0
+msgid "The inventory that generated thisevent automatically."
+msgstr "El inventario que generó este evento de forma automática."
+
+#. module: farm
+#: help:farm.animal.group,initial_quantity:0
+msgid "The number of animals in groupwhen it was reached or purchased.\n"
+"Itis used as historical information andto create the initial move."
+msgstr "El número de animales del grupo cuando nació o  fue comprado.  N Se utiliza como información histórica y para crear el movimiento inicial."
+
+#. module: farm
+#: code:addons/farm/models/event_order.py:138
+#, python-format
+msgid "The values of animal type are diferent on order and events"
+msgstr "El tipo de animal es diferente en la orden y los eventos"
+
+#. module: farm
+#: code:addons/farm/models/event_order.py:133
+#, python-format
+msgid "The values of farm are diferent on order and events"
+msgstr "La granja seleccionada es diferente en la orden y los eventos"
+
+#. module: farm
+#: code:addons/farm/models/event_order.py:142
+#, python-format
+msgid "The values of specie are diferent on order and events"
+msgstr "La especie seleccionada es diferente en la orden y los eventos"
+
+#. module: farm
+#: code:addons/farm/models/event_order.py:124
+#, python-format
+msgid "There are no event associated with this work order"
+msgstr "No hay eventos asociados a esta orden"
+
+#. module: farm
+#: help:res.users,property_delivery_carrier:0
+msgid "This delivery method will be used when invoicing from picking."
+msgstr "This delivery method will be used when invoicing from picking."
+
+#. module: farm
+#: selection:farm.animal,state:0
+msgid "To review"
+msgstr "Para revisar"
+
+#. module: farm
+#: view:farm.feed.event:farm.view_feed_event_tree
+msgid "Tot. feed quantity"
+msgstr "Total pienso"
+
+#. module: farm
+#: view:purchase.order.line:farm.view_farm_purchase_line_tree
+msgid "Tot. price"
+msgstr "Total precio"
+
+#. module: farm
+#: field:farm.weaning.event,transformation_event:0
+msgid "Transformation Event"
+msgstr "Evento de trasformación"
+
+#. module: farm
+#: field:farm.specie,lost_found_location:0
+msgid "Transit Location"
+msgstr "Localizacion Transitoria"
+
+#. module: farm
+#: selection:farm.animal.group,state:0
+msgid "Transition"
+msgstr "Transición"
+
+#. module: farm
+#: field:stock.location,transport:0
+msgid "Transport"
+msgstr "Transporte"
+
+#. module: farm
+#: view:farm.transformation.event:farm.view_trasformation_event_form
+msgid "Trasformation"
+msgstr "Trasformación"
+
+#. module: farm
+#: selection:farm.event.order,event_type:0
+msgid "Trasformation Event"
+msgstr "Evento de Trasformación"
+
+#. module: farm
+#: field:farm.animal,type:0
+#: field:farm.removal.event,removal_type:0
+msgid "Type"
+msgstr "Tipo"
+
+#. module: farm
+#: field:farm.event.feed_mixin,uom:0
+#: field:farm.feed.event,uom:0
+#: field:farm.feed.inventory,uom:0
+#: field:farm.feed.inventory.mixin,uom:0
+#: field:farm.feed.provisional_inventory,uom:0
+#: field:farm.medication.event,uom:0
+#: field:farm.move.event,uom:0
+msgid "UOM"
+msgstr "Unidad de Medida"
+
+#. module: farm
+#: selection:farm.animal,sex:0
+msgid "Undetermined"
+msgstr "Indeterminado"
+
+#. module: farm
+#: help:farm.animal,number:0
+msgid "Unique Serial Number"
+msgstr "Numero de serie"
+
+#. module: farm
+#: field:farm.move.event,unit_price:0
+msgid "Unit Price"
+msgstr "Precio unitario"
+
+#. module: farm
+#: help:product.template,farrowing_price:0
+msgid "Unitary cost for farrowing events.It's only used when the product isa group product of a farm specie."
+msgstr "Coste unitario para los eventos de parto. Sólo se utiliza cuando el producto es un producto de grupo de una especie de la granja."
+
+#. module: farm
+#: help:product.template,wearing_price:0
+msgid "Unitary cost for weaning events.It's only used when the product is agroup product of a farm specie."
+msgstr "Coste unitario para el destete. Sólo se utiliza cuando el producto es un producto de grupo de una especie de la granja."
+
+#. module: farm
+#: help:farm.move.event,unit_price:0
+msgid "Unitary cost of Animal or Group foranalytical accounting."
+msgstr "Costo unitario de animales o de grupo para la contabilidad analítica."
+
+#. module: farm
+#: selection:farm.animal,purpose:0
+msgid "Unknown"
+msgstr "Desconocido"
+
+#. module: farm
+#: selection:farm.animal,state:0
+#: selection:farm.animal.female_cycle,state:0
+msgid "Unmated"
+msgstr "Sin cubrir"
+
+#. module: farm
+#: field:farm.animal.female_cycle,days_between_wearing_and_insemination:0
+msgid "Unmated Days"
+msgstr "Dias sin cubrir"
+
+#. module: farm
+#: field:farm.animal,days_from_farrowing:0
+msgid "Unpregnat Days"
+msgstr "Dias de reposo"
+
+#. module: farm
+#: field:farm.animal.group.weight,uom:0
+#: field:farm.animal.weight,uom:0
+msgid "Uom"
+msgstr "Unidad de Medida"
+
+#. module: farm
+#: model:res.groups,name:farm.group_farm_user
+msgid "User"
+msgstr "Usuario"
+
+#. module: farm
+#: model:ir.model,name:farm.model_res_users
+msgid "Users"
+msgstr "Usuarios"
+
+#. module: farm
+#: selection:farm.abort.event,state:0
+#: selection:farm.event,state:0
+#: selection:farm.event.feed_mixin,state:0
+#: selection:farm.event.import.mixin,state:0
+#: selection:farm.event.order,state:0
+#: selection:farm.farrowing.event,state:0
+#: selection:farm.feed.event,state:0
+#: selection:farm.feed.inventory,state:0
+#: selection:farm.feed.inventory.mixin,state:0
+#: selection:farm.feed.provisional_inventory,state:0
+#: selection:farm.foster.event,state:0
+#: selection:farm.insemination.event,state:0
+#: selection:farm.medication.event,state:0
+#: selection:farm.move.event,state:0
+#: selection:farm.pregnancy_diagnosis.event,state:0
+#: selection:farm.removal.event,state:0
+#: selection:farm.semen_extraction.dose,state:0
+#: selection:farm.semen_extraction.event,state:0
+#: selection:farm.transformation.event,state:0
+#: selection:farm.weaning.event,state:0
+msgid "Validated"
+msgstr "Validado"
+
+#. module: farm
+#: help:farm.specie,foster_location:0
+msgid "Virtual location where fostered animals are moved to."
+msgstr "Ubicación virtual donde los animales adoptados son movidos."
+
+#. module: farm
+#: help:farm.specie,lost_found_location:0
+msgid "Virtual location where lost or found animals are moved to."
+msgstr "Ubicacion transitoria para animales."
+
+#. module: farm
+#: help:farm.specie,removed_location:0
+msgid "Virtual location where removed animals are moved to."
+msgstr "Ubicación virtual a la que se mueven los animales eliminados."
+
+#. module: farm
+#: model:ir.model,name:farm.model_stock_warehouse
+msgid "Warehouse"
+msgstr "Almacén"
+
+#. module: farm
+#: field:farm.weaning.event,weaned_to_location:0
+msgid "Weaned Destination"
+msgstr "Destino de Destetados"
+
+#. module: farm
+#: field:farm.weaning.event,weared_group:0
+msgid "Weaned group"
+msgstr "Grupo destetado"
+
+#. module: farm
+#: view:farm.weaning.event:farm.view_weaning_event_form
+msgid "Weaning Event"
+msgstr "Evento de Destete"
+
+#. module: farm
+#: field:product.template,wearing_price:0
+msgid "Weaning Price"
+msgstr "Precio Destete"
+
+#. module: farm
+#: field:farm.animal.female_cycle,weaning_event:0
+msgid "Weaning event"
+msgstr "Evento de Destete"
+
+#. module: farm
+#: selection:farm.event.order,event_type:0
+msgid "Weanings"
+msgstr "Destetes"
+
+#. module: farm
+#: field:farm.animal.female_cycle,weared:0
+msgid "Weared"
+msgstr "Weared/Llevado por"
+
+#. module: farm
+#: field:farm.weaning.event,weared_move:0
+msgid "Weared Stock Move"
+msgstr "Movimiento Existencias Destete"
+
+#. module: farm
+#: field:farm.weaning.event_female_cycle,event:0
+msgid "Wearing Event"
+msgstr "Evento Destete"
+
+#. module: farm
+#: view:farm.weaning.event_female_cycle:farm.view_weaning_event_female_cycle_form
+msgid "Wearing Event-female cycle"
+msgstr "Evento Destete -Ciclo Hembra"
+
+#. module: farm
+#: view:farm.animal.weight:farm.view_animal_weight_form
+#: field:farm.animal.weight,weight:0
+#: field:farm.move.event,weight:0
+msgid "Weight"
+msgstr "Peso"
+
+#. module: farm
+#: field:farm.move.event,weight_record:0
+msgid "Weight Record"
+msgstr "Registro Peso"
+
+#. module: farm
+#: field:farm.animal.group,weights:0
+msgid "Weights"
+msgstr "Pesos"
+
+#. module: farm
+#: field:farm.animal,weight:0
+msgid "Weigth records"
+msgstr "Registros Pesos"
+
+#. module: farm
+#: field:farm.animal.group.weight,weight:0
+msgid "Weihht"
+msgstr "Peso"
+
+#. module: farm
+#: model:ir.ui.menu,name:farm.menu_farm_event_order
+msgid "Work order"
+msgstr "Orden Trabajo"
+
+#. module: farm
+#: selection:farm.consume.stock,type:0
+msgid "Yard"
+msgstr "Campo"
+
+#. module: farm
+#: field:purchase.analitic.remain,quantity:0
+msgid "amount"
+msgstr "Cantidad"
+
+#. module: farm
+#: field:purchase.order.line,aux_price_subtotal:0
+msgid "amount_untaxed"
+msgstr "Total sin Tasas"
+
+#. module: farm
+#: code:addons/farm/models/animal.py:129
+#, python-format
+msgid "animal location and product location are diferent"
+msgstr "La localizacion del animal y del producto es diferente"
+
+#. module: farm
+#: field:farm.animal.group,feed_quantity:0
+msgid "cumulative consumed feed"
+msgstr "Consumo de alimento acumulativo"
+
+#. module: farm
+#: code:addons/farm/models/semen_extration_event.py:117
+#, python-format
+msgid "dose already defined"
+msgstr "La dosis ya esta definida"
+
+#. module: farm
+#: field:farm.animal.group,fatten_date:0
+msgid "fatten day"
+msgstr "Inicio cebo"
+
+#. module: farm
+#: field:farm.event.order,feed_events:0
+msgid "feed"
+msgstr "Alimento"
+
+#. module: farm
+#: code:addons/farm/models/insemination_event.py:40
+#, python-format
+msgid "female's cycle is not compatible to be bred"
+msgstr "Ciclo de la hembra no es compatible para ser cubierta"
+
+#. module: farm
+#: code:addons/farm/models/animal_group.py:283
+#, python-format
+msgid "group intial quantity and product quantity are diferent"
+msgstr "La cantidad inicial del grupo y la cantidad del producto es diferente"
+
+#. module: farm
+#: code:addons/farm/models/analitic_sales.py:95
+#: code:addons/farm/models/stock.py:62
+#, python-format
+msgid "group sold not found"
+msgstr "El grupo vendido no encontrado"
+
+#. module: farm
+#: field:stock.warehouse,holding_number:0
+msgid "holding number"
+msgstr "Numero de Explotación"
+
+#. module: farm
+#: help:stock.warehouse,radius:0
+msgid "is used for calculating transport costs, you can use absolute or relative values"
+msgstr "Se utiliza para calcular los costes de transporte, puedes usar valores absolutos o relativos"
+
+#. module: farm
+#: field:purchase.analitic.remain,last_calc:0
+msgid "last day unit calc"
+msgstr "Calc. unidad del último día"
+
+#. module: farm
+#: field:farm.animal,lot:0
+msgid "lot"
+msgstr "Lote"
+
+#. module: farm
+#: code:addons/farm/models/animal_group.py:248
+#, python-format
+msgid "lots can not be mixed in an initial group, create a group for each lot and then group them into the desired group"
+msgstr "Los lotes no se pueden mezclar en un grupo inicial, cree un grupo para cada lote y luego agruparlos en el grupo deseado"
+
+#. module: farm
+#: view:purchase.order.line:farm.farm_purchase_line_search_view
+msgid "month"
+msgstr "Mes"
+
+#. module: farm
+#: field:farm.specie,name:0
+msgid "name"
+msgstr "Nombre"
+
+#. module: farm
+#: code:addons/farm/models/farrowing_event.py:51
+#, python-format
+msgid "no deads and no lives"
+msgstr "No hay muertos ni vivos"
+
+#. module: farm
+#: code:addons/farm/models/semen_extration_event.py:133
+#, python-format
+msgid "no doses"
+msgstr "no hay dosis"
+
+#. module: farm
+#: code:addons/farm/models/animal.py:126
+#: code:addons/farm/models/animal_group.py:275
+#, python-format
+msgid "no product in farms for this lot"
+msgstr "No se encuentra el producto en la granja con este lote"
+
+#. module: farm
+#: field:farm.semen_extraction.dose,production:0
+msgid "production"
+msgstr "Producción"
+
+#. module: farm
+#: code:addons/farm/models/transformation_event.py:110
+#, python-format
+msgid "quantity is biger than group quantity"
+msgstr "La cantidad es mayor al tamaño del grupo"
+
+#. module: farm
+#: code:addons/farm/models/foster_event.py:52
+#, python-format
+msgid "quantity is biger than incoming group quantity"
+msgstr "La cantidad es mayor al tamaño del grupo entrante"
+
+#. module: farm
+#: code:addons/farm/models/transformation_event.py:113
+#, python-format
+msgid "quantity is smaler than one"
+msgstr "Cantidad menor de uno"
+
+#. module: farm
+#: field:purchase.analitic.remain,quantity_per_unit:0
+msgid "quantity per unit"
+msgstr "Cantidad por unidad"
+
+#. module: farm
+#: code:addons/farm/models/insemination_event.py:78
+#, python-format
+msgid "semen dose no avairable"
+msgstr "Dosis de semen no disponible"
+
+#. module: farm
+#: field:stock.location.silo_stock.location,silo:0
+msgid "silo"
+msgstr "Silo"
+
+#. module: farm
+#: field:farm.foster.locations,specie:0
+#: field:farm.future_maders.locations,specie:0
+#: field:farm.transit.locations,specie:0
+msgid "specie"
+msgstr "Especie"
+
+#. module: farm
+#: field:farm.semen_extraction.dose,state:0
+msgid "state"
+msgstr "Estado"
+
+#. module: farm
+#: code:addons/farm/models/purchse_analytics.py:80
+#: code:addons/farm/models/purchse_analytics.py:293
+#, python-format
+msgid "the bill should have lower starting date to the final"
+msgstr "La factura dive tener una fecha de inicio menor a la final"
+
+#. module: farm
+#: code:addons/farm/models/transformation_event.py:122
+#: code:addons/farm/models/transformation_event.py:128
+#, python-format
+msgid "the destination is different from the location of the destination group"
+msgstr "El destino es diferente al del grupo de destino"
+
+#. module: farm
+#: code:addons/farm/models/transformation_event.py:132
+#, python-format
+msgid "the destination of animal is the same of the locationof the origin group"
+msgstr "El destino del animal es el mismo al del grupo de origen"
+
+#. module: farm
+#: code:addons/farm/models/removal_event.py:198
+#, python-format
+msgid "the origin is different from the location of the animal"
+msgstr "El origen es diferente a la localización del animal"
+
+#. module: farm
+#: code:addons/farm/models/removal_event.py:193
+#, python-format
+msgid "the origin is different from the location of the group"
+msgstr "El origen es diferente a la localización del grupo"
+
+#. module: farm
+#: code:addons/farm/models/stock.py:88
+#, python-format
+msgid "there are insufficient nº of animals"
+msgstr "Numero insuficiente de animales"
+
+#. module: farm
+#: code:addons/farm/models/animal_group.py:271
+#, python-format
+msgid "this lot iis in use, please create new lot"
+msgstr "Este lote esta en uso por favor crea un nuevo lote"
+
+#. module: farm
+#: code:addons/farm/models/animal_group.py:290
+#, python-format
+msgid "this lot is in use from oder group"
+msgstr "Este lote esta en uso por otro grupo"
+
+#. module: farm
+#: code:addons/farm/models/animal.py:122
+#, python-format
+msgid "this lot is in use, please create new lot"
+msgstr "Este lote esta en uso por favor crea un nuevo lote"
+
+#. module: farm
+#: help:farm.specie,sale_product:0
+msgid "use when you sale animal units but customer pay meat kilogram"
+msgstr "Usar cuando se venden animales pero el cliente paga por kg carne"
+
+#. module: farm
+#: field:farm.event.order,weaning_events:0
+msgid "weaning"
+msgstr "Destete"
+
+#. module: farm
+#: field:farm.animal.group,weaning_day:0
+msgid "weaning_day"
+msgstr "Dia de destete"

+ 3055 - 0
i18n/farm.pot

@@ -0,0 +1,3055 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+#	* farm
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-10-20 10:15+0000\n"
+"PO-Revision-Date: 2017-10-20 10:15+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: \n"
+
+#. module: farm
+#: field:farm.animal.female_cycle,abort_event:0
+msgid "Abort"
+msgstr ""
+
+#. module: farm
+#: view:farm.abort.event:farm.view_abort_event_form
+msgid "Abort Event"
+msgstr ""
+
+#. module: farm
+#: field:farm.event.order,abort_events:0
+msgid "Abort Events"
+msgstr ""
+
+#. module: farm
+#: selection:farm.event.order,event_type:0
+msgid "Aborts"
+msgstr ""
+
+#. module: farm
+#: help:farm.animal,state:0
+msgid "According to NPPC Production and FinancialStandards there are four status for breedingsows The status change is event driven:arrivaldate, entry date mating event and removal event"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,active:0
+#: field:farm.animal.group,active:0
+msgid "Active"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,account:0
+#: field:farm.animal.group,account:0
+msgid "Analytic Account"
+msgstr ""
+
+#. module: farm
+#: field:farm.abort.event,animal:0
+#: view:farm.animal:farm.view_animal_form
+#: view:farm.animal:farm.view_animal_tree
+#: field:farm.animal.weight,animal:0
+#: field:farm.event,animal:0
+#: field:farm.event.feed_mixin,animal:0
+#: field:farm.event.import.mixin,animal:0
+#: field:farm.farrowing.event,animal:0
+#: field:farm.feed.animal_location_date,animal:0
+#: field:farm.feed.event,animal:0
+#: field:farm.foster.event,animal:0
+#: field:farm.insemination.event,animal:0
+#: field:farm.medication.event,animal:0
+#: field:farm.move.event,animal:0
+#: field:farm.pregnancy_diagnosis.event,animal:0
+#: field:farm.removal.event,animal:0
+#: field:farm.semen_extraction.event,animal:0
+#: field:farm.transformation.event,animal:0
+#: field:farm.weaning.event,animal:0
+#: model:ir.ui.menu,name:farm.menu_farm_animal
+#: field:stock.lot_farm.animal,animal:0
+msgid "Animal"
+msgstr ""
+
+#. module: farm
+#: view:farm.animal.group:farm.view_animal_group
+#: view:farm.animal.group:farm.view_animal_group_tree
+#: field:stock.lot_farm.animal.group,animal_group:0
+msgid "Animal Group"
+msgstr ""
+
+#. module: farm
+#: view:stock.lot_farm.animal:farm.view_stock_lot_animal_form
+#: view:stock.lot_farm.animal.group:farm.view_stock_lot_animal_group_form
+msgid "Animal Group Tag"
+msgstr ""
+
+#. module: farm
+#: view:farm.animal.group.weight:farm.view_animal_group_weigth
+#: view:farm.animal.group.weight:farm.view_animal_group_weigth_tree
+msgid "Animal Group Weigth"
+msgstr ""
+
+#. module: farm
+#: view:farm.move.event:farm.view_move_event_form
+msgid "Animal Move"
+msgstr ""
+
+#. module: farm
+#: model:ir.actions.act_window,name:farm.location_open_animal_moves
+#: view:stock.location:farm.stock_location_form_farm_view
+msgid "Animal Moves"
+msgstr ""
+
+#. module: farm
+#: field:farm.abort.event,animal_type:0
+#: field:farm.event,animal_type:0
+#: field:farm.event.feed_mixin,animal_type:0
+#: field:farm.event.import.mixin,animal_type:0
+#: field:farm.event.order,animal_type:0
+#: field:farm.farrowing.event,animal_type:0
+#: field:farm.feed.animal_location_date,animal_type:0
+#: field:farm.feed.event,animal_type:0
+#: field:farm.foster.event,animal_type:0
+#: field:farm.insemination.event,animal_type:0
+#: field:farm.medication.event,animal_type:0
+#: field:farm.move.event,animal_type:0
+#: field:farm.pregnancy_diagnosis.event,animal_type:0
+#: field:farm.removal.event,animal_type:0
+#: field:farm.semen_extraction.event,animal_type:0
+#: field:farm.transformation.event,animal_type:0
+#: field:farm.weaning.event,animal_type:0
+msgid "Animal Type"
+msgstr ""
+
+#. module: farm
+#: field:farm.transformation.event,to_animal_type:0
+msgid "Animal Type to Trasform"
+msgstr ""
+
+#. module: farm
+#: selection:farm.move.event,weight_record:0
+msgid "Animal Weight"
+msgstr ""
+
+#. module: farm
+#: model:ir.ui.menu,name:farm.menu_farm_animal_group
+msgid "Animal group"
+msgstr ""
+
+#. module: farm
+#: model:ir.actions.act_window,name:farm.farm_animal_group_view
+msgid "Animal groups"
+msgstr ""
+
+#. module: farm
+#: field:stock.production.lot,animal_type:0
+msgid "Animal type"
+msgstr ""
+
+#. module: farm
+#: field:farm.tags,animals:0
+#: model:ir.actions.act_window,name:farm.farm_animal_view
+#: model:ir.ui.menu,name:farm.menu_farm_animals
+msgid "Animals"
+msgstr ""
+
+#. module: farm
+#: view:farm.move.event:farm.view_move_event_tree
+msgid "Animals Moves"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,arrival_date:0
+#: field:farm.animal.group,arrival_date:0
+msgid "Arrival Date"
+msgstr ""
+
+#. module: farm
+#: field:purchase.order.line,end_date:0
+msgid "Bill end date"
+msgstr ""
+
+#. module: farm
+#: model:ir.model,name:farm.model_mrp_bom
+msgid "Bill of Material"
+msgstr ""
+
+#. module: farm
+#: field:purchase.order.line,start_date:0
+msgid "Bill start day"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,birthdate:0
+msgid "Birthdate"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,breed:0
+#: field:farm.animal.group,breed:0
+#: view:farm.specie.breed:farm.view_breed_form
+msgid "Breed"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie,breeds:0
+msgid "Breeds"
+msgstr ""
+
+#. module: farm
+#: view:farm.semen_extraction.event:farm.view_semen_extraction_event_form
+msgid "Calc. Doses"
+msgstr ""
+
+#. module: farm
+#: field:farm.semen_extraction.event,semen_calculated_qty:0
+msgid "Calc. Semen Produced Qty"
+msgstr ""
+
+#. module: farm
+#: field:farm.semen_extraction.event,solvent_calculated_qty:0
+msgid "Calc. semen solvent Qty"
+msgstr ""
+
+#. module: farm
+#: field:farm.semen_extraction.event,dose_calculated_units:0
+msgid "Calculated Doses"
+msgstr ""
+
+#. module: farm
+#: help:farm.semen_extraction.event,dose_calculated_units:0
+msgid "Calculates the number of doses based on Container (BoM) and Semen Produced Qty. The quantity is expressed in the UoM of the Container.\n"
+"You have to save the event to see this calculated value."
+msgstr ""
+
+#. module: farm
+#: selection:farm.feed.inventory,state:0
+#: selection:farm.feed.inventory.mixin,state:0
+#: selection:farm.feed.provisional_inventory,state:0
+msgid "Cancelled"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/purchse_analytics.py:86
+#, python-format
+msgid "Choose farm or yard"
+msgstr ""
+
+#. module: farm
+#: model:ir.model,name:farm.model_res_company
+msgid "Companies"
+msgstr ""
+
+#. module: farm
+#: model:ir.ui.menu,name:farm.menu_farm_consume_stock
+msgid "Comsume Stock"
+msgstr ""
+
+#. module: farm
+#: field:farm.event.feed_mixin,feed_quantity:0
+#: field:farm.feed.event,feed_quantity:0
+#: field:farm.medication.event,feed_quantity:0
+msgid "Comsumed Cuantity"
+msgstr ""
+
+#. module: farm
+#: model:ir.ui.menu,name:farm.menu_farm_configuration
+msgid "Configuration"
+msgstr ""
+
+#. module: farm
+#: view:farm.consume.stock:farm.view_consume_stock_form
+msgid "Confirm Consume"
+msgstr ""
+
+#. module: farm
+#: view:farm.event.order:farm.view_event_order_form
+#: view:farm.removal.event:farm.view_removal_event_form
+#: view:farm.semen_extraction.event:farm.view_semen_extraction_event_form
+msgid "Confirm Order"
+msgstr ""
+
+#. module: farm
+#: selection:farm.consume.stock,state:0
+msgid "Confirmed"
+msgstr ""
+
+#. module: farm
+#: view:farm.consume.stock:farm.view_consume_stock_form
+msgid "Consume stock"
+msgstr ""
+
+#. module: farm
+#: model:ir.actions.act_window,name:farm.farm_consume_stock_view
+msgid "ConsumeStock"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,consumed_feed:0
+msgid "Consumed Feed (kg)"
+msgstr ""
+
+#. module: farm
+#: field:res.company,feed_account:0
+msgid "Consumed Feed Account"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.group,consumed_feed:0
+msgid "Consumed Feed per Animal (kg)"
+msgstr ""
+
+#. module: farm
+#: field:farm.feed.animal_location_date,consumed_qty:0
+msgid "Consumed Qty"
+msgstr ""
+
+#. module: farm
+#: field:farm.feed.animal_location_date,consumed_qty_animal:0
+msgid "Consumed Qty, per Animal"
+msgstr ""
+
+#. module: farm
+#: field:farm.semen_extraction.dose,bom:0
+msgid "Container"
+msgstr ""
+
+#. module: farm
+#: field:mrp.analitic.remain,qty_per_unit:0
+msgid "Cost per unit"
+msgstr ""
+
+#. module: farm
+#: field:farm.abort.event,create_uid:0
+#: field:farm.animal,create_uid:0
+#: field:farm.animal.female_cycle,create_uid:0
+#: field:farm.animal.group,create_uid:0
+#: field:farm.animal.group.weight,create_uid:0
+#: field:farm.animal.weight,create_uid:0
+#: field:farm.consume.stock,create_uid:0
+#: field:farm.event.order,create_uid:0
+#: field:farm.farrowing.event,create_uid:0
+#: field:farm.farrowing.event_female_cycle,create_uid:0
+#: field:farm.farrowing.event_group,create_uid:0
+#: field:farm.farrowing.problem,create_uid:0
+#: field:farm.feed.animal_location_date,create_uid:0
+#: field:farm.feed.event,create_uid:0
+#: field:farm.feed.inventory,create_uid:0
+#: field:farm.feed.provisional_inventory,create_uid:0
+#: field:farm.feed.stock.location,create_uid:0
+#: field:farm.foster.event,create_uid:0
+#: field:farm.foster.locations,create_uid:0
+#: field:farm.future_maders.locations,create_uid:0
+#: field:farm.insemination.event,create_uid:0
+#: field:farm.medication.event,create_uid:0
+#: field:farm.move.event,create_uid:0
+#: field:farm.pregnancy_diagnosis.event,create_uid:0
+#: field:farm.removal.event,create_uid:0
+#: field:farm.removal.reason,create_uid:0
+#: field:farm.removal.type,create_uid:0
+#: field:farm.semen_extraction.dose,create_uid:0
+#: field:farm.semen_extraction.event,create_uid:0
+#: field:farm.specie,create_uid:0
+#: field:farm.specie.breed,create_uid:0
+#: field:farm.specie.farm_line,create_uid:0
+#: field:farm.specie.ir.model,create_uid:0
+#: field:farm.tags,create_uid:0
+#: field:farm.transformation.event,create_uid:0
+#: field:farm.transit.locations,create_uid:0
+#: field:farm.weaning.event,create_uid:0
+#: field:farm.weaning.event_female_cycle,create_uid:0
+#: field:mrp.analitic.remain,create_uid:0
+#: field:purchase.analitic.remain,create_uid:0
+#: field:stock.location.silo_stock.location,create_uid:0
+#: field:stock.lot_farm.animal,create_uid:0
+#: field:stock.lot_farm.animal.group,create_uid:0
+msgid "Created by"
+msgstr ""
+
+#. module: farm
+#: field:farm.abort.event,create_date:0
+#: field:farm.animal,create_date:0
+#: field:farm.animal.female_cycle,create_date:0
+#: field:farm.animal.group,create_date:0
+#: field:farm.animal.group.weight,create_date:0
+#: field:farm.animal.weight,create_date:0
+#: field:farm.consume.stock,create_date:0
+#: field:farm.event.order,create_date:0
+#: field:farm.farrowing.event,create_date:0
+#: field:farm.farrowing.event_female_cycle,create_date:0
+#: field:farm.farrowing.event_group,create_date:0
+#: field:farm.farrowing.problem,create_date:0
+#: field:farm.feed.animal_location_date,create_date:0
+#: field:farm.feed.event,create_date:0
+#: field:farm.feed.inventory,create_date:0
+#: field:farm.feed.provisional_inventory,create_date:0
+#: field:farm.feed.stock.location,create_date:0
+#: field:farm.foster.event,create_date:0
+#: field:farm.foster.locations,create_date:0
+#: field:farm.future_maders.locations,create_date:0
+#: field:farm.insemination.event,create_date:0
+#: field:farm.medication.event,create_date:0
+#: field:farm.move.event,create_date:0
+#: field:farm.pregnancy_diagnosis.event,create_date:0
+#: field:farm.removal.event,create_date:0
+#: field:farm.removal.reason,create_date:0
+#: field:farm.removal.type,create_date:0
+#: field:farm.semen_extraction.dose,create_date:0
+#: field:farm.semen_extraction.event,create_date:0
+#: field:farm.specie,create_date:0
+#: field:farm.specie.breed,create_date:0
+#: field:farm.specie.farm_line,create_date:0
+#: field:farm.specie.ir.model,create_date:0
+#: field:farm.tags,create_date:0
+#: field:farm.transformation.event,create_date:0
+#: field:farm.transit.locations,create_date:0
+#: field:farm.weaning.event,create_date:0
+#: field:farm.weaning.event_female_cycle,create_date:0
+#: field:mrp.analitic.remain,create_date:0
+#: field:purchase.analitic.remain,create_date:0
+#: field:stock.location.silo_stock.location,create_date:0
+#: field:stock.lot_farm.animal,create_date:0
+#: field:stock.lot_farm.animal.group,create_date:0
+msgid "Created on"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,current_cycle:0
+msgid "Current Cycle"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,farm:0
+#: field:farm.animal.group,farm:0
+msgid "Current Farm"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,location:0
+msgid "Current Location"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,current_weight:0
+msgid "Current Weight"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.group,location:0
+msgid "Current location"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.group,current_weight:0
+msgid "Current weight"
+msgstr ""
+
+#. module: farm
+#: field:res.users,customer_payment_mode:0
+msgid "Customer Payment Mode"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,cycles:0
+msgid "Cycles)"
+msgstr ""
+
+#. module: farm
+#: field:farm.consume.stock,date:0
+#: field:farm.feed.animal_location_date,date:0
+#: field:mrp.analitic.remain,date:0
+msgid "Date"
+msgstr ""
+
+#. module: farm
+#: field:farm.abort.event,timestamp:0
+#: field:farm.animal.weight,timestamp:0
+#: field:farm.event,timestamp:0
+#: field:farm.event.feed_mixin,timestamp:0
+#: field:farm.event.import.mixin,timestamp:0
+#: field:farm.event.order,timestamp:0
+#: field:farm.farrowing.event,timestamp:0
+#: field:farm.feed.event,timestamp:0
+#: field:farm.feed.inventory,timestamp:0
+#: field:farm.feed.inventory.mixin,timestamp:0
+#: field:farm.feed.provisional_inventory,timestamp:0
+#: field:farm.foster.event,timestamp:0
+#: field:farm.insemination.event,timestamp:0
+#: field:farm.medication.event,timestamp:0
+#: field:farm.move.event,timestamp:0
+#: field:farm.pregnancy_diagnosis.event,timestamp:0
+#: field:farm.removal.event,timestamp:0
+#: field:farm.semen_extraction.event,timestamp:0
+#: field:farm.transformation.event,timestamp:0
+#: field:farm.weaning.event,timestamp:0
+msgid "Date & Time"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.group.weight,timestamp:0
+msgid "Date & time"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.female_cycle,ordination_date:0
+msgid "Date for ordination"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.group,transition_days:0
+msgid "Days in Transition"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.group,fattening_days:0
+msgid "Days in fatening"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.female_cycle,dead:0
+#: field:farm.farrowing.event,dead:0
+msgid "Dead"
+msgstr ""
+
+#. module: farm
+#: field:res.users,property_delivery_carrier:0
+msgid "Delivery Method"
+msgstr ""
+
+#. module: farm
+#: field:farm.move.event,to_location:0
+#: field:farm.transformation.event,to_location:0
+msgid "Destination"
+msgstr ""
+
+#. module: farm
+#: field:farm.transformation.event,to_animal:0
+msgid "Destination Animal"
+msgstr ""
+
+#. module: farm
+#: field:farm.transformation.event,to_animal_group:0
+msgid "Destination Group"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/transformation_event.py:56
+#, python-format
+msgid "Destination animal type no compatible"
+msgstr ""
+
+#. module: farm
+#: view:farm.consume.stock:farm.farm_consume_stock_search_view
+#: field:farm.consume.stock,to_location:0
+msgid "Destinity"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.female_cycle,diagnosis_events:0
+msgid "Diagnosis"
+msgstr ""
+
+#. module: farm
+#: field:farm.abort.event,display_name:0
+#: field:farm.animal,display_name:0
+#: field:farm.animal.female_cycle,display_name:0
+#: field:farm.animal.group,display_name:0
+#: field:farm.animal.group.weight,display_name:0
+#: field:farm.animal.weight,display_name:0
+#: field:farm.consume.stock,display_name:0
+#: field:farm.event,display_name:0
+#: field:farm.event.feed_mixin,display_name:0
+#: field:farm.event.import.mixin,display_name:0
+#: field:farm.event.order,display_name:0
+#: field:farm.farrowing.event,display_name:0
+#: field:farm.farrowing.event_female_cycle,display_name:0
+#: field:farm.farrowing.event_group,display_name:0
+#: field:farm.farrowing.problem,display_name:0
+#: field:farm.feed.animal_location_date,display_name:0
+#: field:farm.feed.event,display_name:0
+#: field:farm.feed.inventory,display_name:0
+#: field:farm.feed.inventory.mixin,display_name:0
+#: field:farm.feed.provisional_inventory,display_name:0
+#: field:farm.feed.stock.location,display_name:0
+#: field:farm.foster.event,display_name:0
+#: field:farm.foster.locations,display_name:0
+#: field:farm.future_maders.locations,display_name:0
+#: field:farm.insemination.event,display_name:0
+#: field:farm.medication.event,display_name:0
+#: field:farm.move.event,display_name:0
+#: field:farm.pregnancy_diagnosis.event,display_name:0
+#: field:farm.removal.event,display_name:0
+#: field:farm.removal.reason,display_name:0
+#: field:farm.removal.type,display_name:0
+#: field:farm.semen_extraction.dose,display_name:0
+#: field:farm.semen_extraction.event,display_name:0
+#: field:farm.specie,display_name:0
+#: field:farm.specie.breed,display_name:0
+#: field:farm.specie.farm_line,display_name:0
+#: field:farm.specie.ir.model,display_name:0
+#: field:farm.tags,display_name:0
+#: field:farm.transformation.event,display_name:0
+#: field:farm.transit.locations,display_name:0
+#: field:farm.weaning.event,display_name:0
+#: field:farm.weaning.event_female_cycle,display_name:0
+#: field:mrp.analitic.remain,display_name:0
+#: field:purchase.analitic.remain,display_name:0
+#: field:stock.location.silo_stock.location,display_name:0
+#: field:stock.lot_farm.animal,display_name:0
+#: field:stock.lot_farm.animal.group,display_name:0
+msgid "Display Name"
+msgstr ""
+
+#. module: farm
+#: field:farm.consume.stock,type:0
+msgid "Distribution Type"
+msgstr ""
+
+#. module: farm
+#: field:farm.insemination.event,dose_bom:0
+#: view:farm.semen_extraction.dose:farm.view_dose_form
+#: view:farm.semen_extraction.dose:farm.view_dose_tree
+msgid "Dose"
+msgstr ""
+
+#. module: farm
+#: field:farm.semen_extraction.event,dose_bom:0
+msgid "Dose Container"
+msgstr ""
+
+#. module: farm
+#: field:farm.semen_extraction.dose,dose_product:0
+msgid "Dose Product"
+msgstr ""
+
+#. module: farm
+#: field:farm.semen_extraction.event,doses_semen_qty:0
+msgid "Dose Semen Qty"
+msgstr ""
+
+#. module: farm
+#: field:mrp.bom,specie:0
+msgid "Dose Specie"
+msgstr ""
+
+#. module: farm
+#: field:farm.insemination.event,dose_lot:0
+msgid "Dose lot"
+msgstr ""
+
+#. module: farm
+#: field:farm.insemination.event,dose_product:0
+msgid "Dose product"
+msgstr ""
+
+#. module: farm
+#: field:farm.semen_extraction.event,doses:0
+msgid "Doses"
+msgstr ""
+
+#. module: farm
+#: field:farm.semen_extraction.event,dose_location:0
+msgid "Doses Location"
+msgstr ""
+
+#. module: farm
+#: selection:farm.abort.event,state:0
+#: selection:farm.consume.stock,state:0
+#: selection:farm.event,state:0
+#: selection:farm.event.feed_mixin,state:0
+#: selection:farm.event.import.mixin,state:0
+#: selection:farm.event.order,state:0
+#: selection:farm.farrowing.event,state:0
+#: selection:farm.feed.event,state:0
+#: selection:farm.feed.inventory,state:0
+#: selection:farm.feed.inventory.mixin,state:0
+#: selection:farm.feed.provisional_inventory,state:0
+#: selection:farm.foster.event,state:0
+#: selection:farm.insemination.event,state:0
+#: selection:farm.medication.event,state:0
+#: selection:farm.move.event,state:0
+#: selection:farm.pregnancy_diagnosis.event,state:0
+#: selection:farm.removal.event,state:0
+#: selection:farm.semen_extraction.dose,state:0
+#: selection:farm.semen_extraction.event,state:0
+#: selection:farm.transformation.event,state:0
+#: selection:farm.weaning.event,state:0
+msgid "Draft"
+msgstr ""
+
+#. module: farm
+#: field:farm.abort.event,employee:0
+#: field:farm.event,employee:0
+#: field:farm.event.feed_mixin,employee:0
+#: field:farm.event.import.mixin,employee:0
+#: field:farm.event.order,employee:0
+#: field:farm.farrowing.event,employee:0
+#: field:farm.feed.event,employee:0
+#: field:farm.foster.event,employee:0
+#: field:farm.insemination.event,employee:0
+#: field:farm.medication.event,employee:0
+#: field:farm.move.event,employee:0
+#: field:farm.pregnancy_diagnosis.event,employee:0
+#: field:farm.removal.event,employee:0
+#: field:farm.semen_extraction.event,employee:0
+#: field:farm.transformation.event,employee:0
+#: field:farm.weaning.event,employee:0
+msgid "Employee"
+msgstr ""
+
+#. module: farm
+#: help:farm.abort.event,employee:0
+#: help:farm.event,employee:0
+#: help:farm.event.feed_mixin,employee:0
+#: help:farm.event.import.mixin,employee:0
+#: help:farm.event.order,employee:0
+#: help:farm.farrowing.event,employee:0
+#: help:farm.feed.event,employee:0
+#: help:farm.foster.event,employee:0
+#: help:farm.insemination.event,employee:0
+#: help:farm.medication.event,employee:0
+#: help:farm.move.event,employee:0
+#: help:farm.pregnancy_diagnosis.event,employee:0
+#: help:farm.removal.event,employee:0
+#: help:farm.semen_extraction.event,employee:0
+#: help:farm.transformation.event,employee:0
+#: help:farm.weaning.event,employee:0
+msgid "Employee that did the job."
+msgstr ""
+
+#. module: farm
+#: field:farm.event.feed_mixin,end_date:0
+#: field:farm.feed.event,end_date:0
+#: field:farm.medication.event,end_date:0
+msgid "End Date"
+msgstr ""
+
+#. module: farm
+#: help:farm.event.feed_mixin,end_date:0
+#: help:farm.feed.event,end_date:0
+#: help:farm.medication.event,end_date:0
+msgid "End date of the period in which the givenquantity of product was consumed. It is the dateof event's timestamp."
+msgstr ""
+
+#. module: farm
+#: view:farm.consume.stock:farm.view_consume_stock_tree
+#: view:farm.event:farm.view_abstract_event_form
+#: view:farm.event:farm.view_abstract_event_tree
+#: view:farm.move.event:farm.view_move_event_form
+#: view:farm.move.event:farm.view_move_event_tree
+#: field:farm.semen_extraction.dose,event:0
+msgid "Event"
+msgstr ""
+
+#. module: farm
+#: field:farm.event.order,event_type:0
+msgid "Event Type"
+msgstr ""
+
+#. module: farm
+#: view:farm.event.order:farm.view_event_order_tree
+msgid "Event order"
+msgstr ""
+
+#. module: farm
+#: model:ir.actions.act_window,name:farm.farm_event_order_view
+msgid "EventOrder"
+msgstr ""
+
+#. module: farm
+#: model:ir.ui.menu,name:farm.menu_farm_events
+msgid "Events"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie.farm_line,event_order_sequence:0
+msgid "Events Orders' Sequence"
+msgstr ""
+
+#. module: farm
+#: field:stock.warehouse,external:0
+msgid "External"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie.farm_line,semen_lot_sequence:0
+msgid "Extracted Semen Lots' Sequence"
+msgstr ""
+
+#. module: farm
+#: model:ir.actions.act_window,name:farm.farm_semen_extraction_view
+msgid "Extraction Event"
+msgstr ""
+
+#. module: farm
+#: field:stock.location,factory:0
+msgid "Factory"
+msgstr ""
+
+#. module: farm
+#: field:account.invoice.line,farm:0
+#: field:farm.abort.event,farm:0
+#: view:farm.animal:farm.animal_search_view
+#: view:farm.animal.group:farm.animal_group_search_view
+#: selection:farm.consume.stock,type:0
+#: field:farm.event,farm:0
+#: field:farm.event.feed_mixin,farm:0
+#: field:farm.event.import.mixin,farm:0
+#: field:farm.event.order,farm:0
+#: field:farm.farrowing.event,farm:0
+#: view:farm.feed.event:farm.feed_event_search_view
+#: field:farm.feed.event,farm:0
+#: field:farm.foster.event,farm:0
+#: field:farm.insemination.event,farm:0
+#: field:farm.medication.event,farm:0
+#: field:farm.move.event,farm:0
+#: field:farm.pregnancy_diagnosis.event,farm:0
+#: field:farm.removal.event,farm:0
+#: field:farm.semen_extraction.event,farm:0
+#: field:farm.specie.farm_line,farm:0
+#: field:farm.transformation.event,farm:0
+#: field:farm.weaning.event,farm:0
+#: model:ir.module.category,name:farm.module_category_farm
+#: model:ir.ui.menu,name:farm.menu_farm
+#: view:product.template:farm.product_template_form_farm_view
+#: field:purchase.analitic.remain,farm:0
+#: view:purchase.order.line:farm.farm_purchase_line_search_view
+#: field:purchase.order.line,farm:0
+msgid "Farm"
+msgstr ""
+
+#. module: farm
+#: view:farm.specie.farm_line:farm.view_farm_line_form
+#: view:farm.specie.farm_line:farm.view_farm_line_tree
+#: model:ir.ui.menu,name:farm.menu_farm_configuration_farm_line
+msgid "Farm Line"
+msgstr ""
+
+#. module: farm
+#: model:ir.actions.act_window,name:farm.farm_purchase_line
+msgid "Farm Purchase Line"
+msgstr ""
+
+#. module: farm
+#: field:stock.location,farm_yard:0
+msgid "Farm Yard"
+msgstr ""
+
+#. module: farm
+#: model:ir.actions.act_window,name:farm.farm_farm_line_view
+msgid "FarmLine"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie,farm_lines:0
+msgid "Farms"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.female_cycle,farrowing_event:0
+msgid "Farrowing"
+msgstr ""
+
+#. module: farm
+#: view:farm.farrowing.event:farm.view_farrowing_event_form
+#: field:farm.farrowing.event_female_cycle,event:0
+#: field:farm.farrowing.event_group,event:0
+msgid "Farrowing Event"
+msgstr ""
+
+#. module: farm
+#: view:farm.farrowing.event_female_cycle:farm.view_farrowing_event_female_cycle_form
+msgid "Farrowing Event - Female Cycle"
+msgstr ""
+
+#. module: farm
+#: field:farm.foster.event,farrowing_group:0
+#: field:farm.weaning.event,farrowing_group:0
+msgid "Farrowing Group"
+msgstr ""
+
+#. module: farm
+#: field:product.template,farrowing_price:0
+msgid "Farrowing Price"
+msgstr ""
+
+#. module: farm
+#: selection:farm.event.order,event_type:0
+#: field:farm.event.order,farrowing_events:0
+msgid "Farrowings"
+msgstr ""
+
+#. module: farm
+#: selection:farm.animal.group,state:0
+msgid "Faten up"
+msgstr ""
+
+#. module: farm
+#: field:farm.event.feed_mixin,feed_product:0
+#: selection:farm.event.order,event_type:0
+#: field:farm.feed.event,feed_product:0
+#: field:farm.medication.event,feed_product:0
+msgid "Feed"
+msgstr ""
+
+#. module: farm
+#: view:farm.feed.event:farm.view_feed_event_form
+msgid "Feed Event"
+msgstr ""
+
+#. module: farm
+#: field:farm.feed.inventory,feed_events:0
+#: field:farm.feed.inventory.mixin,feed_events:0
+#: field:farm.feed.provisional_inventory,feed_events:0
+msgid "Feed Events"
+msgstr ""
+
+#. module: farm
+#: field:farm.event.feed_mixin,feed_lot:0
+#: field:farm.feed.event,feed_lot:0
+#: field:farm.medication.event,feed_lot:0
+msgid "Feed Lot"
+msgstr ""
+
+#. module: farm
+#: field:farm.event.feed_mixin,feed_location:0
+#: field:farm.feed.event,feed_location:0
+#: field:farm.medication.event,feed_location:0
+msgid "Feed Source"
+msgstr ""
+
+#. module: farm
+#: field:farm.medication.event,feed_product_uom_category:0
+msgid "Feed Uom Category"
+msgstr ""
+
+#. module: farm
+#: view:farm.feed.event:farm.farm_feed_event_graph_view
+msgid "Feed diagram"
+msgstr ""
+
+#. module: farm
+#: view:farm.animal:farm.view_animal_form
+#: view:farm.animal.group:farm.view_animal_group
+#: model:ir.actions.act_window,name:farm.animal_group2_open_feed_events
+#: model:ir.actions.act_window,name:farm.animal_open_feed_events
+msgid "Feed events"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie,feed_lost_found_location:0
+msgid "Feed transit"
+msgstr ""
+
+#. module: farm
+#: selection:farm.abort.event,animal_type:0
+#: selection:farm.animal,sex:0
+#: selection:farm.animal,type:0
+#: field:farm.animal.female_cycle,animal:0
+#: selection:farm.event,animal_type:0
+#: selection:farm.event.feed_mixin,animal_type:0
+#: selection:farm.event.import.mixin,animal_type:0
+#: selection:farm.event.order,animal_type:0
+#: selection:farm.farrowing.event,animal_type:0
+#: selection:farm.feed.animal_location_date,animal_type:0
+#: selection:farm.feed.event,animal_type:0
+#: selection:farm.foster.event,animal_type:0
+#: selection:farm.insemination.event,animal_type:0
+#: selection:farm.medication.event,animal_type:0
+#: selection:farm.move.event,animal_type:0
+#: selection:farm.pregnancy_diagnosis.event,animal_type:0
+#: selection:farm.removal.event,animal_type:0
+#: selection:farm.semen_extraction.event,animal_type:0
+#: selection:farm.transformation.event,animal_type:0
+#: selection:farm.transformation.event,to_animal_type:0
+#: selection:farm.weaning.event,animal_type:0
+#: selection:stock.production.lot,animal_type:0
+msgid "Female"
+msgstr ""
+
+#. module: farm
+#: field:farm.weaning.event,female_cycle:0
+msgid "Female Cicle"
+msgstr ""
+
+#. module: farm
+#: field:farm.abort.event,female_cycle:0
+#: view:farm.animal.female_cycle:farm.view_cycle_form
+#: view:farm.animal.female_cycle:farm.view_cycle_tree
+#: field:farm.farrowing.event,female_cycle:0
+#: field:farm.farrowing.event_female_cycle,cycle:0
+#: field:farm.foster.event,female_cycle:0
+#: field:farm.foster.event,move:0
+#: field:farm.foster.event,pair_event:0
+#: field:farm.pregnancy_diagnosis.event,female_cycle:0
+#: field:farm.weaning.event_female_cycle,cycle:0
+msgid "Female Cycle"
+msgstr ""
+
+#. module: farm
+#: field:farm.weaning.event,female_to_location:0
+msgid "Female Destination"
+msgstr ""
+
+#. module: farm
+#: field:farm.weaning.event,female_move:0
+msgid "Female Stock Move"
+msgstr ""
+
+#. module: farm
+#: field:farm.insemination.event,female_cycle:0
+msgid "Female cycle"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie,female_product:0
+msgid "Female's Product"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie.farm_line,has_female:0
+msgid "Females"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie,female_enabled:0
+msgid "Females Enabled"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie.farm_line,female_sequence:0
+msgid "Females' Sequence"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/purchse_analytics.py:102
+#, python-format
+msgid "Final date after current date"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,first_mating:0
+msgid "First Mating"
+msgstr ""
+
+#. module: farm
+#: field:farm.semen_extraction.event,formula_result:0
+msgid "Formula Result"
+msgstr ""
+
+#. module: farm
+#: view:farm.foster.locations:farm.view_foster_location_form
+#: view:farm.future_maders.locations:farm.view_future_location_form
+#: view:farm.transit.locations:farm.view_transit_location_form
+msgid "Foste Location"
+msgstr ""
+
+#. module: farm
+#: view:farm.foster.event:farm.view_foster_event_form
+msgid "Foster Event"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie,foster_location:0
+msgid "Foster Location"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.female_cycle,fostered:0
+msgid "Fostered"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.female_cycle,foster_events:0
+#: selection:farm.event.order,event_type:0
+#: field:farm.event.order,foster_events:0
+#: field:farm.foster.event,quantity:0
+msgid "Fosters"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie,future_maders_location:0
+msgid "Future maders location"
+msgstr ""
+
+#. module: farm
+#: field:purchase.order.line,general_expense:0
+msgid "General Expense"
+msgstr ""
+
+#. module: farm
+#: model:ir.ui.menu,name:farm.menu_farm_purchase_line
+msgid "General expenses"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/purchse_analytics.py:84
+#, python-format
+msgid "General expenses can't mixin with other purchases"
+msgstr ""
+
+#. module: farm
+#: help:farm.animal,removal_date:0
+msgid "Get information from the corresponding removal event."
+msgstr ""
+
+#. module: farm
+#: field:farm.abort.event,animal_group:0
+#: selection:farm.abort.event,animal_type:0
+#: field:farm.animal.group.weight,party:0
+#: field:farm.event,animal_group:0
+#: selection:farm.event,animal_type:0
+#: field:farm.event.feed_mixin,animal_group:0
+#: selection:farm.event.feed_mixin,animal_type:0
+#: field:farm.event.import.mixin,animal_group:0
+#: selection:farm.event.import.mixin,animal_type:0
+#: selection:farm.event.order,animal_type:0
+#: field:farm.farrowing.event,animal_group:0
+#: selection:farm.farrowing.event,animal_type:0
+#: field:farm.farrowing.event_group,animal_group:0
+#: field:farm.feed.animal_location_date,animal_group:0
+#: selection:farm.feed.animal_location_date,animal_type:0
+#: field:farm.feed.event,animal_group:0
+#: selection:farm.feed.event,animal_type:0
+#: field:farm.foster.event,animal_group:0
+#: selection:farm.foster.event,animal_type:0
+#: field:farm.insemination.event,animal_group:0
+#: selection:farm.insemination.event,animal_type:0
+#: field:farm.medication.event,animal_group:0
+#: selection:farm.medication.event,animal_type:0
+#: field:farm.move.event,animal_group:0
+#: selection:farm.move.event,animal_type:0
+#: field:farm.pregnancy_diagnosis.event,animal_group:0
+#: selection:farm.pregnancy_diagnosis.event,animal_type:0
+#: field:farm.removal.event,animal_group:0
+#: selection:farm.removal.event,animal_type:0
+#: field:farm.semen_extraction.event,animal_group:0
+#: selection:farm.semen_extraction.event,animal_type:0
+#: field:farm.transformation.event,animal_group:0
+#: selection:farm.transformation.event,animal_type:0
+#: selection:farm.transformation.event,to_animal_type:0
+#: field:farm.weaning.event,animal_group:0
+#: selection:farm.weaning.event,animal_type:0
+#: field:stock.production.lot,animal_group:0
+#: selection:stock.production.lot,animal_type:0
+msgid "Group"
+msgstr ""
+
+#. module: farm
+#: selection:farm.move.event,weight_record:0
+msgid "Group Weight"
+msgstr ""
+
+#. module: farm
+#: view:farm.animal:farm.animal_search_view
+#: view:farm.animal.group:farm.animal_group_search_view
+#: view:farm.consume.stock:farm.farm_consume_stock_search_view
+#: view:farm.feed.event:farm.feed_event_search_view
+#: view:purchase.order.line:farm.farm_purchase_line_search_view
+msgid "Group by..."
+msgstr ""
+
+#. module: farm
+#: help:farm.weaning.event,weared_group:0
+msgid "Group in which weaned animals shouldbe added to. If left blank they will keepthe same group."
+msgstr ""
+
+#. module: farm
+#: field:farm.specie,group_product:0
+msgid "Group's Product"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie.farm_line,has_group:0
+#: field:farm.tags,animal_group:0
+msgid "Groups"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie,group_enabled:0
+msgid "Groups Enabled"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie.farm_line,group_sequence:0
+msgid "Groups' Sequence"
+msgstr ""
+
+#. module: farm
+#: model:ir.module.category,description:farm.module_category_farm
+msgid "Helps you manage your farms"
+msgstr ""
+
+#. module: farm
+#: field:farm.abort.event,id:0
+#: field:farm.animal,id:0
+#: field:farm.animal.female_cycle,id:0
+#: field:farm.animal.group,id:0
+#: field:farm.animal.group.weight,id:0
+#: field:farm.animal.weight,id:0
+#: field:farm.consume.stock,id:0
+#: field:farm.event,id:0
+#: field:farm.event.feed_mixin,id:0
+#: field:farm.event.import.mixin,id:0
+#: field:farm.event.order,id:0
+#: field:farm.farrowing.event,id:0
+#: field:farm.farrowing.event_female_cycle,id:0
+#: field:farm.farrowing.event_group,id:0
+#: field:farm.farrowing.problem,id:0
+#: field:farm.feed.animal_location_date,id:0
+#: field:farm.feed.event,id:0
+#: field:farm.feed.inventory,id:0
+#: field:farm.feed.inventory.mixin,id:0
+#: field:farm.feed.provisional_inventory,id:0
+#: field:farm.feed.stock.location,id:0
+#: field:farm.foster.event,id:0
+#: field:farm.foster.locations,id:0
+#: field:farm.future_maders.locations,id:0
+#: field:farm.insemination.event,id:0
+#: field:farm.medication.event,id:0
+#: field:farm.move.event,id:0
+#: field:farm.pregnancy_diagnosis.event,id:0
+#: field:farm.removal.event,id:0
+#: field:farm.removal.reason,id:0
+#: field:farm.removal.type,id:0
+#: field:farm.semen_extraction.dose,id:0
+#: field:farm.semen_extraction.event,id:0
+#: field:farm.specie,id:0
+#: field:farm.specie.breed,id:0
+#: field:farm.specie.farm_line,id:0
+#: field:farm.specie.ir.model,id:0
+#: field:farm.tags,id:0
+#: field:farm.transformation.event,id:0
+#: field:farm.transit.locations,id:0
+#: field:farm.weaning.event,id:0
+#: field:farm.weaning.event_female_cycle,id:0
+#: field:mrp.analitic.remain,id:0
+#: field:purchase.analitic.remain,id:0
+#: field:stock.location.silo_stock.location,id:0
+#: field:stock.lot_farm.animal,id:0
+#: field:stock.lot_farm.animal.group,id:0
+msgid "ID"
+msgstr ""
+
+#. module: farm
+#: help:farm.foster.event,quantity:0
+msgid "If this quantity is negative it isa Foster Out."
+msgstr ""
+
+#. module: farm
+#: field:farm.abort.event,imported:0
+#: field:farm.event.import.mixin,imported:0
+#: field:farm.farrowing.event,imported:0
+#: field:farm.foster.event,imported:0
+#: field:farm.insemination.event,imported:0
+#: field:farm.weaning.event,imported:0
+msgid "Imported"
+msgstr ""
+
+#. module: farm
+#: model:ir.actions.server,name:farm.impute_analitics_action
+msgid "Impute analitics"
+msgstr ""
+
+#. module: farm
+#: selection:farm.consume.stock,state:0
+msgid "In progress"
+msgstr ""
+
+#. module: farm
+#: help:farm.specie.farm_line,has_female:0
+msgid "In this farm there are females."
+msgstr ""
+
+#. module: farm
+#: help:farm.specie.farm_line,has_group:0
+msgid "In this farm there are groups."
+msgstr ""
+
+#. module: farm
+#: help:farm.specie.farm_line,has_individual:0
+msgid "In this farm there are individuals."
+msgstr ""
+
+#. module: farm
+#: help:farm.specie.farm_line,has_male:0
+msgid "In this farm there are males."
+msgstr ""
+
+#. module: farm
+#: help:stock.location,silo:0
+msgid "Indicates that the location is a silo."
+msgstr ""
+
+#. module: farm
+#: help:stock.location,locations_to_fed:0
+msgid "Indicates the locations the silo feeds. Note that this will only be a default value."
+msgstr ""
+
+#. module: farm
+#: help:farm.animal,location:0
+msgid "Indicates where the animal currently resides."
+msgstr ""
+
+#. module: farm
+#: selection:farm.abort.event,animal_type:0
+#: selection:farm.animal,type:0
+#: selection:farm.event,animal_type:0
+#: selection:farm.event.feed_mixin,animal_type:0
+#: selection:farm.event.import.mixin,animal_type:0
+#: selection:farm.event.order,animal_type:0
+#: selection:farm.farrowing.event,animal_type:0
+#: selection:farm.feed.animal_location_date,animal_type:0
+#: selection:farm.feed.event,animal_type:0
+#: selection:farm.foster.event,animal_type:0
+#: selection:farm.insemination.event,animal_type:0
+#: selection:farm.medication.event,animal_type:0
+#: selection:farm.move.event,animal_type:0
+#: selection:farm.pregnancy_diagnosis.event,animal_type:0
+#: selection:farm.removal.event,animal_type:0
+#: selection:farm.semen_extraction.event,animal_type:0
+#: selection:farm.transformation.event,animal_type:0
+#: selection:farm.transformation.event,to_animal_type:0
+#: selection:farm.weaning.event,animal_type:0
+#: selection:stock.production.lot,animal_type:0
+msgid "Individual"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie,individual_product:0
+msgid "Individual's Product"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie.farm_line,has_individual:0
+msgid "Individuals"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie,individual_enabled:0
+msgid "Individuals Enabled"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie.farm_line,individual_sequence:0
+msgid "Individuals' Sequence"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,initial_location:0
+msgid "Initial Location"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.group,initial_location:0
+msgid "Initial location"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.group,initial_quantity:0
+msgid "Initial quantity"
+msgstr ""
+
+#. module: farm
+#: field:purchase.order.line,imputed:0
+msgid "Inputed"
+msgstr ""
+
+#. module: farm
+#: field:farm.event.order,insemination_events:0
+msgid "Insemination"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,days_from_insemination:0
+msgid "Insemination Days"
+msgstr ""
+
+#. module: farm
+#: view:farm.insemination.event:farm.view_insemination_event_form
+msgid "Insemination Event"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.female_cycle,insemination_events:0
+#: selection:farm.event.order,event_type:0
+msgid "Inseminations"
+msgstr ""
+
+#. module: farm
+#: field:farm.feed.event,feed_inventory:0
+#: field:farm.feed.provisional_inventory,inventory:0
+#: field:farm.feed.stock.location,inventory:0
+#: model:ir.model,name:farm.model_stock_inventory
+msgid "Inventory"
+msgstr ""
+
+#. module: farm
+#: model:ir.model,name:farm.model_stock_inventory_line
+msgid "Inventory Line"
+msgstr ""
+
+#. module: farm
+#: model:ir.model,name:farm.model_stock_location
+msgid "Inventory Locations"
+msgstr ""
+
+#. module: farm
+#: field:farm.feed.animal_location_date,inventory_qty:0
+msgid "Inventoryes"
+msgstr ""
+
+#. module: farm
+#: model:ir.model,name:farm.model_account_invoice
+msgid "Invoice"
+msgstr ""
+
+#. module: farm
+#: model:ir.model,name:farm.model_account_invoice_line
+msgid "Invoice Line"
+msgstr ""
+
+#. module: farm
+#: selection:farm.animal.female_cycle,state:0
+#: selection:farm.animal.group,state:0
+msgid "Lactating"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.female_cycle,days_between_farrowing_weaning:0
+msgid "Lactating Days"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,last_extraction:0
+msgid "Last Extraction"
+msgstr ""
+
+#. module: farm
+#: field:farm.abort.event,__last_update:0
+#: field:farm.animal,__last_update:0
+#: field:farm.animal.female_cycle,__last_update:0
+#: field:farm.animal.group,__last_update:0
+#: field:farm.animal.group.weight,__last_update:0
+#: field:farm.animal.weight,__last_update:0
+#: field:farm.consume.stock,__last_update:0
+#: field:farm.event,__last_update:0
+#: field:farm.event.feed_mixin,__last_update:0
+#: field:farm.event.import.mixin,__last_update:0
+#: field:farm.event.order,__last_update:0
+#: field:farm.farrowing.event,__last_update:0
+#: field:farm.farrowing.event_female_cycle,__last_update:0
+#: field:farm.farrowing.event_group,__last_update:0
+#: field:farm.farrowing.problem,__last_update:0
+#: field:farm.feed.animal_location_date,__last_update:0
+#: field:farm.feed.event,__last_update:0
+#: field:farm.feed.inventory,__last_update:0
+#: field:farm.feed.inventory.mixin,__last_update:0
+#: field:farm.feed.provisional_inventory,__last_update:0
+#: field:farm.feed.stock.location,__last_update:0
+#: field:farm.foster.event,__last_update:0
+#: field:farm.foster.locations,__last_update:0
+#: field:farm.future_maders.locations,__last_update:0
+#: field:farm.insemination.event,__last_update:0
+#: field:farm.medication.event,__last_update:0
+#: field:farm.move.event,__last_update:0
+#: field:farm.pregnancy_diagnosis.event,__last_update:0
+#: field:farm.removal.event,__last_update:0
+#: field:farm.removal.reason,__last_update:0
+#: field:farm.removal.type,__last_update:0
+#: field:farm.semen_extraction.dose,__last_update:0
+#: field:farm.semen_extraction.event,__last_update:0
+#: field:farm.specie,__last_update:0
+#: field:farm.specie.breed,__last_update:0
+#: field:farm.specie.farm_line,__last_update:0
+#: field:farm.specie.ir.model,__last_update:0
+#: field:farm.tags,__last_update:0
+#: field:farm.transformation.event,__last_update:0
+#: field:farm.transit.locations,__last_update:0
+#: field:farm.weaning.event,__last_update:0
+#: field:farm.weaning.event_female_cycle,__last_update:0
+#: field:mrp.analitic.remain,__last_update:0
+#: field:purchase.analitic.remain,__last_update:0
+#: field:stock.location.silo_stock.location,__last_update:0
+#: field:stock.lot_farm.animal,__last_update:0
+#: field:stock.lot_farm.animal.group,__last_update:0
+msgid "Last Modified on"
+msgstr ""
+
+#. module: farm
+#: field:farm.abort.event,write_uid:0
+#: field:farm.animal,write_uid:0
+#: field:farm.animal.female_cycle,write_uid:0
+#: field:farm.animal.group,write_uid:0
+#: field:farm.animal.group.weight,write_uid:0
+#: field:farm.animal.weight,write_uid:0
+#: field:farm.consume.stock,write_uid:0
+#: field:farm.event.order,write_uid:0
+#: field:farm.farrowing.event,write_uid:0
+#: field:farm.farrowing.event_female_cycle,write_uid:0
+#: field:farm.farrowing.event_group,write_uid:0
+#: field:farm.farrowing.problem,write_uid:0
+#: field:farm.feed.animal_location_date,write_uid:0
+#: field:farm.feed.event,write_uid:0
+#: field:farm.feed.inventory,write_uid:0
+#: field:farm.feed.provisional_inventory,write_uid:0
+#: field:farm.feed.stock.location,write_uid:0
+#: field:farm.foster.event,write_uid:0
+#: field:farm.foster.locations,write_uid:0
+#: field:farm.future_maders.locations,write_uid:0
+#: field:farm.insemination.event,write_uid:0
+#: field:farm.medication.event,write_uid:0
+#: field:farm.move.event,write_uid:0
+#: field:farm.pregnancy_diagnosis.event,write_uid:0
+#: field:farm.removal.event,write_uid:0
+#: field:farm.removal.reason,write_uid:0
+#: field:farm.removal.type,write_uid:0
+#: field:farm.semen_extraction.dose,write_uid:0
+#: field:farm.semen_extraction.event,write_uid:0
+#: field:farm.specie,write_uid:0
+#: field:farm.specie.breed,write_uid:0
+#: field:farm.specie.farm_line,write_uid:0
+#: field:farm.specie.ir.model,write_uid:0
+#: field:farm.tags,write_uid:0
+#: field:farm.transformation.event,write_uid:0
+#: field:farm.transit.locations,write_uid:0
+#: field:farm.weaning.event,write_uid:0
+#: field:farm.weaning.event_female_cycle,write_uid:0
+#: field:mrp.analitic.remain,write_uid:0
+#: field:purchase.analitic.remain,write_uid:0
+#: field:stock.location.silo_stock.location,write_uid:0
+#: field:stock.lot_farm.animal,write_uid:0
+#: field:stock.lot_farm.animal.group,write_uid:0
+msgid "Last Updated by"
+msgstr ""
+
+#. module: farm
+#: field:farm.abort.event,write_date:0
+#: field:farm.animal,write_date:0
+#: field:farm.animal.female_cycle,write_date:0
+#: field:farm.animal.group,write_date:0
+#: field:farm.animal.group.weight,write_date:0
+#: field:farm.animal.weight,write_date:0
+#: field:farm.consume.stock,write_date:0
+#: field:farm.event.order,write_date:0
+#: field:farm.farrowing.event,write_date:0
+#: field:farm.farrowing.event_female_cycle,write_date:0
+#: field:farm.farrowing.event_group,write_date:0
+#: field:farm.farrowing.problem,write_date:0
+#: field:farm.feed.animal_location_date,write_date:0
+#: field:farm.feed.event,write_date:0
+#: field:farm.feed.inventory,write_date:0
+#: field:farm.feed.provisional_inventory,write_date:0
+#: field:farm.feed.stock.location,write_date:0
+#: field:farm.foster.event,write_date:0
+#: field:farm.foster.locations,write_date:0
+#: field:farm.future_maders.locations,write_date:0
+#: field:farm.insemination.event,write_date:0
+#: field:farm.medication.event,write_date:0
+#: field:farm.move.event,write_date:0
+#: field:farm.pregnancy_diagnosis.event,write_date:0
+#: field:farm.removal.event,write_date:0
+#: field:farm.removal.reason,write_date:0
+#: field:farm.removal.type,write_date:0
+#: field:farm.semen_extraction.dose,write_date:0
+#: field:farm.semen_extraction.event,write_date:0
+#: field:farm.specie,write_date:0
+#: field:farm.specie.breed,write_date:0
+#: field:farm.specie.farm_line,write_date:0
+#: field:farm.specie.ir.model,write_date:0
+#: field:farm.tags,write_date:0
+#: field:farm.transformation.event,write_date:0
+#: field:farm.transit.locations,write_date:0
+#: field:farm.weaning.event,write_date:0
+#: field:farm.weaning.event_female_cycle,write_date:0
+#: field:mrp.analitic.remain,write_date:0
+#: field:purchase.analitic.remain,write_date:0
+#: field:stock.location.silo_stock.location,write_date:0
+#: field:stock.lot_farm.animal,write_date:0
+#: field:stock.lot_farm.animal.group,write_date:0
+msgid "Last Updated on"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,last_produced_group:0
+msgid "Last produced group"
+msgstr ""
+
+#. module: farm
+#: field:farm.semen_extraction.dose,sequence:0
+msgid "Line Num"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.female_cycle,live:0
+#: field:farm.farrowing.event,live:0
+msgid "Live"
+msgstr ""
+
+#. module: farm
+#: view:farm.animal:farm.animal_search_view
+#: view:farm.animal.group:farm.animal_group_search_view
+#: field:farm.event.feed_mixin,location:0
+#: view:farm.feed.event:farm.feed_event_search_view
+#: field:farm.feed.event,location:0
+#: field:farm.feed.stock.location,location:0
+#: field:farm.foster.locations,location:0
+#: field:farm.future_maders.locations,location:0
+#: field:farm.medication.event,location:0
+#: field:farm.transit.locations,location:0
+#: view:purchase.order.line:farm.farm_purchase_line_search_view
+#: field:stock.location.silo_stock.location,location:0
+msgid "Location"
+msgstr ""
+
+#. module: farm
+#: field:farm.feed.animal_location_date,location:0
+msgid "Location fed"
+msgstr ""
+
+#. module: farm
+#: view:stock.location.silo_stock.location:farm.view_silo_location_form
+msgid "Location to Feed"
+msgstr ""
+
+#. module: farm
+#: field:stock.location,locations_to_fed:0
+msgid "Location to fed"
+msgstr ""
+
+#. module: farm
+#: field:farm.feed.inventory,dest_locations:0
+#: field:farm.feed.inventory.mixin,dest_locations:0
+#: field:farm.feed.provisional_inventory,dest_locations:0
+msgid "Location to feed"
+msgstr ""
+
+#. module: farm
+#: field:farm.weaning.event,lost_move:0
+msgid "Lost Stock  Move"
+msgstr ""
+
+#. module: farm
+#: field:farm.abort.event,lot:0
+#: field:farm.animal.group,lot:0
+#: field:farm.consume.stock,lot_id:0
+#: field:farm.event,lot:0
+#: field:farm.event.feed_mixin,lot:0
+#: field:farm.event.import.mixin,lot:0
+#: field:farm.farrowing.event,lot:0
+#: field:farm.feed.event,lot:0
+#: field:farm.foster.event,lot:0
+#: field:farm.insemination.event,lot:0
+#: field:farm.medication.event,lot:0
+#: field:farm.move.event,lot:0
+#: field:farm.pregnancy_diagnosis.event,lot:0
+#: field:farm.removal.event,lot:0
+#: field:farm.semen_extraction.dose,lot:0
+#: field:farm.semen_extraction.event,lot:0
+#: field:farm.transformation.event,lot:0
+#: field:farm.weaning.event,lot:0
+#: field:stock.lot_farm.animal,lot:0
+#: field:stock.lot_farm.animal.group,lot:0
+msgid "Lot"
+msgstr ""
+
+#. module: farm
+#: model:ir.model,name:farm.model_stock_production_lot
+msgid "Lot/Serial"
+msgstr ""
+
+#. module: farm
+#: selection:farm.abort.event,animal_type:0
+#: selection:farm.animal,sex:0
+#: selection:farm.animal,type:0
+#: selection:farm.event,animal_type:0
+#: selection:farm.event.feed_mixin,animal_type:0
+#: selection:farm.event.import.mixin,animal_type:0
+#: selection:farm.event.order,animal_type:0
+#: selection:farm.farrowing.event,animal_type:0
+#: selection:farm.feed.animal_location_date,animal_type:0
+#: selection:farm.feed.event,animal_type:0
+#: selection:farm.foster.event,animal_type:0
+#: selection:farm.insemination.event,animal_type:0
+#: selection:farm.medication.event,animal_type:0
+#: selection:farm.move.event,animal_type:0
+#: selection:farm.pregnancy_diagnosis.event,animal_type:0
+#: selection:farm.removal.event,animal_type:0
+#: selection:farm.semen_extraction.event,animal_type:0
+#: selection:farm.transformation.event,animal_type:0
+#: selection:farm.transformation.event,to_animal_type:0
+#: selection:farm.weaning.event,animal_type:0
+msgid "Male"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie,male_product:0
+msgid "Male's Product"
+msgstr ""
+
+#. module: farm
+#: selection:stock.production.lot,animal_type:0
+msgid "Male)"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie.farm_line,has_male:0
+msgid "Males"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie,male_enabled:0
+msgid "Males Enabled"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie.farm_line,male_sequence:0
+msgid "Males' Sequence"
+msgstr ""
+
+#. module: farm
+#: model:res.groups,name:farm.group_farm_manager
+msgid "Manager"
+msgstr ""
+
+#. module: farm
+#: model:ir.model,name:farm.model_mrp_production
+msgid "Manufacturing Order"
+msgstr ""
+
+#. module: farm
+#: selection:farm.animal,state:0
+#: selection:farm.animal.female_cycle,state:0
+msgid "Mated"
+msgstr ""
+
+#. module: farm
+#: field:stock.location,animal_max:0
+#: field:stock.warehouse,animal_max:0
+msgid "Max num of animals"
+msgstr ""
+
+#. module: farm
+#: field:farm.medication.event,medicated_feed:0
+msgid "Medicated Feed"
+msgstr ""
+
+#. module: farm
+#: field:farm.event.order,medication_events:0
+msgid "Medication"
+msgstr ""
+
+#. module: farm
+#: view:farm.medication.event:farm.view_medication_event_form
+msgid "Medication Event"
+msgstr ""
+
+#. module: farm
+#: view:farm.animal:farm.view_animal_form
+#: view:farm.animal.group:farm.view_animal_group
+#: model:ir.actions.act_window,name:farm.animal_group_open_medication_events
+#: model:ir.actions.act_window,name:farm.animal_open_medication_events
+msgid "Medication events"
+msgstr ""
+
+#. module: farm
+#: field:farm.medication.event,medication_in_feed:0
+msgid "Medication in feed"
+msgstr ""
+
+#. module: farm
+#: selection:farm.event.order,event_type:0
+msgid "Medications"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie.ir.model,model:0
+msgid "Model"
+msgstr ""
+
+#. module: farm
+#: view:farm.feed.event:farm.feed_event_search_view
+msgid "Month"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/semen_extration_event.py:109
+#, python-format
+msgid "More semen in doses than produced"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.group,mother:0
+msgid "Mother"
+msgstr ""
+
+#. module: farm
+#: field:farm.semen_extraction.event,semen_move:0
+msgid "Move"
+msgstr ""
+
+#. module: farm
+#: field:farm.farrowing.event,mummified:0
+msgid "Mummified"
+msgstr ""
+
+#. module: farm
+#: field:farm.farrowing.problem,name:0
+#: field:farm.removal.reason,name:0
+#: field:farm.removal.type,name:0
+#: field:farm.specie.breed,name:0
+#: field:farm.tags,name:0
+msgid "Name"
+msgstr ""
+
+#. module: farm
+#: help:farm.specie,name:0
+msgid "Name of the specie. ie. \"Pig\""
+msgstr ""
+
+#. module: farm
+#: selection:farm.pregnancy_diagnosis.event,result:0
+msgid "Negative"
+msgstr ""
+
+#. module: farm
+#: selection:stock.production.lot,animal_type:0
+msgid "No animal"
+msgstr ""
+
+#. module: farm
+#: selection:farm.pregnancy_diagnosis.event,result:0
+msgid "Non conclusive"
+msgstr ""
+
+#. module: farm
+#: field:farm.abort.event,notes:0
+#: field:farm.animal,notes:0
+#: field:farm.animal.group,notes:0
+#: field:farm.event,notes:0
+#: field:farm.event.feed_mixin,notes:0
+#: field:farm.event.import.mixin,notes:0
+#: field:farm.event.order,notes:0
+#: field:farm.farrowing.event,notes:0
+#: field:farm.feed.event,notes:0
+#: field:farm.foster.event,notes:0
+#: field:farm.insemination.event,notes:0
+#: field:farm.medication.event,notes:0
+#: field:farm.move.event,notes:0
+#: field:farm.pregnancy_diagnosis.event,notes:0
+#: field:farm.removal.event,notes:0
+#: field:farm.semen_extraction.event,notes:0
+#: field:farm.transformation.event,notes:0
+#: field:farm.weaning.event,notes:0
+msgid "Notes"
+msgstr ""
+
+#. module: farm
+#: field:account.invoice.line,animal_qty:0
+msgid "Num of animals"
+msgstr ""
+
+#. module: farm
+#: field:farm.feed.animal_location_date,animale_qty:0
+#: view:website:account.report_invoice_document
+msgid "Num. Animals"
+msgstr ""
+
+#. module: farm
+#: field:farm.event.feed_mixin,quantity:0
+#: field:farm.feed.event,quantity:0
+#: field:farm.medication.event,quantity:0
+msgid "Num. of animals"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,number:0
+#: field:farm.animal.group,number:0
+msgid "Number"
+msgstr ""
+
+#. module: farm
+#: help:farm.feed.animal_location_date,inventory_qty:0
+msgid "Number of Inventories which includethis date."
+msgstr ""
+
+#. module: farm
+#: help:farm.animal.female_cycle,days_between_farrowing_weaning:0
+msgid "Number of days between Farrowing and Weaning."
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.group.weight,quantity:0
+msgid "Number of individuals"
+msgstr ""
+
+#. module: farm
+#: help:farm.animal.female_cycle,removed:0
+msgid "Number of removed animals from Produced Group. Diference between born live and weaned, computing Fostered diference."
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.female_cycle,sequence:0
+msgid "Nun. cycle"
+msgstr ""
+
+#. module: farm
+#: selection:farm.pregnancy_diagnosis.event,result:0
+msgid "Observed not Pregnant"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/farrowing_event.py:48
+#, python-format
+msgid "Only diagnosticated pregnant females can be farrow"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/abort_event.py:22
+#, python-format
+msgid "Only females can abort"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/insemination_event.py:31
+#, python-format
+msgid "Only females can be bred"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/pregnancy_diagnosis_event.py:28
+#, python-format
+msgid "Only females can be diagnosed"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/farrowing_event.py:45
+#, python-format
+msgid "Only females can be farrow"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/foster_event.py:34
+#, python-format
+msgid "Only females can foster a group"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/weaning_event.py:66
+#, python-format
+msgid "Only females can wean a group"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/foster_event.py:37
+#, python-format
+msgid "Only lactating females can foster a group"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/weaning_event.py:69
+#, python-format
+msgid "Only lactating females can wean a group"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/pregnancy_diagnosis_event.py:31
+#, python-format
+msgid "Only mated females can be diagnosed"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/abort_event.py:25
+#, python-format
+msgid "Only pregnat females can abort"
+msgstr ""
+
+#. module: farm
+#: field:farm.abort.event,job_order:0
+#: field:farm.event,job_order:0
+#: field:farm.event.feed_mixin,job_order:0
+#: field:farm.event.import.mixin,job_order:0
+#: field:farm.farrowing.event,job_order:0
+#: field:farm.feed.event,job_order:0
+#: field:farm.foster.event,job_order:0
+#: field:farm.insemination.event,job_order:0
+#: field:farm.medication.event,job_order:0
+#: field:farm.move.event,job_order:0
+#: field:farm.pregnancy_diagnosis.event,job_order:0
+#: field:farm.removal.event,job_order:0
+#: field:farm.semen_extraction.event,job_order:0
+#: field:farm.transformation.event,job_order:0
+#: field:farm.weaning.event,job_order:0
+msgid "Order"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,origin:0
+#: field:farm.animal.group,origin:0
+#: view:farm.consume.stock:farm.farm_consume_stock_search_view
+#: field:farm.consume.stock,origin:0
+#: field:farm.move.event,from_location:0
+#: field:farm.removal.event,from_location:0
+#: field:farm.transformation.event,from_location:0
+msgid "Origin"
+msgstr ""
+
+#. module: farm
+#: field:farm.foster.event,pair_female:0
+msgid "Pair Female"
+msgstr ""
+
+#. module: farm
+#: selection:farm.pregnancy_diagnosis.event,result:0
+msgid "Positive"
+msgstr ""
+
+#. module: farm
+#: field:farm.event.order,pregnancy_diagnosis_events:0
+msgid "Pregnanci Diagnosis"
+msgstr ""
+
+#. module: farm
+#: view:farm.pregnancy_diagnosis.event:farm.view_pregnancy_diagnosis_event_form
+msgid "Pregnanci Diagnosis Event"
+msgstr ""
+
+#. module: farm
+#: selection:farm.event.order,event_type:0
+msgid "Pregnancy Diagnosis"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.female_cycle,pregnant:0
+#: selection:farm.animal.female_cycle,state:0
+msgid "Pregnat"
+msgstr ""
+
+#. module: farm
+#: field:farm.feed.inventory,prev_inventory:0
+msgid "Previous Inventory"
+msgstr ""
+
+#. module: farm
+#: field:farm.feed.provisional_inventory,prev_inventory_date:0
+msgid "Previous Inventory Date"
+msgstr ""
+
+#. module: farm
+#: field:farm.farrowing.event,problem:0
+msgid "Problem"
+msgstr ""
+
+#. module: farm
+#: field:farm.farrowing.event,produced_group:0
+msgid "Produced Group"
+msgstr ""
+
+#. module: farm
+#: field:farm.consume.stock,product_id:0
+#: view:purchase.order.line:farm.farm_purchase_line_search_view
+msgid "Product"
+msgstr ""
+
+#. module: farm
+#: model:ir.model,name:farm.model_product_template
+msgid "Product Template"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie,sale_product:0
+msgid "Product denomination in sales"
+msgstr ""
+
+#. module: farm
+#: help:farm.specie,semen_product:0
+msgid "Product for the mixture of semen to raise the expected quality.\n"
+"It is used in the Production lots produced in the Extraction Events and in the BoM containers for doses used in deliveries to farms for inseminations."
+msgstr ""
+
+#. module: farm
+#: selection:farm.animal,state:0
+msgid "Prospective"
+msgstr ""
+
+#. module: farm
+#: model:ir.model,name:farm.model_purchase_order
+msgid "Purchase Order"
+msgstr ""
+
+#. module: farm
+#: model:ir.model,name:farm.model_purchase_order_line
+msgid "Purchase Order Line"
+msgstr ""
+
+#. module: farm
+#: view:purchase.order.line:farm.view_farm_purchase_line_form
+msgid "Purchase line"
+msgstr ""
+
+#. module: farm
+#: view:purchase.order.line:farm.view_farm_purchase_line_tree
+msgid "Purchase lines"
+msgstr ""
+
+#. module: farm
+#: selection:farm.animal,origin:0
+#: selection:farm.animal.group,origin:0
+msgid "Purchased"
+msgstr ""
+
+#. module: farm
+#: model:ir.ui.menu,name:farm.menu_farm_purchases
+msgid "Purchases"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,purpose:0
+msgid "Purpose"
+msgstr ""
+
+#. module: farm
+#: field:farm.feed.event,feed_quantity_animal_day:0
+msgid "Qty. per Animal Day"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.group,quantity:0
+#: field:farm.consume.stock,quantity:0
+#: field:farm.feed.inventory,quantity:0
+#: field:farm.feed.inventory.mixin,quantity:0
+#: field:farm.feed.provisional_inventory,quantity:0
+#: field:farm.move.event,quantity:0
+#: field:farm.removal.event,quantity:0
+#: field:farm.semen_extraction.dose,quantity:0
+#: field:farm.transformation.event,quantity:0
+#: field:farm.weaning.event,quantity:0
+msgid "Quantity"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/removal_event.py:183
+#: code:addons/farm/models/removal_event.py:186
+#: code:addons/farm/models/transformation_event.py:107
+#, python-format
+msgid "Quantity no compatible"
+msgstr ""
+
+#. module: farm
+#: field:stock.warehouse,radius:0
+msgid "Radius"
+msgstr ""
+
+#. module: farm
+#: selection:farm.animal,origin:0
+#: selection:farm.animal.group,origin:0
+msgid "Raised"
+msgstr ""
+
+#. module: farm
+#: help:farm.animal.group,origin:0
+msgid "Raised means that this group was born inthe farm. Otherwise, it was purchased."
+msgstr ""
+
+#. module: farm
+#: field:farm.removal.event,reason:0
+msgid "Reason"
+msgstr ""
+
+#. module: farm
+#: field:farm.event.order,name:0
+msgid "Reference"
+msgstr ""
+
+#. module: farm
+#: field:farm.semen_extraction.event,semen_remaining_qty:0
+msgid "Remaining Semen"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,removal_date:0
+msgid "Removal Date"
+msgstr ""
+
+#. module: farm
+#: view:farm.removal.event:farm.view_removal_event_form
+#: model:ir.actions.act_window,name:farm.farm_removal_view
+#: model:ir.ui.menu,name:farm.menu_farm_removal_event
+msgid "Removal Event"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.group,removal_date:0
+msgid "Removal date"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,removal_reason:0
+msgid "Removal reason"
+msgstr ""
+
+#. module: farm
+#: selection:farm.animal,state:0
+msgid "Removed"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie,removed_location:0
+msgid "Removed Location"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.female_cycle,removed:0
+msgid "Removed Quantity"
+msgstr ""
+
+#. module: farm
+#: selection:farm.animal,purpose:0
+msgid "Replacement"
+msgstr ""
+
+#. module: farm
+#: field:farm.pregnancy_diagnosis.event,result:0
+msgid "Result"
+msgstr ""
+
+#. module: farm
+#: selection:farm.animal,purpose:0
+msgid "Sale"
+msgstr ""
+
+#. module: farm
+#: view:farm.animal:farm.animal_search_view
+msgid "Search Animal"
+msgstr ""
+
+#. module: farm
+#: view:farm.animal.group:farm.animal_group_search_view
+#: view:purchase.order.line:farm.farm_purchase_line_search_view
+msgid "Search Animal group"
+msgstr ""
+
+#. module: farm
+#: view:farm.consume.stock:farm.farm_consume_stock_search_view
+msgid "Search consume stock"
+msgstr ""
+
+#. module: farm
+#: view:farm.feed.event:farm.feed_event_search_view
+msgid "Search feed event"
+msgstr ""
+
+#. module: farm
+#: help:farm.transformation.event,to_animal_group:0
+msgid "Select a Destination Group if youwant to add the transformed animals tothis group. To create a new group leave it empty."
+msgstr ""
+
+#. module: farm
+#: help:res.users,customer_payment_mode:0
+msgid "Select the default payment mode for this customer."
+msgstr ""
+
+#. module: farm
+#: help:res.users,supplier_payment_mode:0
+msgid "Select the default payment mode for this supplier."
+msgstr ""
+
+#. module: farm
+#: field:mrp.bom,semen_dose:0
+msgid "Semen Dose"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie.farm_line,dose_lot_sequence:0
+msgid "Semen Dose Lots' Sequence"
+msgstr ""
+
+#. module: farm
+#: field:farm.semen_extraction.event,untreated_semen_qty:0
+msgid "Semen Extracted Qty"
+msgstr ""
+
+#. module: farm
+#: model:ir.ui.menu,name:farm.menu_farm_extraction_event
+msgid "Semen Extraction"
+msgstr ""
+
+#. module: farm
+#: view:farm.semen_extraction.event:farm.view_semen_extraction_event_form
+msgid "Semen Extraction Event"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,extractions:0
+msgid "Semen Extractions"
+msgstr ""
+
+#. module: farm
+#: field:farm.semen_extraction.event,semen_qty:0
+msgid "Semen Producec Quantity"
+msgstr ""
+
+#. module: farm
+#: field:farm.semen_extraction.dose,semen_qty:0
+msgid "Semen Qty"
+msgstr ""
+
+#. module: farm
+#: field:farm.semen_extraction.event,semen_lot:0
+msgid "Semen lot"
+msgstr ""
+
+#. module: farm
+#: field:farm.semen_extraction.event,semen_product:0
+#: field:farm.specie,semen_product:0
+msgid "Semen's Product"
+msgstr ""
+
+#. module: farm
+#: help:farm.specie.farm_line,female_sequence:0
+msgid "Sequence used for female production lots and animals."
+msgstr ""
+
+#. module: farm
+#: help:farm.specie.farm_line,group_sequence:0
+msgid "Sequence used for group production lots and animals."
+msgstr ""
+
+#. module: farm
+#: help:farm.specie.farm_line,individual_sequence:0
+msgid "Sequence used for individual lots and animals."
+msgstr ""
+
+#. module: farm
+#: help:farm.specie.farm_line,male_sequence:0
+msgid "Sequence used for male lots and animals."
+msgstr ""
+
+#. module: farm
+#: help:farm.specie.farm_line,event_order_sequence:0
+msgid "Sequence used for the Event Orders in this farm."
+msgstr ""
+
+#. module: farm
+#: view:purchase.order:farm.farm_purchase_order_form_inherit
+msgid "Set Analitics"
+msgstr ""
+
+#. module: farm
+#: field:stock.inventory,feed_analitic:0
+msgid "Set Feed Analitic"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,sex:0
+msgid "Sex"
+msgstr ""
+
+#. module: farm
+#: field:farm.feed.inventory,location:0
+#: field:farm.feed.inventory.mixin,location:0
+#: field:farm.feed.provisional_inventory,location:0
+#: field:stock.location,silo:0
+msgid "Silo"
+msgstr ""
+
+#. module: farm
+#: selection:farm.animal.group,state:0
+msgid "Sold"
+msgstr ""
+
+#. module: farm
+#: field:farm.abort.event,specie:0
+#: field:farm.animal,specie:0
+#: field:farm.animal.group,specie:0
+#: field:farm.event,specie:0
+#: field:farm.event.feed_mixin,specie:0
+#: field:farm.event.import.mixin,specie:0
+#: field:farm.event.order,specie:0
+#: field:farm.farrowing.event,specie:0
+#: field:farm.feed.event,specie:0
+#: field:farm.feed.inventory,specie:0
+#: field:farm.feed.inventory.mixin,specie:0
+#: field:farm.feed.provisional_inventory,specie:0
+#: field:farm.foster.event,specie:0
+#: field:farm.insemination.event,specie:0
+#: field:farm.medication.event,specie:0
+#: field:farm.move.event,specie:0
+#: field:farm.pregnancy_diagnosis.event,specie:0
+#: field:farm.removal.event,specie:0
+#: field:farm.semen_extraction.dose,specie:0
+#: field:farm.semen_extraction.event,specie:0
+#: view:farm.specie:farm.view_specie_form
+#: view:farm.specie:farm.view_specie_tree
+#: field:farm.specie.breed,specie:0
+#: field:farm.specie.farm_line,specie:0
+#: field:farm.specie.ir.model,specie:0
+#: field:farm.transformation.event,specie:0
+#: field:farm.weaning.event,specie:0
+#: model:ir.actions.act_window,name:farm.farm_specie_view
+#: model:ir.ui.menu,name:farm.menu_farm_configuration_specie
+msgid "Specie"
+msgstr ""
+
+#. module: farm
+#: field:farm.removal.event,specific_lot:0
+msgid "Specific lot"
+msgstr ""
+
+#. module: farm
+#: field:farm.event.feed_mixin,start_date:0
+#: field:farm.feed.event,start_date:0
+#: field:farm.medication.event,start_date:0
+msgid "Start Date"
+msgstr ""
+
+#. module: farm
+#: help:farm.event.feed_mixin,start_date:0
+#: help:farm.feed.event,start_date:0
+#: help:farm.medication.event,start_date:0
+msgid "Start date of the period inwhich the given quantity of product wasconsumed."
+msgstr ""
+
+#. module: farm
+#: field:farm.abort.event,state:0
+#: view:farm.animal:farm.animal_search_view
+#: field:farm.animal,state:0
+#: field:farm.animal.female_cycle,state:0
+#: view:farm.animal.group:farm.animal_group_search_view
+#: field:farm.animal.group,state:0
+#: view:farm.consume.stock:farm.farm_consume_stock_search_view
+#: field:farm.consume.stock,state:0
+#: field:farm.event,state:0
+#: field:farm.event.feed_mixin,state:0
+#: field:farm.event.import.mixin,state:0
+#: field:farm.event.order,state:0
+#: field:farm.farrowing.event,state:0
+#: view:farm.feed.event:farm.feed_event_search_view
+#: field:farm.feed.event,state:0
+#: field:farm.foster.event,state:0
+#: field:farm.insemination.event,state:0
+#: field:farm.medication.event,state:0
+#: field:farm.move.event,state:0
+#: field:farm.pregnancy_diagnosis.event,state:0
+#: field:farm.removal.event,state:0
+#: field:farm.semen_extraction.event,state:0
+#: field:farm.transformation.event,state:0
+#: field:farm.weaning.event,state:0
+msgid "State"
+msgstr ""
+
+#. module: farm
+#: field:farm.feed.inventory,state:0
+#: field:farm.feed.inventory.mixin,state:0
+#: field:farm.feed.provisional_inventory,state:0
+msgid "States"
+msgstr ""
+
+#. module: farm
+#: field:farm.farrowing.event,stillborn:0
+msgid "Stillborn"
+msgstr ""
+
+#. module: farm
+#: field:farm.event.feed_mixin,move:0
+#: field:farm.farrowing.event,move:0
+#: field:farm.feed.event,move:0
+#: field:farm.medication.event,move:0
+#: field:farm.move.event,move:0
+#: field:farm.removal.event,move:0
+#: field:farm.transformation.event,move:0
+#: model:ir.model,name:farm.model_stock_move
+msgid "Stock Move"
+msgstr ""
+
+#. module: farm
+#: field:farm.insemination.event,move:0
+msgid "Stock move"
+msgstr ""
+
+#. module: farm
+#: field:res.users,supplier_payment_mode:0
+msgid "Supplier Payment Mode"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.group,tags:0
+#: view:farm.tags:farm.view_tag_form
+#: view:farm.tags:farm.view_tag_tree
+#: model:ir.actions.act_window,name:farm.farm_tag_view
+#: model:ir.ui.menu,name:farm.menu_farm_configuration_tag
+msgid "Tag"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,tags:0
+msgid "Tags"
+msgstr ""
+
+#. module: farm
+#: field:farm.event.order,trasformation_events:0
+msgid "Tasformation Events"
+msgstr ""
+
+#. module: farm
+#: help:farm.animal,initial_location:0
+msgid "The Location where the animal was reached or where it was allocated when it was purchased.\n"
+"It is used as historical information and to get Serial Number."
+msgstr ""
+
+#. module: farm
+#: help:farm.animal.group,initial_location:0
+msgid "The Location where the group wasreached or where it was allocated whenit was purchased.\n"
+"It is used ashistorical information and to getSerial Number."
+msgstr ""
+
+#. module: farm
+#: help:farm.animal,arrival_date:0
+msgid "The date this animal arrived (if itwas purchased) or when it was born."
+msgstr ""
+
+#. module: farm
+#: help:farm.animal.group,arrival_date:0
+msgid "The date this group arrived (if it waspurchased) or when it was born."
+msgstr ""
+
+#. module: farm
+#: help:farm.feed.event,feed_inventory:0
+msgid "The inventory that generated thisevent automatically."
+msgstr ""
+
+#. module: farm
+#: help:farm.animal.group,initial_quantity:0
+msgid "The number of animals in groupwhen it was reached or purchased.\n"
+"Itis used as historical information andto create the initial move."
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/event_order.py:138
+#, python-format
+msgid "The values of animal type are diferent on order and events"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/event_order.py:133
+#, python-format
+msgid "The values of farm are diferent on order and events"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/event_order.py:142
+#, python-format
+msgid "The values of specie are diferent on order and events"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/event_order.py:124
+#, python-format
+msgid "There are no event associated with this work order"
+msgstr ""
+
+#. module: farm
+#: help:res.users,property_delivery_carrier:0
+msgid "This delivery method will be used when invoicing from picking."
+msgstr ""
+
+#. module: farm
+#: selection:farm.animal,state:0
+msgid "To review"
+msgstr ""
+
+#. module: farm
+#: view:farm.feed.event:farm.view_feed_event_tree
+msgid "Tot. feed quantity"
+msgstr ""
+
+#. module: farm
+#: view:purchase.order.line:farm.view_farm_purchase_line_tree
+msgid "Tot. price"
+msgstr ""
+
+#. module: farm
+#: field:farm.weaning.event,transformation_event:0
+msgid "Transformation Event"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie,lost_found_location:0
+msgid "Transit Location"
+msgstr ""
+
+#. module: farm
+#: selection:farm.animal.group,state:0
+msgid "Transition"
+msgstr ""
+
+#. module: farm
+#: field:stock.location,transport:0
+msgid "Transport"
+msgstr ""
+
+#. module: farm
+#: view:farm.transformation.event:farm.view_trasformation_event_form
+msgid "Trasformation"
+msgstr ""
+
+#. module: farm
+#: selection:farm.event.order,event_type:0
+msgid "Trasformation Event"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,type:0
+#: field:farm.removal.event,removal_type:0
+msgid "Type"
+msgstr ""
+
+#. module: farm
+#: field:farm.event.feed_mixin,uom:0
+#: field:farm.feed.event,uom:0
+#: field:farm.feed.inventory,uom:0
+#: field:farm.feed.inventory.mixin,uom:0
+#: field:farm.feed.provisional_inventory,uom:0
+#: field:farm.medication.event,uom:0
+#: field:farm.move.event,uom:0
+msgid "UOM"
+msgstr ""
+
+#. module: farm
+#: selection:farm.animal,sex:0
+msgid "Undetermined"
+msgstr ""
+
+#. module: farm
+#: help:farm.animal,number:0
+msgid "Unique Serial Number"
+msgstr ""
+
+#. module: farm
+#: field:farm.move.event,unit_price:0
+msgid "Unit Price"
+msgstr ""
+
+#. module: farm
+#: help:product.template,farrowing_price:0
+msgid "Unitary cost for farrowing events.It's only used when the product isa group product of a farm specie."
+msgstr ""
+
+#. module: farm
+#: help:product.template,wearing_price:0
+msgid "Unitary cost for weaning events.It's only used when the product is agroup product of a farm specie."
+msgstr ""
+
+#. module: farm
+#: help:farm.move.event,unit_price:0
+msgid "Unitary cost of Animal or Group foranalytical accounting."
+msgstr ""
+
+#. module: farm
+#: selection:farm.animal,purpose:0
+msgid "Unknown"
+msgstr ""
+
+#. module: farm
+#: selection:farm.animal,state:0
+#: selection:farm.animal.female_cycle,state:0
+msgid "Unmated"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.female_cycle,days_between_wearing_and_insemination:0
+msgid "Unmated Days"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,days_from_farrowing:0
+msgid "Unpregnat Days"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.group.weight,uom:0
+#: field:farm.animal.weight,uom:0
+msgid "Uom"
+msgstr ""
+
+#. module: farm
+#: model:res.groups,name:farm.group_farm_user
+msgid "User"
+msgstr ""
+
+#. module: farm
+#: model:ir.model,name:farm.model_res_users
+msgid "Users"
+msgstr ""
+
+#. module: farm
+#: selection:farm.abort.event,state:0
+#: selection:farm.event,state:0
+#: selection:farm.event.feed_mixin,state:0
+#: selection:farm.event.import.mixin,state:0
+#: selection:farm.event.order,state:0
+#: selection:farm.farrowing.event,state:0
+#: selection:farm.feed.event,state:0
+#: selection:farm.feed.inventory,state:0
+#: selection:farm.feed.inventory.mixin,state:0
+#: selection:farm.feed.provisional_inventory,state:0
+#: selection:farm.foster.event,state:0
+#: selection:farm.insemination.event,state:0
+#: selection:farm.medication.event,state:0
+#: selection:farm.move.event,state:0
+#: selection:farm.pregnancy_diagnosis.event,state:0
+#: selection:farm.removal.event,state:0
+#: selection:farm.semen_extraction.dose,state:0
+#: selection:farm.semen_extraction.event,state:0
+#: selection:farm.transformation.event,state:0
+#: selection:farm.weaning.event,state:0
+msgid "Validated"
+msgstr ""
+
+#. module: farm
+#: help:farm.specie,foster_location:0
+msgid "Virtual location where fostered animals are moved to."
+msgstr ""
+
+#. module: farm
+#: help:farm.specie,lost_found_location:0
+msgid "Virtual location where lost or found animals are moved to."
+msgstr ""
+
+#. module: farm
+#: help:farm.specie,removed_location:0
+msgid "Virtual location where removed animals are moved to."
+msgstr ""
+
+#. module: farm
+#: model:ir.model,name:farm.model_stock_warehouse
+msgid "Warehouse"
+msgstr ""
+
+#. module: farm
+#: field:farm.weaning.event,weaned_to_location:0
+msgid "Weaned Destination"
+msgstr ""
+
+#. module: farm
+#: field:farm.weaning.event,weared_group:0
+msgid "Weaned group"
+msgstr ""
+
+#. module: farm
+#: view:farm.weaning.event:farm.view_weaning_event_form
+msgid "Weaning Event"
+msgstr ""
+
+#. module: farm
+#: field:product.template,wearing_price:0
+msgid "Weaning Price"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.female_cycle,weaning_event:0
+msgid "Weaning event"
+msgstr ""
+
+#. module: farm
+#: selection:farm.event.order,event_type:0
+msgid "Weanings"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.female_cycle,weared:0
+msgid "Weared"
+msgstr ""
+
+#. module: farm
+#: field:farm.weaning.event,weared_move:0
+msgid "Weared Stock Move"
+msgstr ""
+
+#. module: farm
+#: field:farm.weaning.event_female_cycle,event:0
+msgid "Wearing Event"
+msgstr ""
+
+#. module: farm
+#: view:farm.weaning.event_female_cycle:farm.view_weaning_event_female_cycle_form
+msgid "Wearing Event-female cycle"
+msgstr ""
+
+#. module: farm
+#: view:farm.animal.weight:farm.view_animal_weight_form
+#: field:farm.animal.weight,weight:0
+#: field:farm.move.event,weight:0
+msgid "Weight"
+msgstr ""
+
+#. module: farm
+#: field:farm.move.event,weight_record:0
+msgid "Weight Record"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.group,weights:0
+msgid "Weights"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,weight:0
+msgid "Weigth records"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.group.weight,weight:0
+msgid "Weihht"
+msgstr ""
+
+#. module: farm
+#: model:ir.ui.menu,name:farm.menu_farm_event_order
+msgid "Work order"
+msgstr ""
+
+#. module: farm
+#: selection:farm.consume.stock,type:0
+msgid "Yard"
+msgstr ""
+
+#. module: farm
+#: field:purchase.analitic.remain,quantity:0
+msgid "amount"
+msgstr ""
+
+#. module: farm
+#: field:purchase.order.line,aux_price_subtotal:0
+msgid "amount_untaxed"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/animal.py:129
+#, python-format
+msgid "animal location and product location are diferent"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.group,feed_quantity:0
+msgid "cumulative consumed feed"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/semen_extration_event.py:117
+#, python-format
+msgid "dose already defined"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.group,fatten_date:0
+msgid "fatten day"
+msgstr ""
+
+#. module: farm
+#: field:farm.event.order,feed_events:0
+msgid "feed"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/insemination_event.py:40
+#, python-format
+msgid "female's cycle is not compatible to be bred"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/animal_group.py:283
+#, python-format
+msgid "group intial quantity and product quantity are diferent"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/analitic_sales.py:95
+#: code:addons/farm/models/stock.py:62
+#, python-format
+msgid "group sold not found"
+msgstr ""
+
+#. module: farm
+#: field:stock.warehouse,holding_number:0
+msgid "holding number"
+msgstr ""
+
+#. module: farm
+#: help:stock.warehouse,radius:0
+msgid "is used for calculating transport costs, you can use absolute or relative values"
+msgstr ""
+
+#. module: farm
+#: field:purchase.analitic.remain,last_calc:0
+msgid "last day unit calc"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal,lot:0
+msgid "lot"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/animal_group.py:248
+#, python-format
+msgid "lots can not be mixed in an initial group, create a group for each lot and then group them into the desired group"
+msgstr ""
+
+#. module: farm
+#: view:purchase.order.line:farm.farm_purchase_line_search_view
+msgid "month"
+msgstr ""
+
+#. module: farm
+#: field:farm.specie,name:0
+msgid "name"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/farrowing_event.py:51
+#, python-format
+msgid "no deads and no lives"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/semen_extration_event.py:133
+#, python-format
+msgid "no doses"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/animal.py:126
+#: code:addons/farm/models/animal_group.py:275
+#, python-format
+msgid "no product in farms for this lot"
+msgstr ""
+
+#. module: farm
+#: field:farm.semen_extraction.dose,production:0
+msgid "production"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/transformation_event.py:110
+#, python-format
+msgid "quantity is biger than group quantity"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/foster_event.py:52
+#, python-format
+msgid "quantity is biger than incoming group quantity"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/transformation_event.py:113
+#, python-format
+msgid "quantity is smaler than one"
+msgstr ""
+
+#. module: farm
+#: field:purchase.analitic.remain,quantity_per_unit:0
+msgid "quantity per unit"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/insemination_event.py:78
+#, python-format
+msgid "semen dose no avairable"
+msgstr ""
+
+#. module: farm
+#: field:stock.location.silo_stock.location,silo:0
+msgid "silo"
+msgstr ""
+
+#. module: farm
+#: field:farm.foster.locations,specie:0
+#: field:farm.future_maders.locations,specie:0
+#: field:farm.transit.locations,specie:0
+msgid "specie"
+msgstr ""
+
+#. module: farm
+#: field:farm.semen_extraction.dose,state:0
+msgid "state"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/purchse_analytics.py:80
+#: code:addons/farm/models/purchse_analytics.py:293
+#, python-format
+msgid "the bill should have lower starting date to the final"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/transformation_event.py:122
+#: code:addons/farm/models/transformation_event.py:128
+#, python-format
+msgid "the destination is different from the location of the destination group"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/transformation_event.py:132
+#, python-format
+msgid "the destination of animal is the same of the locationof the origin group"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/removal_event.py:198
+#, python-format
+msgid "the origin is different from the location of the animal"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/removal_event.py:193
+#, python-format
+msgid "the origin is different from the location of the group"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/stock.py:88
+#, python-format
+msgid "there are insufficient nº of animals"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/animal_group.py:271
+#, python-format
+msgid "this lot iis in use, please create new lot"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/animal_group.py:290
+#, python-format
+msgid "this lot is in use from oder group"
+msgstr ""
+
+#. module: farm
+#: code:addons/farm/models/animal.py:122
+#, python-format
+msgid "this lot is in use, please create new lot"
+msgstr ""
+
+#. module: farm
+#: help:farm.specie,sale_product:0
+msgid "use when you sale animal units but customer pay meat kilogram"
+msgstr ""
+
+#. module: farm
+#: field:farm.event.order,weaning_events:0
+msgid "weaning"
+msgstr ""
+
+#. module: farm
+#: field:farm.animal.group,weaning_day:0
+msgid "weaning_day"
+msgstr ""
+

+ 8 - 0
models/__init__.py

@@ -0,0 +1,8 @@
+from . import specie, animal, production, stock, animal_group
+from . import abstract_event, weaning_event, pregnancy_diagnosis_event
+from . import semen_extration_event, farrowing_event, foster_event
+from . import removal_event, abort_event, insemination_event
+from . import feed_abstract_event, medication_event, event_order
+from . import transformation_event, feed_event, feed_inventory, move_event
+from . import product, res_company, purchse_analytics, analitic_sales
+from . import account_invoice, consume_stock

BIN
models/__init__.pyc


+ 41 - 0
models/abort_event.py

@@ -0,0 +1,41 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api, _
+from openerp.exceptions import Warning
+
+
+class AbortEvent(models.Model):
+    _name = 'farm.abort.event'
+    _inherit = {'farm.event.import.mixin': 'ImportedEventMixin_id'}
+    _auto = True
+
+    female_cycle = fields.Many2one(
+        comodel_name='farm.animal.female_cycle', string='Female Cycle')
+
+    @api.one
+    def confirm(self):
+        if not self.is_compatible():
+            raise Warning(
+                _("Only females can abort"))
+        if not self.is_ready():
+            raise Warning(
+                _("Only pregnat females can abort"))
+        self.female_cycle = self.animal.current_cycle
+        self.animal.update_state()
+        self.animal.current_cycle.update_state(self)
+        super(AbortEvent, self).confirm()
+
+    def is_compatible(self):
+        if self.animal_type == 'female':
+            return True
+        else:
+            return False
+
+    def is_ready(self):
+        if self.animal.current_cycle.state == 'pregnat':
+            return True
+        else:
+            return False

BIN
models/abort_event.pyc


+ 77 - 0
models/abstract_event.py

@@ -0,0 +1,77 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api
+
+EVENT_STATES = [
+    ('draft', 'Draft'),
+    ('validated', 'Validated'),
+    ]
+
+
+class AbstractEvent(models.Model):
+    _name = 'farm.event'
+    _auto = False
+
+    animal_type = fields.Selection([
+        ('male', 'Male'), ('female', 'Female'),
+        ('individual', 'Individual'), ('group', 'Group'),
+        ], string="Animal Type", select=True)
+    specie = fields.Many2one(comodel_name='farm.specie', string='Specie',
+                             select=True, default='get_specie')
+    farm = fields.Many2one(comodel_name='stock.location', string='Farm',
+                           domain=[('usage', '=', 'view'), ])
+    job_order = fields.Many2one(comodel_name='farm.event.order',
+                                string='Order')
+    animal = fields.Many2one(comodel_name='farm.animal', string='Animal',
+                             select=True)
+    animal_group = fields.Many2one(comodel_name='farm.animal.group',
+                                   string='Group')
+    lot = fields.Many2one(comodel_name='stock.production.lot', string='Lot',
+                          compute='get_lot')
+    timestamp = fields.Datetime(string='Date & Time', required=True,
+                                default=fields.Datetime.now())
+    employee = fields.Many2one(comodel_name='res.users', String='Employee',
+                               help='Employee that did the job.')
+    notes = fields.Text(string='Notes')
+    state = fields.Selection(string='State', selection=EVENT_STATES,
+                             default='draft')
+
+    @api.one
+    def get_lot(self):
+        if self.animal_type == 'group':
+            for lot in self.animal_group.lot:
+                self.lot = lot.lot
+        else:
+            self.lot = self.animal.lot.lot
+
+    @api.one
+    def confirm(self):
+        self.state = 'validated'
+        return True
+
+    @api.one
+    @api.onchange('timestamp')
+    def set_defaults(self):
+        if len(self.job_order) > 0:
+            self.specie = self.job_order.specie
+            self.animal_type = self.job_order.animal_type
+            self.farm = self.job_order.farm
+        else:
+            for animal in self.animal:
+                self.specie = animal.specie
+                self.animal_type = animal.type
+                self.farm = animal.location.location_id
+            for animal in self.animal_group:
+                self.specie = animal.specie
+                self.animal_type = animal.type
+                self.farm = animal.location.location_id
+
+
+class ImportedEventMixin(models.Model):
+    _name = 'farm.event.import.mixin'
+    _inherit = {'farm.event': 'AbstractEvent_id'}
+
+    imported = fields.Boolean(string='Imported', default=False)

BIN
models/abstract_event.pyc


+ 13 - 0
models/account_invoice.py

@@ -0,0 +1,13 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2016  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields
+
+
+class AccountInvoiceLine(models.Model):
+    _inherit = 'account.invoice.line'
+
+    animal_qty = fields.Integer(string = 'Num of animals')
+    farm = fields.Many2one(string='Farm', comodel_name='stock.warehouse')

BIN
models/account_invoice.pyc


+ 95 - 0
models/analitic_sales.py

@@ -0,0 +1,95 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+
+from openerp import models, fields, api
+from openerp.exceptions import Warning
+
+
+class analitic_account_invoice(models.Model):
+    _inherit = "account.invoice"
+
+    @api.multi
+    def invoice_validate(self):
+        for res in self:
+            if res.type == 'out_invoice' or res.type == 'out_refund':
+                if res.type == 'out_invoice':
+                    ref_id = res.id
+                    line_name = 'sale'
+                else:
+                    ref_id = res.origin_invoices_ids[0].id
+                    line_name = 'refund'
+                self.create_analitic_move(ref_id, res, line_name)
+        return super(analitic_account_invoice, self).invoice_validate()
+
+    @api.multi
+    @api.returns('self')
+    def refund(self, date=None, period_id=None, description=None,
+               journal_id=None):
+        for res in self:
+            if res.type == 'out_invoice':
+                ref_id = res.id
+                line_name = 'invoice-cancel'
+                self.create_analitic_move(ref_id, res, line_name)
+        return super(
+            analitic_account_invoice, self).refund(date, period_id,
+                                                   description, journal_id)
+
+    def create_analitic_move(self, ref_id, res, line_name):
+        analytic_line_obj = self.env['account.analytic.line']
+        sales = self.env['sale.order'].search([
+            ('invoice_ids', 'in', [ref_id, ])])
+        animal_total = 0
+        sale_animal = []
+        for sale in sales:
+            for sline in sale.order_line:
+                procurement = self.env['procurement.order'].search([
+                    ('sale_line_id', '=', sline.id)])
+                moves = self.env['stock.move'].search([
+                    ('procurement_id', '=', procurement.id)])
+                lots = []
+                for move in moves:
+                    for lot in move.quant_ids:
+                        operations = self.env['stock.pack.operation'].search([
+                            ('picking_id', '=', move.picking_id.id),
+                            ('lot_id', '=', lot.lot_id.id)])
+                        for op in operations:
+                            lots.append([lot.lot_id.name, op.product_qty])
+                animals_obj = self.env['farm.animal.group']
+                partys = animals_obj.search([(True, '=', True)])
+                for party in partys:
+                    for lot in lots:
+                        if party.number == lot[0]:
+                            sale_animal.append([party, lot[1]])
+                            animal_total = animal_total + lot[1]
+        if len(sale_animal) > 0:
+            total_price = 0
+            for line in res.invoice_line:
+                total_price = total_price \
+                    + line.price_subtotal
+            if line_name == 'invoice-cancel':
+                total_price = total_price * -1
+            price_unit = total_price/animal_total
+            for group in sale_animal:
+                company = self.env['res.company'].search([
+                    (True, '=', True)])[0]
+                journal = self.env[
+                    'account.analytic.journal'].search([
+                        ('code', '=', 'FAR')])
+                amount = price_unit * group[1]
+                analytic_line_obj.create({
+                    'name': line_name,
+                    'date': res.date_invoice,
+                    'amount': amount,
+                    'unit_amount': group[1],
+                    'account_id': group[0].account.id,
+                    'general_account_id': company.feed_account.id,
+                    'journal_id': journal.id,
+                    })
+        else:
+            species_obj = self.env['farm.specie']
+            for specie in species_obj:
+                if move.product_id.id == specie.group_product.id:
+                    raise Warning(_('group sold not found'))

BIN
models/analitic_sales.pyc


+ 537 - 0
models/animal.py

@@ -0,0 +1,537 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api, _
+from openerp.exceptions import Warning
+from datetime import datetime
+
+ANIMAL_ORIGIN = [('purchased', 'Purchased'),
+                 ('raised', 'Raised'), ]
+ANIMAL_TYPE = [('male', 'Male'), ('female', 'Female'),
+               ('individual', 'Individual'), ]
+DFORMAT = "%Y-%m-%d %H:%M:%S"
+
+
+class Tag(models.Model):
+    _name = 'farm.tags'
+    _order = 'name DESC'
+
+    name = fields.Char(string='Name', required=True)
+    animals = fields.Many2many(
+        comodel_name='farm.animal', inverse_name='tags',
+        string='Animals')
+    animal_group = fields.Many2many(
+        comodel_name='farm.animal.group', inverse_name='tags',
+        string='Groups')
+
+
+class Animal(models.Model):
+    _name = 'farm.animal'
+    _rec_name = 'number'
+
+    type = fields.Selection(selection=ANIMAL_TYPE, string='Type',
+                            default='individual')
+    specie = fields.Many2one(comodel_name='farm.specie',
+                             string='Specie', required=True, select=True)
+    breed = fields.Many2one(comodel_name='farm.specie.breed', string='Breed')
+    tags = fields.Many2many(
+        comodel_name='farm.tags', inverse_name='animals',
+        string='Tags')
+    lot = fields.One2many(comodel_name='stock.lot_farm.animal',
+                          inverse_name='animal', colum1='lot',
+                          string='lot')
+    number = fields.Char(string='Number',
+                         related='lot.lot.name')
+    location = fields.Many2one(
+        comodel_name='stock.location', string='Current Location',
+        domain=[
+            ('silo', '=', False),
+            ], help='Indicates where the animal currently resides.')
+    farm = fields.Many2one(comodel_name='stock.location',
+                           domain=[('usage', '=', 'view'), ],
+                           string='Current Farm')
+    origin = fields.Selection(selection=ANIMAL_ORIGIN, string='Origin',
+                              required=True)
+    arrival_date = fields.Date(string='Arrival Date',
+                               default=fields.Date.today(),
+                               help="The date this animal arrived (if it"
+                               "was purchased) or when it was born.")
+    initial_location = fields.Many2one(
+        comodel_name='stock.location', string='Initial Location',
+        required=True,
+        domain=[('usage', '=', 'internal'), ('silo', '=', False), ],
+        help="The Location where the animal was reached or where it was "
+        "allocated when it was purchased.\nIt is used as historical "
+        "information and to get Serial Number.")
+    birthdate = fields.Date(string='Birthdate', default=fields.Date.today())
+    removal_date = fields.Date(
+        string='Removal Date', readonly=True,
+        defaulft=fields.Date.today(),
+        help='Get information from the corresponding removal event.')
+    removal_reason = fields.Many2one(comodel_name='farm.removal.reason',
+                                     readonly=True)
+    weight = fields.One2many(comodel_name='farm.animal.weight',
+                             inverse_name='animal', column1='tag',  string='Weigth records',)
+    current_weight = fields.Many2one(comodel_name='farm.animal.weight',
+                                     string='Current Weight',
+                                     compute='get_current_weight')
+    notes = fields.Text(string='Notes')
+    active = fields.Boolean(string='Active', default=True)
+    consumed_feed = fields.Float(string='Consumed Feed (kg)')
+    sex = fields.Selection([('male', "Male"),
+                            ('female', "Female"),
+                            ('undetermined', "Undetermined"),
+                            ], string='Sex', required=True)
+    purpose = fields.Selection([('sale', 'Sale'),
+                                ('replacement', 'Replacement'),
+                                ('unknown', 'Unknown'),
+                                ], string='Purpose', default='unknown')
+    account = fields.Many2one(comodel_name='account.analytic.account',
+                              string='Analytic Account')
+
+    @api.multi
+    def create_first_move(self, res):
+        moves_obj = self.env['stock.move']
+        quant_obj = self.env['stock.quant']
+        for record in res:
+            quant = quant_obj.search([(
+                'lot_id', '=', record.lot.lot.id)])
+            if record.origin == 'raised':
+                if not quant:
+                    raise_location = self.env['stock.location'].search(
+                        [('usage', '=', 'production')])
+                    product_tmpt = record.lot.lot.product_id.product_tmpl_id
+                    new_move = moves_obj.create({
+                        'origin': res.origin,
+                        'name': 'raise-' + record.lot.lot.name,
+                        'create_date': fields.Date.today(),
+                        'date': record.arrival_date,
+                        'product_id': record.lot.lot.product_id.id,
+                        'product_uom_qty': 1,
+                        'product_uom': product_tmpt.uom_id.id,
+                        'location_id': raise_location.id,
+                        'location_dest_id': record.initial_location.id,
+                        'company_id': record.farm.company_id.id,
+                        })
+                    new_move.action_done()
+                    new_move.quant_ids.lot_id = record.lot.lot.id
+                else:
+                    raise Warning(
+                        _('this lot is in use, please create new lot'))
+            elif len(self.lot) > 0:
+                if not quant:
+                    raise Warning(
+                        _('no product in farms for this lot'))
+                elif quant.location_id != record.initial_location:
+                    raise Warning(
+                        _('animal location and product location are diferent'))
+
+    @api.model
+    @api.returns('self', lambda value: value.id)
+    def create(self, vals):
+        res = super(Animal, self).create(vals)
+        self.create_first_move(res)
+        res.location = res.initial_location
+        analy_ac_obj = self.env['account.analytic.account']
+        top_account = analy_ac_obj.search([
+            ('name', '=', res.farm.name)])
+        if not top_account:
+            gen_account = analy_ac_obj.search([
+                ('name', '=', 'General Account')])
+            if not gen_account:
+                gen_account = analy_ac_obj.create({'name': 'General Account'})
+            top_account = analy_ac_obj.create({'name': res.farm.name,
+                                               'parent_id': gen_account.id})
+        new_account = analy_ac_obj.create({
+            'name': 'AA-'+res.type+'-'+res.number,
+            'parent_id': top_account.id})
+        res.account = new_account
+        if res.type == 'female':
+            nom_eti = '-unmated'
+        else:
+            nom_eti = '-fathers'
+        tags_obj = self.env['farm.tags']
+        new_tag = tags_obj.search([
+            ('name', '=', res.farm.name + nom_eti)])
+        if len(new_tag) == 0:
+            new_tag = tags_obj.create({'name': res.farm.name + nom_eti, })
+        res.tags = [(6, 0, [new_tag.id, ])]
+        return res
+
+    @api.one
+    def get_current_weight(self):
+        if self.weight:
+            self.current_weight = self.weight[0].id
+
+
+    @api.multi
+    def name_get(self):
+        result = ''
+        displayName = []
+        for animal in self:
+            if animal.tags:
+                result = ''
+                for tag in animal.tags:
+                    result = result + tag.name + '/'
+                displayName.append(
+                    (animal.id, animal.number + '-' + result))
+            else:
+                displayName.append((animal.id, animal.number))
+        return displayName
+
+
+class AnimalWeight(models.Model):
+    _name = 'farm.animal.weight'
+    _order = 'timestamp DESC'
+    _rec_name = 'weight'
+
+    animal = fields.Many2one(comodel_name='farm.animal', string='Animal',
+                             required=True, ondelete='CASCADE')
+    timestamp = fields.Datetime(string='Date & Time', required=True,
+                                defaulft=fields.Date.today())
+    uom = fields.Many2one(comodel_name='product.uom', string='Uom',
+                          requiered=True, ondelete='CASCADE')
+    weight = fields.Float(string='Weight', digits=(16, 2))
+
+
+class Male(models.Model):
+    _inherit = 'farm.animal'
+
+    extractions = fields.One2many(comodel_name='farm.semen_extraction.event',
+                                  inverse_name='animal',
+                                  string='Semen Extractions')
+    last_extraction = fields.Date(string='Last Extraction', readonly=True,
+                                  compute='get_last_extraction')
+
+    @api.one
+    def get_last_extraction(self):
+        if not self.extractions:
+            return False
+        extraction = self.extractions.search(
+            [('animal', '=', self.id)],
+            order='timestamp DESC')[0]
+        self.last_extraction = extraction.timestamp
+
+
+class Female(models.Model):
+    _inherit = 'farm.animal'
+
+    cycles = fields.One2many(comodel_name='farm.animal.female_cycle',
+                             inverse_name='animal', string='Cycles)')
+    current_cycle = fields.Many2one(comodel_name='farm.animal.female_cycle',
+                                    string='Current Cycle', readonly=True,
+                                    compute='get_current_cycle')
+    state = fields.Selection(selection=[('initial', ''),
+                                        ('prospective', 'Prospective'),
+                                        ('unmated', 'Unmated'),
+                                        ('mated', 'Mated'),
+                                        ('removed', 'Removed'), ],
+                             readonly=True, default='prospective',
+                             help='According to NPPC Production and Financial'
+                             'Standards there are four status for breeding'
+                             'sows The status change is event driven:arrival'
+                             'date, entry date mating event and removal event')
+    first_mating = fields.Date(string='First Mating',
+                               compute='get_first_mating')
+    days_from_insemination = fields.Integer(
+        string='Insemination Days',
+        compute='get_days_from_insemination')
+    last_produced_group = fields.Many2one(comodel_name='farm.animal.group',
+                                          string='Last produced group',
+                                          compute='get_last_produced_group')
+    days_from_farrowing = fields.Integer(string='Unpregnat Days',
+                                         compute='get_days_from_farrowing')
+
+    def is_lactating(self):
+        return (self.current_cycle and
+                self.current_cycle.state == 'lactating' or False)
+
+    @api.multi
+    def get_current_cycle(self):
+        for res in self:
+            if len(res.cycles) > 0:
+                res.current_cycle = res.cycles[-1]
+
+    @api.one
+    def update_state(self):
+        if self.type != 'female':
+            self.state = 'initial'
+        else:
+            if self.removal_date and self.removal_date <= fields.Date.today():
+                state = 'removed'
+            elif (not self.cycles or len(self.cycles) == 1 and
+                    not self.cycles[0].weaning_event and
+                    self.cycles[0].state == 'unmated'):
+                state = 'prospective'
+            elif self.current_cycle and self.current_cycle.state == 'unmated':
+                state = 'unmated'
+            else:
+                state = 'mated'
+            self.state = state
+
+    @api.one
+    def get_first_mating(self):
+        InseminationEvent = self.env['farm.insemination.event']
+        if self.type != 'female':
+            self.first_mating = False
+        else:
+            first_inseminations = InseminationEvent.search([
+                ('animal', '=', self.id),
+                ], limit=1, order='timestamp ASC')
+            if not first_inseminations:
+                self.first_mating = False
+            else:
+                first_insemination, = first_inseminations
+                self.first_mating = first_insemination.timestamp
+
+    @api.one
+    def get_days_from_insemination(self):
+        InseminationEvent = self.env['farm.insemination.event']
+        last_valid_insemination = InseminationEvent.search([
+            ('animal', '=', self.id),
+            ('state', '=', 'validated'),
+            ], order='timestamp DESC', limit=1)
+        if not last_valid_insemination:
+            self.days_from_insemination = False
+        else:
+            val_in = datetime.strptime(
+                last_valid_insemination[0].timestamp, DFORMAT)
+            days_from_insemination = (
+                datetime.today() - val_in).days
+            self.days_from_insemination = days_from_insemination
+
+    @api.one
+    def get_last_produced_group(self):
+        FarrowingEvent = self.env['farm.farrowing.event']
+        last_farrowing_events = FarrowingEvent.search([
+            ('animal', '=', self.id),
+            ('state', '=', 'validated'),
+            ('produced_group', '!=', None),
+            ], order='timestamp DESC', limit=1)
+        if last_farrowing_events:
+            self.last_produced_group = \
+                last_farrowing_events[0].produced_group.id
+        else:
+            self.last_produced_group = False
+
+    @api.one
+    def get_days_from_farrowing(self):
+        FarrowingEvent = self.env['farm.farrowing.event']
+        last_valid_farrowing = FarrowingEvent.search([
+            ('animal', '=', self.id),
+            ('state', '=', 'validated'),
+            ], order='timestamp DESC', limit=1)
+        if not last_valid_farrowing:
+            self.days_from_farrowing = False
+        else:
+            last_val_farrow = datetime.strptime(
+                last_valid_farrowing[0].timestamp, DFORMAT)
+            days_from_farrowing = (
+                datetime.today() - last_val_farrow).days
+            self.days_from_farrowing = days_from_farrowing
+
+
+class FemaleCycle(models.Model):
+    _name = 'farm.animal.female_cycle'
+    _order = 'ordination_date ASC'
+    _rec_name = 'sequence'
+
+    animal = fields.Many2one(comodel_name='farm.animal', string='Female',
+                             required=True, domain=['type', '=', 'female'])
+    sequence = fields.Integer(string='Nun. cycle')
+    ordination_date = fields.Datetime('Date for ordination', requiered=True,
+                                      default=fields.Datetime.now())
+    state = fields.Selection(selection=[
+        ('mated', 'Mated'), ('pregnat', 'Pregnat'),
+        ('lactating', 'Lactating'), ('unmated', 'Unmated')],
+        readonly=True, required=True, default='unmated')
+    insemination_events = fields.One2many(
+        comodel_name='farm.insemination.event',
+        inverse_name='female_cycle', string='Inseminations')
+    days_between_wearing_and_insemination = fields.Integer(
+        string='Unmated Days',
+        compute='get_days_between_weaning_and_insemination')
+    diagnosis_events = fields.One2many(
+        comodel_name='farm.pregnancy_diagnosis.event',
+        inverse_name='female_cycle', string='Diagnosis')
+    pregnant = fields.Boolean(string='Pregnat',
+                              compute='on_change_whith_pregnant')
+    abort_event = fields.One2many(comodel_name='farm.abort.event',
+                                  inverse_name='female_cycle',
+                                  string='Abort')
+    farrowing_event = fields.One2many(
+        comodel_name='farm.farrowing.event_female_cycle',
+        inverse_name='cycle', column1='female_cycle.event', string='Farrowing',
+        readonly=True)
+    live = fields.Integer(string='Live', compute='get_live')
+    dead = fields.Integer(string='Dead', compute='get_dead')
+    foster_events = fields.One2many(comodel_name='farm.foster.event',
+                                    inverse_name='female_cycle',
+                                    string='Fosters')
+    fostered = fields.Integer(string='Fostered',
+                              compute='on_change_with_fostered',
+                              store=True)
+    weaning_event = fields.One2many(
+        comodel_name='farm.weaning.event_female_cycle',
+        inverse_name='cycle', column1='event', readonly=True)
+    weared = fields.Integer(string='Weared', compute='get_weaned')
+    removed = fields.Integer(
+        string='Removed Quantity',
+        help='Number of removed animals from Produced Group. Diference '
+        'between born live and weaned, computing Fostered diference.',
+        compute='get_removed')
+    days_between_farrowing_weaning = fields.Integer(
+        string='Lactating Days',
+        help='Number of days between Farrowing and Weaning.',
+        compute='get_lactating_days')
+
+    @api.one
+    def update_state(self, validated_event):
+        '''
+        Sorted rules:
+        - A cycle will be considered 'unmated'
+          if weaning_event_id != False and weaning_event.state == 'validated'
+          or if abort_event != False has abort_event.state == 'validated'
+          or has not any validated event in insemination_event_ids.
+        - A female will be considered 'lactating'
+          if farrowing_event_id!=False and farrowing_event.state=='validated'
+        - A female will be considered 'pregnant' if there are more than one
+          diagnosis in 'validated' state and the last one has a positive result
+        - A female will be considered 'mated' if there are any items in
+          insemination_event_ids with 'validated' state.
+        '''
+        def check_event(event_to_check):
+            return(type(event_to_check) == type(validated_event) and
+                   event_to_check == validated_event or
+                   event_to_check.state == 'validated')
+
+        state = 'unmated'
+        if (self.abort_event and check_event(self.abort_event) or
+                self.weaning_event and check_event(self.weaning_event.event)):
+            state = 'unmated'
+        elif self.farrowing_event and check_event(self.farrowing_event.event):
+            if self.farrowing_event.event.live > 0:
+                state = 'lactating'
+            else:
+                state = 'unmated'
+        elif self.pregnant:
+            state = 'pregnat'
+        else:
+            for insemination_event in self.insemination_events:
+                if check_event(insemination_event):
+                    state = 'mated'
+                    break
+        self.state = state
+        self.animal.update_state()
+        self.state = state
+
+    @api.model
+    @api.returns('self', lambda value: value.id)
+    def create(self, vals):
+        res = super(FemaleCycle, self).create(vals)
+        femaleCycle_obj = self.env['farm.animal.female_cycle']
+        cycles = femaleCycle_obj.search([
+            ('animal.id', '=', res.animal.id), ])
+        secuence = 1
+        for cycle in cycles:
+            if len(cycle.farrowing_event) != 0:
+                secuence += 1
+        res.sequence = secuence
+        return res
+
+    @api.one
+    def get_days_between_weaning_and_insemination(self):
+        if not self.insemination_events:
+            return False
+        previous_cycles = self.search([
+            ('animal', '=', self.animal.id),
+            ('sequence', '<=', self.sequence),
+            ('id', '!=', self.id)
+            ],
+            order='sequence, ordination_date DESC', limit=1)
+        if len(previous_cycles) < 1 or (
+                not previous_cycles[0].weaning_event and
+                not previous_cycles[0].abort_event):
+            self.days_between_wearing_and_insemination = 0
+        else:
+            previous_date = (
+                datetime.strptime(
+                    previous_cycles[0].weaning_event.event.timestamp, DFORMAT)
+                if previous_cycles[0].weaning_event
+                else datetime.strptime(
+                    previous_cycles[0].abort_event.timestamp, DFORMAT))
+            insemination_date = \
+                datetime.strptime(
+                    self.insemination_events[0].timestamp, DFORMAT)
+            self.days_between_wearing_and_insemination = \
+                (insemination_date - previous_date).days
+
+    @api.one
+    def get_live(self):
+        if self.farrowing_event:
+            self.live = self.farrowing_event[-1].cycle.live
+        else:
+            self.live = False
+
+    @api.one
+    def get_dead(self):
+        if self.farrowing_event:
+            self.live = self.farrowing_event[-1].cycle.dead
+        else:
+            self.live = False
+
+    @api.one
+    def on_change_with_fostered(self):
+        self.fostered = sum(e.quantity for e in self.foster_events)
+
+    @api.one
+    def get_weaned(self):
+        self.weared = self.weaning_event and \
+            self.weaning_event.event.quantity or 0
+
+    @api.one
+    def get_removed(self):
+        self.removed = self.live + self.fostered - self.weared
+
+    @api.one
+    def get_lactating_days(self):
+        if not self.farrowing_event or not self.weaning_event:
+            return None
+        w_e = datetime.strptime(
+            self.weaning_event[-1].event.timestamp, DFORMAT)
+        f_e = datetime.strptime(
+            self.farrowing_event[-1].event.timestamp, DFORMAT)
+        self.days_between_farrowing_weaning = (w_e-f_e).days
+
+    @api.one
+    @api.onchange('abort_event', 'diagnosis_events', 'farrowing_event')
+    def on_change_whith_pregnant(self):
+        if self.abort_event:
+            self.pregnant = False
+        elif not self.diagnosis_events:
+            self.pregnant = False
+        elif self.farrowing_event:
+            self.pregnant = False
+        else:
+            self.pregnant = \
+                self.diagnosis_events[-1].result == 'positive'
+
+    @api.one
+    @api.onchange('pregnant')
+    def on_change_pregnant(self):
+        if self.pregnant:
+            self.state = 'pregnat'
+
+    def get_last_produced_group(self):
+        farrowingEvent_obj = self.env['farm.farrowing.event']
+        last_farrowing_events = farrowingEvent_obj.search([
+            ('animal', '=', self),
+            ('state', '=', 'validated'),
+            ('produced_group', '!=', None),
+            ],
+            order='timestamp DESC', limit=1)
+        if last_farrowing_events:
+            return last_farrowing_events[0].produced_group.id
+        return None

BIN
models/animal.pyc


+ 370 - 0
models/animal_group.py

@@ -0,0 +1,370 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api, _
+from openerp.exceptions import Warning
+from datetime import datetime
+
+
+DFORMAT = "%Y-%m-%d %H:%M:%S"
+DFORMAT2 = "%Y-%m-%d"
+
+
+class AnimalGroup(models.Model):
+    _name = 'farm.animal.group'
+    _order = 'arrival_date desc'
+
+    mother = fields.Char(string='Mother', compute='get_mother')
+    specie = fields.Many2one(comodel_name='farm.specie', string='Specie',
+                             required=True)
+    breed = fields.Many2one(comodel_name='farm.specie.breed', string='Breed')
+    lot = fields.One2many(comodel_name='stock.lot_farm.animal.group',
+                          inverse_name='animal_group', column1='lot',
+                          string='Lot')
+    number = fields.Char(string='Number', compute='get_number', store=True)
+    location = fields.Many2one(comodel_name='stock.location',
+                               string='Current location',
+                               domain=[('usage', '!=', 'view'), ])
+    farm = fields.Many2one(comodel_name='stock.location',
+                           string='Current Farm',
+                           domain=[('usage', '=', 'view')])
+    quantity = fields.Integer(string='Quantity')
+    origin = fields.Selection([('purchased', 'Purchased'),
+                               ('raised', 'Raised'), ], string='Origin',
+                              required=True,
+                              default='purchased',
+                              help='Raised means that this group was born in'
+                              'the farm. Otherwise, it was purchased.')
+    arrival_date = fields.Date(string='Arrival Date',
+                               default=fields.Date.today(),
+                               help="The date this group arrived (if it was"
+                               "purchased) or when it was born.")
+    """
+    purchase_shipment = fields.Many2one(comodel_name='stock.shipment.in',
+                                       string='Purchase Shipment',
+                                       readonly=True)
+    """
+    initial_location = fields.Many2one(comodel_name='stock.location',
+                                       string='Initial location',
+                                       required=True,
+                                       domain=[('usage', '=', 'internal'),
+                                               ('silo', '=', False), ],
+                                       help="The Location where the group was"
+                                       "reached or where it was allocated when"
+                                       "it was purchased.\nIt is used as"
+                                       "historical information and to get"
+                                       "Serial Number.")
+    initial_quantity = fields.Integer(string='Initial quantity', required=True,
+                                      help="The number of animals in group"
+                                      "when it was reached or purchased.\nIt"
+                                      "is used as historical information and"
+                                      "to create the initial move.")
+    removal_date = fields.Date(string='Removal date', readonly=True)
+    weights = fields.One2many(comodel_name='farm.animal.group.weight',
+                              inverse_name='party', column1='tag',
+                              string='Weights')
+    current_weight = fields.Many2one(comodel_name='farm.animal.group.weight',
+                                     string='Current weight',
+                                     compute='on_change_with_current_weight')
+    tags = fields.Many2many(comodel_name='farm.tags',
+                            inverse_name='animal_group', string='Tag')
+    notes = fields.Text(string='Notes')
+    active = fields.Boolean(string='Active', default=True)
+    feed_quantity = fields.Float(string='cumulative consumed feed')
+    consumed_feed = fields.Float(string='Consumed Feed per Animal (kg)',
+                                 compute='get_consumed_feed')
+    state = fields.Selection(selection=[
+        ('lactating', 'Lactating'), ('transition', 'Transition'),
+        ('fatten', 'Faten up'), ('sold', 'Sold')],
+        readonly=True, default='fatten')
+    transition_days = fields.Integer(string='Days in Transition',
+                                     compute='get_transit_days')
+    fattening_days = fields.Integer(string='Days in fatening',
+                                    compute='get_fattenig_days')
+    account = fields.Many2one(comodel_name='account.analytic.account',
+                              string='Analytic Account')
+    fatten_date = fields.Date(string='fatten day', compute='_get_fatten_day',
+                              store=True)
+    weaning_day = fields.Datetime(string='weaning_day', compute='get_weaning_day')
+
+    @api.multi
+    def get_transformations(self):
+        tranform_obj = self.env['farm.trasformation.event']
+        for res in self:
+            for lot in res.lot:
+                transforms = tranform_obj.search([
+                    '|', ('animal_group', '=', res.id),
+                    ('to_animal_group', '=', )])
+    
+    @api.multi
+    def show_feed_event_from_group(self):
+        feed_ev_obj = self.env['farm.feed.event']
+        ids = []
+        for res in self:
+            for lot in res.lot:
+                print res.lot
+                feed_evts = feed_ev_obj.search([
+                    ('lot', '=', lot.lot.id)])
+                for event in feed_evts:
+                    ids.append(event.id)
+            res = {'view_mode': 'tree,form',
+                   'res_model': 'farm.feed.event',
+                   'view_id': False,
+                   'type': 'ir.actions.act_window',
+                   'view_type': 'form',
+                   'domain': [('id', 'in', ids)]}
+            return res
+
+    @api.multi
+    def get_mother(self):
+        farrow = self.env['farm.farrowing.event_group']
+        for res in self:
+            group_farrow = farrow.search([
+                ('animal_group', '=', res.id)])
+            if len(group_farrow)!= 0:
+                res.mother = group_farrow.event.animal.number
+            else:
+                res.mother = '*'
+
+    @api.one
+    def get_weaning_day(self):
+        if self.state != 'lactating':
+            weaning_obj = self.env['farm.weaning.event']
+            wean = weaning_obj.search([
+                ('farrowing_group', '=', self.id)])
+            if len(wean) != 0:
+                self.weaning_day = datetime.strptime(wean.timestamp, DFORMAT)
+
+    @api.multi
+    @api.depends('location', 'state')
+    def _get_fatten_day(self):
+        for res in self:
+            if res.state not in ('lactating', 'transition'):
+                transformation_obj = self.env['farm.transformation.event']
+                transition_location = []
+                for loc in res.specie.lost_found_location:
+                    transition_location.append(loc.location.id)
+                transition = transformation_obj.search([
+                    ('animal_group', '=', res.id),
+                    ('from_location.id', 'in', transition_location),
+                    ('to_location.id', 'not in', transition_location)])
+                if transition:
+                    res.fatten_date = transition[-1].timestamp
+                else:
+                    res.fatten_date = res.arrival_date
+
+    @api.one
+    def get_transit_days(self):
+        if self.state == 'lactating':
+            self.transition_days = 0
+        elif self.state == 'transition':
+            weaning_obj = self.env['farm.weaning.event']
+            wean = weaning_obj.search([
+                ('farrowing_group', '=', self.id)])
+            if wean:
+                wean_day = datetime.strptime(wean.timestamp, DFORMAT)
+                self.transition_days = (datetime.today() - wean_day).days
+            else:
+                ref_day = datetime.strptime(self.arrival_date, DFORMAT2)
+                self.transition_days = (datetime.today() - ref_day).days
+        else:
+            weaning_obj = self.env['farm.weaning.event']
+            transformation_obj = self.env['farm.transformation.event']
+            wean = weaning_obj.search([
+                ('farrowing_group', '=', self.id)])
+            if len(wean) != 0:
+                wean_day = datetime.strptime(wean.timestamp, DFORMAT)
+            else:
+                wean_day = datetime.strptime(self.arrival_date, DFORMAT2)  
+            transition_location = []
+            for loc in self.specie.lost_found_location:
+                transition_location.append(loc.location.id)
+            transition = transformation_obj.search([
+                ('animal_group', '=', self.id),
+                ('from_location.id', 'in', transition_location),
+                ('to_location.id', 'not in', transition_location)])
+            if transition:
+                transition_finish = datetime.strptime(
+                    transition[-1].timestamp, DFORMAT)
+                self.transition_days = (transition_finish - wean_day).days
+            else:
+                self.transition_days = 0
+
+    @api.one
+    def get_fattenig_days(self):
+        if self.state == 'lactating' or self.state == 'transition':
+            self.fattening_days = 0
+        else:
+            transformation_obj = self.env['farm.transformation.event']
+            transition_location = []
+            for loc in self.specie.lost_found_location:
+                transition_location.append(loc.location.id)
+            transition = transformation_obj.search([
+                ('animal_group', '=', self.id),
+                ('from_location.id', 'in', transition_location),
+                ('to_location.id', 'not in', transition_location)])
+            if len(transition) == 0:
+                transition_finish = datetime.strptime(
+                    self.arrival_date, '%Y-%m-%d')
+            else:
+                transition_finish = datetime.strptime(
+                    transition[-1].timestamp, DFORMAT)
+            if self.state == 'fatten':
+                self.fattening_days = (
+                    datetime.today() - transition_finish).days
+            else:
+                moves_obj = self.env['farm.move.event']
+                sale_move = moves_obj.search([
+                    ('animal_group', '=', self.id)])
+                sale_day = datetime.strptime(
+                    sale_move[-1].timestamp, DFORMAT)
+                self.fattening_days = (sale_day - transition_finish).days
+
+    @api.multi
+    def create_first_move(self, res):
+        moves_obj = self.env['stock.move']
+        quant_obj = self.env['stock.quant']
+        for record in res:
+            if not record.lot:
+                        production_lot_obj = self.env['stock.production.lot']
+                        animal_group_lot_obj = \
+                            self.env['stock.lot_farm.animal.group']
+                        new_lot = production_lot_obj.create({
+                            'product_id': res.specie.group_product.id,
+                            'animal_type': 'group',
+                            })
+                        animal_group_lot_obj.create({
+                            'lot': new_lot.id,
+                            'animal_group': res.id})
+            quant = quant_obj.search([
+                ('lot_id', '=', record.lot[0].lot.id),
+                ('location_id', '=', record.initial_location.id)
+                ])
+            record.location = record.initial_location
+            if len(record.lot) > 1:
+                    raise Warning(
+                        _('lots can not be mixed in an initial group, create a'
+                          ' group for each lot and then group them into the'
+                          ' desired group'))
+            elif record.origin == 'raised':
+                if not quant:
+                    raise_location = self.env['stock.location'].search(
+                        [('usage', '=', 'production')])
+                    uom = record.lot.lot.product_id.product_tmpl_id.uom_id.id
+                    new_move = moves_obj.create({
+                        'name': 'raise-' + record.lot[0].lot.name,
+                        'create_date': fields.Date.today(),
+                        'date': record.arrival_date,
+                        'product_id': record.lot[0].lot.product_id.id,
+                        'product_uom_qty': record.initial_quantity,
+                        'product_uom': uom,
+                        'location_id': raise_location.id,
+                        'location_dest_id': record.initial_location.id,
+                        'company_id': record.initial_location.company_id.id,
+                        })
+                    new_move.action_done()
+                    new_move.quant_ids.lot_id = record.lot[0].lot.id
+                else:
+                    raise Warning(
+                        _('this lot iis in use, please create new lot'))
+            else:
+                if not quant:
+                    raise Warning(
+                        _('no product in farms for this lot'))
+                target_quant = False
+                for q in quant:
+                    if q.location_id == record.initial_location:
+                        if q.qty >= record.initial_quantity:
+                            target_quant = q
+                if not target_quant:
+                    raise Warning(
+                        _('group intial quantity and product quantity '
+                          'are diferent'))
+                an_group = self.env['farm.animal.group'].search([
+                    ('lot.lot.id', '=', record.lot.lot.id),
+                    ('id', '!=', record.id)])
+                if len(an_group) > 0:
+                    raise Warning(
+                        _('this lot is in use from oder group'))
+
+    @api.model
+    @api.returns('self', lambda value: value.id)
+    def create(self, vals):
+        res = super(AnimalGroup, self).create(vals)
+        self.create_first_move(res)
+        res.quantity = res.initial_quantity
+        analy_ac_obj = self.env['account.analytic.account']
+        top_account = analy_ac_obj.search([
+            ('name', '=', res.farm.name)])
+        if not top_account:
+            gen_account = analy_ac_obj.search([
+                ('name', '=', 'General Account')])
+            if not gen_account:
+                gen_account = analy_ac_obj.create({'name': 'General Account'})
+            top_account = analy_ac_obj.create({'name': res.farm.name,
+                                               'parent_id': gen_account.id})
+        new_account = analy_ac_obj.create({
+            'name': 'AA-group-'+res.number,
+            'parent_id': top_account.id})
+        res.account = new_account
+        return res
+
+    @api.multi
+    def name_get(self):
+        result = ''
+        displayName = []
+        for group in self:
+            if group.tags:
+                displayName.append(
+                    (group.id, group.number + '-' +group.tags[0].name))
+            else:
+                displayName.append((group.id, group.number))
+        return displayName
+
+    @api.multi
+    @api.depends('lot')
+    def get_number(self):
+        for group in self:
+            result = '*'
+            if len(group.lot) > 2:
+                result = group.lot[2].lot.name
+            elif len(group.lot) > 0:
+                result = group.lot[0].lot.name
+            group.number = result
+
+    def get_locations(self):
+        return False
+
+    @api.one
+    def on_change_with_current_weight(self):
+        if self.weights:
+            self.current_weight = self.weights[0].id
+
+    @api.one
+    def get_consumed_feed(self):
+        if self.quantity == 0:
+            self.consumed_feed = self.feed_quantity/self.initial_quantity
+        else:
+            self.consumed_feed = self.feed_quantity/self.quantity
+
+
+class AnimalGroupWeight(models.Model):
+    _name = 'farm.animal.group.weight'
+    _order = 'timestamp DESC'
+    rec_name = 'weight'
+
+    party = fields.Many2one(comodel_name='farm.animal.group',
+                            string='Group', ondelete='CASCADE',
+                            required=True)
+    timestamp = fields.Datetime(string='Date & time',
+                                default=fields.Datetime.now())
+    quantity = fields.Integer(string='Number of individuals', required=True)
+    uom = fields.Many2one(comodel_name='product.uom', string='Uom')
+    weight = fields.Float(string='Weihht', digits=(3, 2), required=True)
+
+    @api.onchange('timestamp')
+    def get_defaults(self):
+        if self.party is not False:
+            self.quantity = self.party.quantity

BIN
models/animal_group.pyc


+ 210 - 0
models/consume_stock.py

@@ -0,0 +1,210 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2016  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api
+
+
+class ConsumeStock(models.Model):
+    _name = 'farm.consume.stock'
+
+    state = fields.Selection([('draft', 'Draft'), ('confirmed', 'Confirmed')],
+                             default='draft')
+    type = fields.Selection([('farm', 'Farm'), ('yard', 'Yard')],
+                            string='Distribution Type')
+    origin = fields.Many2one(string='Origin',
+                             comodel_name='stock.location')
+    to_location = fields.Many2one(string='Destinity',
+                                  comodel_name='stock.location')
+    product_id = fields.Many2one(string='Product',
+                                 comodel_name='product.product')
+    lot_id = fields.Many2one(string='Lot', comodel_name='stock.production.lot')
+    quantity = fields.Float(string='Quantity')
+    date = fields.Date(string='Date', defaut=fields.Date.today())
+
+    @api.multi
+    @api.onchange('type')
+    def onchange_type(self):
+        for res in self:
+            if res.type and res.type == 'farm':
+                return {'domain': {'to_location': [('usage', '=', 'view')]}}
+            else:
+                return {'domain': {'to_location': [('usage', '!=', 'view')]}}
+
+    @api.multi
+    @api.onchange('origin')
+    def onchange_location(self):
+        for res in self:
+            ids = []
+            quants = self.env['stock.quant'].search([
+                ('location_id', '=', res.origin.id),
+                ('qty', '>', 0)
+                ])
+            for q in quants:
+                ids.append(q.product_id.id)
+            return {'domain': {'product_id': [('id', 'in', ids)]}}
+
+    @api.multi
+    @api.onchange('product_id')
+    def onchange_product(self):
+        for res in self:
+            ids = []
+            quants = self.env['stock.quant'].search([
+                ('location_id', '=', res.origin.id),
+                ('product_id', '=', res.product_id.id)])
+            for q in quants:
+                ids.append(q.lot_id.id)
+            return {'domain': {
+                        'lot_id': [('id', 'in', ids)]}}
+    @api.multi
+    @api.onchange('lot_id')
+    def on_change_lot(self):
+        for res in self:
+            quants = self.env['stock.quant'].search([
+                ('location_id', '=', res.origin.id),
+                ('product_id', '=', res.product_id.id),
+                ('lot_id', '=', res.lot_id.id)])
+            total = 0
+            for q in quants:
+                total = total + q.qty
+            res.quantity = total
+
+    @api.multi
+    def get_cost(self, lot, qty, product_id):
+        cost = 0
+        if lot and lot.unit_cost and lot.unit_cost > 0:
+            cost = lot.unit_cost * qty
+        else:
+            if lot:
+                quants_obj = self.env['stock.quant']
+                quants = quants_obj.search([
+                    ('lot_id', '=', lot.id)])
+                ids = []
+                for q in quants:
+                    ids.append(q.id)
+                moves = self.env['stock.move'].with_context({}).search([
+                    ('quant_ids', 'in', ids),
+                    ('picking_id', '!=', False)])
+                amount = 0.0
+                raw_qty = 0
+                for mov in moves:
+                    if mov.price_unit > 0:
+                        amount += mov.price_unit * mov.product_qty
+                        raw_qty = raw_qty + mov.product_qty
+                if raw_qty > 0:
+                    unit_price = amount/raw_qty
+                    cost += qty * unit_price
+                if cost == 0:
+                    cost = lot.product_id.product_tmpl_id.list_price * qty
+            else:
+                cost = product_id.product_tmpl_id.list_price * qty
+        return cost
+
+    @api.multi
+    def confirm(self):
+        moves_obj = self.env['stock.move']
+        quants_obj = self.env['stock.quant']
+        scrap = self.env['stock.location'].search(
+            [('scrap_location', '=', True)])[0]
+        for res in self:
+            species = self.env['farm.specie'].search(
+                [(True, '=', True)])
+            remov_locs = []
+            for specie in species:
+                remov_locs.append(specie.removed_location.id)
+            if res.type == 'farm':
+                condition = ('farm', '=', res.to_location.id)
+            else:
+                condition = ('location', '=', res.to_location.id)
+            afected_ani = self.env['farm.animal'].search([
+                condition, ('location', 'not in', remov_locs)])
+            afected_gro = self.env['farm.animal.group'].search([
+                condition, ('state', '!=', 'sold'),
+                ('location', 'not in', remov_locs)])
+            afected_animals = [afected_gro, afected_ani]
+            num_ani = len(afected_ani)
+            for party in afected_gro:
+                num_ani = num_ani + party.quantity
+            cost = self.get_cost(res.lot_id, res.quantity, res.product_id)
+            if num_ani > 0:
+                cost_p_an = cost/num_ani
+                for gro in afected_gro:
+                    self.set_party_cost(gro, res.date, cost_p_an)
+                for an in afected_ani:
+                    self.set_animal_cost(an, res.date, cost_p_an)
+            else:
+                if res. type == 'farm':
+                    farm = res.to_location
+                else:
+                    farm = self.get_farm(res.to_location)
+                analitic_remain_ob = self.env['purchase.analitic.remain']
+                analitic_remain = analitic_remain_ob.search([
+                        ('farm', '=', farm.id)])
+                if len(analitic_remain) == 0:
+                    analitic_remain_ob.create({
+                        'farm': farm.id,
+                        'quantity': cost})
+                else:
+                    analitic_remain.quantity = analitic_remain.quantity\
+                        + cost
+            consumed_quants = []
+            if res.lot_id:
+                consumed_quants = quants_obj.search([
+                        ('lot_id', '=', res.lot_id.id),
+                        ('location_id', '=', res.origin.id)])
+            new_move = moves_obj.create({
+                'name': 'consume',
+                'create_date': fields.Date.today(),
+                'date': res.date,
+                'product_id': res.product_id.id,
+                'product_uom_qty': res.quantity,
+                'product_uom': res.product_id.product_tmpl_id.uom_id.id,
+                'location_id': res.origin.id,
+                'location_dest_id': scrap.id,
+                'company_id': res.origin.company_id.id,
+                })
+            for q in consumed_quants:
+                q.reservation_id = new_move.id
+            new_move.action_done()
+            res.state = 'confirmed'
+
+    def get_farm(self, location):
+        while(location.location_id.id != 1):
+            location = location.location_id
+        return location
+
+    @api.multi
+    def set_party_cost(self, party, date, cost_per_animal_day):
+        company = self.env['res.company'].with_context({}).search([
+            ('id', '=', 1)])
+        journal = self.env['account.analytic.journal'].with_context(
+            {}).search([('code', '=', 'PUR')])
+        analytic_line_obj = self.env['account.analytic.line']
+        analytic_line_obj.create({
+            'name': 'consum',
+            'date': date,
+            'amount': -(cost_per_animal_day * party.quantity),
+            'unit_amount': party.quantity,
+            'account_id': party.account.id,
+            'general_account_id': company.feed_account.id,
+            'journal_id': journal.id,
+            })
+
+    @api.multi
+    def set_animal_cost(self, animal, date, cost_per_animal_day):
+        company = self.env['res.company'].with_context({}).search([
+            ('id', '=', animal.farm.company_id.id)])
+        journal = self.env['account.analytic.journal'].with_context(
+            {}).search([('code', '=', 'PUR')])
+        analytic_line_obj = self.env['account.analytic.line']
+        analytic_line_obj.create({
+            'name': 'consum',
+            'date': date,
+            'amount': -cost_per_animal_day,
+            'unit_amount': 1,
+            'account_id': animal.account.id,
+            'general_account_id': company.feed_account.id,
+            'journal_id': journal.id,
+            })
+            

BIN
models/consume_stock.pyc


+ 147 - 0
models/event_order.py

@@ -0,0 +1,147 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api, _
+from openerp.exceptions import Warning
+
+EVENT_STATES = [
+    ('draft', 'Draft'),
+    ('validated', 'Validated'),
+    ]
+
+
+class EventOrder(models.Model):
+    _name = 'farm.event.order'
+    _order = 'timestamp DESC'
+
+    name = fields.Char(string='Reference', select=True)
+    state = fields.Selection(string='State', selection=EVENT_STATES,
+                             default='draft')
+    animal_type = fields.Selection([
+        ('male', 'Male'),
+        ('female', 'Female'),
+        ('individual', 'Individual'),
+        ('group', 'Group'),
+        ], string='Animal Type',
+        select=True)
+    specie = fields.Many2one(comodel_name='farm.specie', string='Specie',
+                             select=True, required=True)
+    event_type = fields.Selection([
+        ('medication', 'Medications'),
+        ('insemination', 'Inseminations'),
+        ('pregnancy_diagnosis', 'Pregnancy Diagnosis'),
+        ('abort', 'Aborts'),
+        ('farrowing', 'Farrowings'),
+        ('foster', 'Fosters'),
+        ('feed', 'Feed'),
+        ('weaning', 'Weanings'),
+        ('trasformation_event', 'Trasformation Event'),
+        ], string="Event Type", required=True, select=True)
+    farm = fields.Many2one(comodel_name='stock.location', string='Farm',
+                           required=True,
+                           domain=[('usage', '=', 'view'), ])
+    timestamp = fields.Datetime(string='Date & Time', requiered=True,
+                                default=fields.Datetime.now())
+    employee = fields.Many2one(comodel_name='res.users', string='Employee',
+                               help='Employee that did the job.')
+    medication_events = fields.One2many(comodel_name='farm.medication.event',
+                                        inverse_name='job_order',
+                                        string='Medication')
+    insemination_events = fields.One2many(
+        comodel_name='farm.insemination.event', inverse_name='job_order',
+        string='Insemination')
+    pregnancy_diagnosis_events = fields.One2many(
+        comodel_name='farm.pregnancy_diagnosis.event',
+        inverse_name='job_order',
+        string='Pregnanci Diagnosis')
+    abort_events = fields.One2many(comodel_name='farm.abort.event',
+                                   inverse_name='job_order',
+                                   string='Abort Events')
+    farrowing_events = fields.One2many(comodel_name='farm.farrowing.event',
+                                       inverse_name='job_order',
+                                       string='Farrowings')
+    foster_events = fields.One2many(comodel_name='farm.foster.event',
+                                    inverse_name='job_order',
+                                    string='Fosters')
+    weaning_events = fields.One2many(comodel_name='farm.weaning.event',
+                                     inverse_name='job_order',
+                                     string='weaning')
+    feed_events = fields.One2many(comodel_name='farm.feed.event',
+                                  inverse_name='job_order',
+                                  column1='feed_inventory',
+                                  string='feed')
+    trasformation_events = fields.One2many(
+        comodel_name='farm.transformation.event',
+        inverse_name='job_order', string='Tasformation Events')
+    notes = fields.Text(string='Notes')
+
+    @api.model
+    @api.returns('self', lambda value: value.id)
+    def create(self, vals):
+        farm_line = self.env['farm.specie.farm_line'].search([
+            ('farm', '=', vals['farm'])])
+        if len(farm_line)==0:
+            vals['name'] = '*'
+        else:
+            '''
+            vals['name'] = farm_line[0].event_order_sequence.get(
+                farm_line[0].event_order_sequence[0].code)
+                '''
+            vals['name'] = farm_line.event_order_sequence.get_id(
+                farm_line.event_order_sequence.id)
+        res = super(EventOrder, self).create(vals)
+        return res
+
+    def get_active_events(self):
+        if self.event_type == 'medication':
+            active_events = self.medication_events
+        elif self.event_type == 'insemination':
+            active_events = self.insemination_events
+        elif self.event_type == 'pregnancy_diagnosis':
+            active_events = self.pregnancy_diagnosis_events
+        elif self.event_type == 'abort':
+            active_events = self.abort_events
+        elif self.event_type == 'farrowing':
+            active_events = self.farrowing_events
+        elif self.event_type == 'foster':
+            active_events = self.foster_events
+        elif self.event_type == 'feed':
+            active_events = self.feed_events
+        elif self.event_type == 'weaning':
+            active_events = self.weaning_events
+        elif self.event_type == 'trasformation_event':
+            active_events = self.trasformation_events
+        return active_events
+
+    @api.one
+    def confirm(self):
+        if(self.confirm_event(self.get_active_events())):
+                self.state = 'validated'
+        else:
+            raise Warning(
+                _('There are no event associated with this work order'))
+
+    def confirm_event(self, event_type):
+        events = event_type.search([('state', '=', 'draft'),
+                                    ('job_order', '=', self.id)])
+        control = False
+        for event in events:
+            if event.farm.id != self.farm.id:
+                raise Warning(
+                    _('The values of farm are diferent on order and events'))
+            elif self.animal_type:
+                if event.animal_type != self.animal_type:
+                    if self.event_type != 'medication':
+                        raise Warning(
+                            _('The values of animal type are diferent on order'
+                              ' and events'))
+            if event.specie != self.specie:
+                raise Warning(
+                    _('The values of specie are diferent on order and events'))
+            else:
+                control = event.confirm()
+                if control is None:
+                    control = False
+        return control

BIN
models/event_order.pyc


+ 207 - 0
models/farrowing_event.py

@@ -0,0 +1,207 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api, _
+from openerp.exceptions import Warning
+
+
+class FarrowingProblem(models.Model):
+    _name = 'farm.farrowing.problem'
+
+    name = fields.Char(string='Name', required=True, traslate=True)
+
+
+class FarrowingEvent(models.Model):
+    _name = 'farm.farrowing.event'
+    _inherit = {'farm.event.import.mixin': 'ImportedEventMixin_id'}
+    _rec_name = 'animal'
+    _auto = True
+
+    live = fields.Integer(string='Live')
+    stillborn = fields.Integer(string='Stillborn')
+    mummified = fields.Integer(string='Mummified')
+    dead = fields.Integer(string='Dead', compute='get_dead')
+    problem = fields.Many2one(comodel_name='farm.farrowing.problem',
+                              string='Problem')
+    female_cycle = fields.One2many(
+        comodel_name='farm.farrowing.event_female_cycle',
+        inverse_name='event', column1='cycle',
+        string='Female Cycle')
+    produced_group = fields.One2many(
+        comodel_name='farm.farrowing.event_group',
+        inverse_name='event', column1='animal_group', string='Produced Group')
+    move = fields.Many2one(comodel_name='stock.move', string='Stock Move')
+
+    @api.one
+    def get_dead(self):
+        self.dead = (self.stillborn or 0) + (self.mummified or 0)
+
+    @api.one
+    def confirm(self):
+        if not self.is_compatible():
+            raise Warning(
+                _("Only females can be farrow"))
+        if not self.is_ready():
+            raise Warning(
+                _("Only diagnosticated pregnant females can be farrow"))
+        if self.dead == 0 and self.live == 0:
+            raise Warning(
+                _('no deads and no lives'))
+        company = self.env['res.company'].search([
+            (True, '=', True)])[0]
+        journal = self.env['account.analytic.journal'].search([
+            ('code', '=', 'FAR')])
+        analytic_line_obj = self.env['account.analytic.line']
+        farrowing_cycle_obj = self.env['farm.farrowing.event_female_cycle']
+        farrrowing_animalGroup_obj = self.env['farm.farrowing.event_group']
+        location_obj = self.env['farm.foster.locations']
+        foster_locations = []
+        for loc in self.animal.specie.foster_location:
+            foster_locations.append(loc.id)
+            print loc.location
+            print loc.location.location_id
+        print foster_locations
+        print self.farm.id
+        foster_location = location_obj.search(
+            [('location.location_id.location_id', '=', self.farm.id),
+             ('id', 'in', foster_locations),
+             ],
+            ).location
+        print foster_location
+        farrowing_cycle_obj.create({
+            'event': self.id,
+            'cycle': self.animal.cycles[-1].id})
+        if self.live != 0:
+            self.get_female_move(foster_location)
+            new_group = self.get_produced_group()
+            farrrowing_animalGroup_obj.create({
+                'event': self.id,
+                'animal_group': new_group[0].id
+                })
+            self.animal.current_cycle.update_state(self)
+            tot_cost = 0
+            for line in self.animal.account.line_ids:
+                tot_cost = tot_cost + line.amount
+            analytic_line_obj.create({
+                'name': 'Farrow Cost',
+                'date': self.timestamp,
+                'ref': 'farrow',
+                'amount': tot_cost,
+                'unit_amount': 1,
+                'account_id': new_group[0].account.id,
+                'general_account_id': company.feed_account.id,
+                'journal_id': journal.id,
+                })
+            analytic_line_obj.create({
+                'name': 'Farrow Cost',
+                'date': self.timestamp,
+                'ref': 'farrow',
+                'amount': -(tot_cost),
+                'unit_amount': 1,
+                'account_id': self.animal.account.id,
+                'general_account_id': company.feed_account.id,
+                'journal_id': journal.id,
+                })
+        super(FarrowingEvent, self).confirm()
+
+    @api.one
+    def get_female_move(self, foster_loc):
+        moves_obj = self.env['stock.move']
+        quants_obj = self.env['stock.quant']
+        target_quant = quants_obj.search([
+            ('lot_id', '=', self.animal.lot.lot.id),
+            ('location_id', '=', self.animal.location.id),
+            ])
+        fem_move = moves_obj.create({
+            'name': 'foster-mother-' + self.animal.lot.lot.name,
+            'create_date': fields.Date.today(),
+            'date': self.timestamp,
+            'product_id': self.animal.lot.lot.product_id.id,
+            'product_uom_qty': 1,
+            'product_uom':
+                self.animal.lot.lot.product_id.product_tmpl_id.uom_id.id,
+            'location_id': self.animal.location.id,
+            'location_dest_id': foster_loc.id,
+            'company_id': self.animal.farm.company_id.id, })
+        for q in target_quant:
+            q.reservation_id = fem_move.id
+        fem_move.action_done()
+        self.female_move = fem_move
+        self.animal.location = foster_loc
+        tags_obj = self.env['farm.tags']
+        tag = tags_obj.search([
+                ('name', '=', self.farm.name+'-mated')])
+        tag.animal = [(3, self.animal.id)]
+        new_tag = tags_obj.search([
+            ('name', '=', self.farm.name + '-lact')])
+        if len(new_tag) == 0:
+            new_tag = tags_obj.create({'name': self.farm.name + '-lact',
+                                       })
+        self.animal.tags = [(6, 0, [new_tag.id, ])]
+
+    @api.one
+    def get_produced_group(self):
+        animalGroup_obj = self.env['farm.animal.group']
+        tags_obj = self.env['farm.tags']
+        tags = []
+        new_tag = tags_obj.search([
+            ('name', '=', self.farm.name + '-lact')])
+        if len(new_tag) == 0:
+            new_tag = tags_obj.create({'name': self.farm.name + '-lact',
+                                       })
+        tags.append(new_tag.id)
+        new_group = animalGroup_obj.create({
+            'specie': self.specie.id,
+            'breed': self.animal.breed.id,
+            'initial_location': self.animal.location.id,
+            'initial_quantity': self.live,
+            'farm': self.animal.farm.id,
+            'origin': 'raised',
+            'arrival_date': self.timestamp,
+            'tags': [(6, 0, tags)],
+            })
+        new_group.state = 'lactating'
+        return new_group
+
+    def is_compatible(self):
+        if self.animal_type == 'female':
+            return True
+        else:
+            return False
+
+    def is_ready(self):
+        if self.animal.current_cycle.state in ['pregnat', 'mated']:
+            return True
+        else:
+            return False
+
+
+class FarrowingEventFemaleCycle(models.Model):
+    _name = 'farm.farrowing.event_female_cycle'
+
+    event = fields.Many2one(comodel_name='farm.farrowing.event',
+                            string='Farrowing Event', required=True,
+                            ondelete='RESTRICT')
+    cycle = fields.Many2one('farm.animal.female_cycle', string='Female Cycle',
+                            required=True, ondelete='RESTRICT')
+
+
+class FarrowingEventAnimalGroup(models.Model):
+    _name = 'farm.farrowing.event_group'
+    _rec_name = 'animal_group'
+
+    event = fields.Many2one(comodel_name='farm.farrowing.event',
+                            string='Farrowing Event', required=True,
+                            ondelete='RESTRICT')
+    animal_group = fields.Many2one(comodel_name='farm.animal.group',
+                                   string='Group', required=True,
+                                   ondelete='RESTRICT')
+
+    @api.multi
+    def name_get(self):
+        displayName = []
+        for group in self:
+            displayName.append((group.id, group.animal_group.number))
+        return displayName

BIN
models/farrowing_event.pyc


+ 82 - 0
models/feed_abstract_event.py

@@ -0,0 +1,82 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api
+
+
+class FeedEventMixin(models.Model):
+    _name = 'farm.event.feed_mixin'
+    _inherit = {'farm.event': 'AbstractEvent_id'}
+    _auto = False
+
+    location = fields.Many2one(comodel_name='stock.location',
+                               string='Location',
+                               domain=[('usage', '=', 'internal')],
+                               required=True)
+    quantity = fields.Integer(string='Num. of animals', compute='get_quantity',
+                              store=True)
+    feed_location = fields.Many2one(comodel_name='stock.location',
+                                    string='Feed Source', required=True,
+                                    domain=[('usage', '=', 'internal'), ])
+    feed_product = fields.Many2one(comodel_name='product.product',
+                                   string='Feed')
+    feed_lot = fields.Many2one(comodel_name='stock.production.lot',
+                               string='Feed Lot', required=True)
+    uom = fields.Many2one(comodel_name='product.uom', string='UOM',
+                          required=True)
+    feed_quantity = fields.Float(string='Comsumed Cuantity', required=True,
+                                 digits=(4, 2), default=1)
+    start_date = fields.Date(string='Start Date',
+                             default=fields.Date.today(),
+                             help='Start date of the period in'
+                             'which the given quantity of product was'
+                             'consumed.')
+    end_date = fields.Date(string='End Date', default=fields.Date.today(),
+                           help='End date of the period in which the given'
+                           'quantity of product was consumed. It is the date'
+                           'of event\'s timestamp.')
+    move = fields.Many2one(comodel_name='stock.move', string='Stock Move')
+
+    @api.onchange('feed_product')
+    def onchange_feed(self):
+        self.uom = self.feed_product.product_tmpl_id.uom_id
+
+    @api.onchange('animal')
+    def onchange_animal(self):
+        self.location = self.animal.location
+
+    @api.onchange('animal_group')
+    def onchange_group(self):
+        self.location = self.animal_group.location
+
+    @api.one
+    def get_quantity(self):
+        if self.animal_type == 'group':
+            self.quantity = self.animal_group.quantity
+        else:
+            self.quantity = 1
+
+    @api.multi
+    def consume_feed(self, name, end_date, product, lot, specie, origin,
+                     qty, uom):
+        quants_obj = self.env['stock.quant']
+        moves_obj = self.env['stock.move']
+        target_quant = quants_obj.search([
+            ('lot_id', '=', lot.id),
+            ('location_id', '=', origin.id)])
+        new_move = moves_obj.create({
+                'name': name,
+                'create_date': fields.Date.today(),
+                'date': end_date,
+                'product_id': product.id,
+                'product_uom_qty': qty,
+                'product_uom': uom.id,
+                'location_id': origin.id,
+                'location_dest_id': specie.consumed_feed_location.id,
+                'company_id': origin.company_id.id,
+                })
+        for q in target_quant:
+            q.reservation_id = new_move.id
+        new_move.action_done()

BIN
models/feed_abstract_event.pyc


+ 158 - 0
models/feed_event.py

@@ -0,0 +1,158 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api
+from datetime import datetime
+
+
+DFORMAT = "%Y-%m-%d"
+
+
+class FeedEvent(models.Model):
+    _name = 'farm.feed.event'
+    _inherit = {'farm.event.feed_mixin': 'FeedEventMixin_id'}
+    _auto = True
+
+    animal_type = fields.Selection([
+        ('male', 'Male'), ('female', 'Female'),
+        ('individual', 'Individual'), ('group', 'Group'),
+        ], string="Animal Type", select=True)
+    feed_quantity_animal_day = fields.Float(string='Qty. per Animal Day',
+                                            digits=(16, 4),
+                                            compute='get_feed_per_day')
+    feed_inventory = fields.Many2one(comodel_name='farm.feed.inventory',
+                                     string='Inventory')
+    feed_inventory = fields.Selection(string='Inventory',
+                                      selection='get_inventory',
+                                      readonly=True, select=True,
+                                      help='The inventory that generated this'
+                                      'event automatically.')
+
+    @api.model
+    @api.returns('self', lambda value: value.id)
+    def create(self, vals):
+        res = super(FeedEvent, self).create(vals)
+        if len(res.move) == 0:
+            quants_obj = self.env['stock.quant']
+            moves_obj = self.env['stock.move']
+            target_quant = quants_obj.search([
+                ('lot_id', '=', res.feed_lot.id),
+                ('location_id', '=', res.feed_location.id)])
+            new_move = moves_obj.create({
+                'name': res.job_order.name+'-'+res.lot.name+'-mov',
+                'create_date': fields.Date.today(),
+                'date': res.start_date,
+                'product_id': res.feed_product.id,
+                'product_qty': res.feed_quantity,
+                'product_uom': res.uom.id,
+                'location_id': res.feed_location.id,
+                'location_dest_id': res.location.id,
+                'company_id': res.location.company_id.id,
+                'origin': res.job_order.name,
+                })
+            for q in target_quant:
+                q.reservation_id = new_move.id
+            res.move = new_move
+            new_move.action_done()
+        return res
+
+    @api.multi
+    def get_feed_per_day(self):
+        for res in self:
+            if res.animal or res.animal_group:
+                if res.feed_quantity and res.start_date and res.end_date:
+                    days = (datetime.strptime(res.end_date, DFORMAT) -
+                            datetime.strptime(res.start_date, DFORMAT)).days
+                    if days > 0:
+                        qty = 1
+                        res.feed_quantity_animal_day = \
+                            (res.feed_quantity/res.quantity)/days
+
+    @api.onchange('move')
+    @api.multi
+    def onchange_move(self):
+        for res in self:
+            if len(res.move) > 0:
+                res.feed_product = res.move.product_id
+                res.uom = res.move.product_uom
+                res.feed_quantity = res.move.product_qty
+                res.farm = res.move.location_dest_id.location_id.location_id
+                res.feed_location = res.move.location_id
+                res.location = res.move.location_dest_id
+                if len(res.move.reserved_quant_ids) > 0:
+                    res.feed_lot = res.move.reserved_quant_ids[0].lot_id
+                else:
+                    if len(res.move.quant_ids) > 0:
+                        res.feed_lot = res.move.quant_ids[-1].lot_id
+
+    
+
+    @api.one
+    def confirm(self):
+        quants_obj = self.env['stock.quant']
+        if self.animal_type == 'group':
+            self.animal_group.feed_quantity += self.feed_quantity
+            self.set_cost(
+                self.animal_group.account, self.feed_lot, self.feed_quantity)
+        else:
+            self.animal.consumed_feed += self.feed_quantity
+            self.set_cost(
+                self.animal.account, self.feed_lot, self.feed_quantity)
+        self.consume_feed('consume_feed', self.end_date, self.feed_product,
+                          self.feed_lot, self.specie, self.location,
+                          self.feed_quantity, self.uom)
+        super(FeedEvent, self).confirm()
+
+    @api.one
+    def set_cost(self, account, lot, qty):
+        company = self.env['res.company'].search([
+            (True, '=', True)])[0]
+        journal = self.env['account.analytic.journal'].search([
+            ('code', '=', 'FAR')])
+        analytic_line_obj = self.env['account.analytic.line']
+        stock_move_obj = self.env['stock.move']
+        cost = 0
+        if lot.unit_cost and lot.unit_cost > 0:
+            cost = lot.unit_cost * qty
+        else:
+            quants_obj = self.env['stock.quant']
+            quants = quants_obj.search([
+                ('lot_id', '=', self.feed_lot.id)])
+            ids = []
+            for q in quants:
+                ids.append(q.id)
+            moves = stock_move_obj.search([
+                ('quant_ids', 'in', ids),
+                ('picking_id', '!=', False)])
+            amount = 0.0
+            raw_qty = 0
+            if len(moves) != 0:
+                for move in moves:
+                    if move.price_unit > 0:
+                        amount += move.price_unit * move.product_qty
+                        raw_qty += move.product_qty
+                if raw_qty > 0:
+                    unit_price = amount/raw_qty
+                    cost += qty * unit_price
+            if cost == 0:
+                prod_tmpl = self.feed_product.product_tmpl_id
+                cost = prod_tmpl.standard_price * qty
+        analytic_line_obj.create({
+            'name': self.job_order.name,
+            'date': self.end_date,
+            'ref': 'feed',
+            'amount': -(cost),
+            'unit_amount': qty,
+            'account_id': account.id,
+            'general_account_id': company.feed_account.id,
+            'journal_id': journal.id,
+            })
+
+    def get_inventory(self):
+        irModel_obj = self.env['ir.model']
+        models = irModel_obj.search([
+            ('model', 'in', ['farm.feed.inventory',
+                             'farm.feed.provisional_inventory']), ])
+        return [('', '')] + [(m.model, m.name) for m in models]

BIN
models/feed_event.pyc


+ 123 - 0
models/feed_inventory.py

@@ -0,0 +1,123 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields
+
+INVENTORY_STATES = [
+    ('draft', 'Draft'),
+    ('validated', 'Validated'),
+    ('cancel', 'Cancelled'),
+    ]
+
+
+class FeedInventoryMixin(models.Model):
+    _name = 'farm.feed.inventory.mixin'
+    _auto = False
+
+    specie = fields.Many2one(comodel_name='farm.specie', string='Specie',
+                             required=True, select=True)
+    location = fields.Many2one(comodel_name='stock.location', string='Silo',
+                               required=True, domain=[('silo', '=', True)])
+    dest_locations = fields.Many2many(comodel_name='farm.feed.stock.location',
+                                      inverse_name='inventory',
+                                      column1='location',
+                                      string='Location to feed')
+    timestamp = fields.Datetime(string='Date & Time', required=True,
+                                default=fields.Datetime.now())
+    uom = fields.Many2one(comodel_name='product.uom', string='UOM')
+    quantity = fields.Float(string='Quantity', digits=(16, 2), required=True)
+    feed_events = fields.One2many(comodel_name='farm.feed.event',
+                                  inverse_name='feed_inventory',
+                                  string='Feed Events', readonly=True)
+    state = fields.Selection(selection=INVENTORY_STATES, string='States',
+                             required=True, readonly=True, select=True,
+                             default='draft')
+
+
+class FeedInventoryLocation(models.Model):
+    _name = 'farm.feed.stock.location'
+
+    inventory = fields.Selection(string='Inventory',
+                                 selection='get_inventory', required=True,
+                                 select=True)
+    location = fields.Many2one(comodel_name='stock.location',
+                               string='Location', required=True, select=True)
+
+    def get_inventory(self):
+        irModel_obj = self.env['ir.model']
+        varModels = irModel_obj.search([
+            ('model', 'in', ['farm.feed.inventory',
+                             'farm.feed.provisional_inventory']), ])
+        return [(m.model, m.name) for m in varModels]
+
+
+class FeedInventory(models.Model):
+    _name = 'farm.feed.inventory'
+    _inherit = {'farm.feed.inventory.mixin': 'FeedInventoryMixin_id'}
+    _auto = True
+
+    prev_inventory = fields.Many2one(comodel_name='farm.feed.inventory',
+                                     string='Previous Inventory',
+                                     readonly=True)
+
+
+class FeedProvisionalInventory(models.Model):
+    _name = 'farm.feed.provisional_inventory'
+    _inherit = {'farm.feed.inventory.mixin': 'FeedInventoryMixin_id'}
+    _auto = True
+
+    prev_inventory_date = fields.Date(string='Previous Inventory Date',
+                                      readonly=True,
+                                      computed='get_previous_inventory_date')
+    inventory = fields.Many2one(comodel_name='farm.feed.inventory',
+                                string='Inventory', readonly=True)
+
+    def get_previous_inventory_date(self):
+        inventory_obj = self.env['farm.feed.inventory']
+
+        prev_inventories = inventory_obj.search([
+            ('location', '=', self.location.id),
+            ('timestamp', '<', self.timestamp),
+            ('state', '=', 'validated'), ],
+            order=[('timestamp', 'DESC'), ],
+            limit=1)
+        if not prev_inventories:
+            return None
+
+        prev_prov_inventories = self.search([
+            ('location', '=', self.location.id),
+            ('timestamp', '<', self.timestamp),
+            ('timestamp', '>', prev_inventories[0].timestamp),
+            ('state', '=', 'validated'),
+            ],
+            order=[('timestamp', 'DESC'), ], limit=1)
+        if prev_prov_inventories:
+            return prev_prov_inventories[0].timestamp.date()
+        return prev_inventories[0].timestamp.date()
+
+
+class FeedAnimalLocationDate(models.Model):
+    _name = 'farm.feed.animal_location_date'
+    _order = [('location', 'ASC'), ('date', 'DESC'), ]
+
+    animal_type = fields.Selection([
+        ('male', 'Male'),
+        ('female', 'Female'),
+        ('individual', 'Individual'),
+        ('group', 'Group'),
+        ], "Animal Type", required=True, readonly=True, select=True)
+    animal = fields.Many2one(comodel_name='farm.animal', string='Animal')
+    animal_group = fields.Many2one(comodel_name='farm.animal.group',
+                                   string='Group', select=True)
+    location = fields.Many2one(comodel_name='stock.location',
+                               string='Location fed', select=True)
+    animale_qty = fields.Integer(string='Num. Animals')
+    date = fields.Date('Date', select=True)
+    consumed_qty_animal = fields.Float(string='Consumed Qty, per Animal',
+                                       digits=(16, 2), select=True)
+    consumed_qty = fields.Float(string='Consumed Qty', digits=(16, 2))
+    inventory_qty = fields.Integer(string='Inventoryes',
+                                   help='Number of Inventories which include'
+                                   'this date.')

BIN
models/feed_inventory.pyc


+ 92 - 0
models/foster_event.py

@@ -0,0 +1,92 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api, _
+from openerp.exceptions import Warning
+
+
+class FosterEvent(models.Model):
+    _name = 'farm.foster.event'
+    _inherit = {'farm.event.import.mixin': 'ImportedEventMixin_id'}
+    _auto = True
+
+    farrowing_group = fields.Many2one(comodel_name='farm.animal.group',
+                                      string='Farrowing Group')
+    quantity = fields.Integer(string='Fosters',
+                                     help='If this quantity is negative it is'
+                                     'a Foster Out.')
+    pair_female = fields.Many2one(comodel_name='farm.animal',
+                                  string='Pair Female', required=True,
+                                  domain=[('type', '=', 'female'),
+                                          ('current_cycle', '!=', None), ])
+    pair_event = fields.Many2one(comodel_name='farm.animal.female_cycle',
+                                 string='Female Cycle')
+    female_cycle = fields.Many2one(comodel_name='farm.animal.female_cycle',
+                                   string='Female Cycle')
+    move = fields.Many2one(comodel_name='stock.move', string='Female Cycle')
+
+    @api.one
+    def confirm(self):
+        if not self.is_compatible():
+            raise Warning(
+                _("Only females can foster a group"))
+        if not self.is_ready():
+            raise Warning(
+                _("Only lactating females can foster a group"))
+        far_event = self.animal.current_cycle.farrowing_event
+        self.farrowing_group = \
+            far_event.event.produced_group.animal_group
+        self.female_cycle = self.animal.current_cycle
+        self.pair_event = self.pair_female.current_cycle
+        self.trasform_group()
+        super(FosterEvent, self).confirm()
+
+    @api.one
+    def trasform_group(self):
+        incoming_group = \
+            self.pair_event.farrowing_event.event.produced_group.animal_group
+        if incoming_group.quantity < self.quantity:
+            raise Warning(
+                _('quantity is biger than incoming group quantity'))
+        trans_eve_obj = self.env['farm.transformation.event']
+        new_trans_ev = trans_eve_obj.create({
+            'animal_type': 'group',
+            'specie': self.specie.id,
+            'farm': self.farm.id,
+            'animal_group': incoming_group.id,
+            'timestamp': self.timestamp,
+            'from_location': incoming_group.location.id,
+            'to_animal_type': 'group',
+            'to_location': self.animal.location.id,
+            'quantity': self.quantity,
+            'to_animal_group': self.farrowing_group.id,
+            })
+        new_trans_ev.confirm()
+        self.move = new_trans_ev.move
+        foster_event_obj = self.env['farm.foster.event']
+        foster_event_obj.create({
+            'aniaml': self.pair_female.id,
+            'farm': self.farm.id,
+            'state': 'validated',
+            'animal_type': 'female',
+            'farrowing_group': incoming_group.id,
+            'quantity': self.quantity,
+            'pair_female': self.animal.id,
+            'pair_event': self.female_cycle.id,
+            'female_cycle': self.pair_event.id,
+            'move': new_trans_ev.move.id})
+
+    def is_ready(self):
+        if self.animal.current_cycle.state == 'lactating' and \
+                self.pair_female.current_cycle.state == 'lactating':
+            return True
+        else:
+            return False
+
+    def is_compatible(self):
+        if self.animal.type == 'female' and self.pair_female.type == 'female':
+            return True
+        else:
+            return False

BIN
models/foster_event.pyc


+ 114 - 0
models/insemination_event.py

@@ -0,0 +1,114 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api, _
+from openerp.exceptions import Warning
+
+
+class InseminationEvent(models.Model):
+    _name = 'farm.insemination.event'
+    _inherit = {'farm.event.import.mixin': 'ImportedEventMixin_id'}
+    _rec_name = 'animal'
+    _auto = True
+
+    dose_bom = fields.Many2one(comodel_name='mrp.bom', string='Dose',
+                               domain=[(('semen_dose', '=', True))])
+    dose_product = fields.Many2one(comodel_name='product.product',
+                                   string='Dose product', required=True)
+    dose_lot = fields.Many2one(comodel_name='stock.production.lot',
+                               string='Dose lot')
+    female_cycle = fields.Many2one(comodel_name='farm.animal.female_cycle',
+                                   string='Female cycle')
+    move = fields.Many2one(comodel_name='stock.move', string='Stock move',
+                           readonly=True)
+
+    @api.one
+    def confirm(self):
+        if not self.is_compatible():
+            raise Warning(
+                _("Only females can be bred"))
+        current_cycle = self.animal.current_cycle
+        if (not current_cycle or current_cycle.diagnosis_events or
+                current_cycle.farrowing_event):
+            self.create_new_female_cycle()
+        elif not self.female_cycle:
+            self.female_cycle = self.animal.current_cycle
+        if not self.is_ready():
+            raise Warning(
+                _("female's cycle is not compatible to be bred"))
+        self.get_event_move()
+        self.animal.update_state()
+        self.female_cycle.update_state(self)
+        tags_obj = self.env['farm.tags']
+        tag = tags_obj.search([
+            ('name', '=', self.farm.name +'-unmated')])
+        tag.animal = [(3, self.animal.id)]
+        new_tag = tags_obj.search([
+            ('name', '=', self.farm.name + '-mated')])
+        if len(new_tag) == 0:
+            new_tag = tags_obj.create({'name': self.farm.name + '-mated',
+                                       })
+        self.animal.tags = [(6, 0, [new_tag.id, ])]
+        super(InseminationEvent, self).confirm()
+
+    @api.onchange('dose_bom')
+    def onchange_specie(self):
+        product_obj = self.env['product.product']
+        dose_pro = product_obj.search(
+            [('product_tmpl_id', '=', self.dose_bom.product_tmpl_id.id)])
+        product_ids = []
+        for product in dose_pro:
+            product_ids.append(product.id)
+        return {'domain': {
+                'dose_product': [('id', 'in', product_ids)]}}
+
+    @api.one
+    def get_event_move(self):
+        moves_obj = self.env['stock.move']
+        quants_obj = self.env['stock.quant']
+        target_quant = quants_obj.search([
+            ('product_id', '=', self.dose_product.id),
+            ('lot_id', '=', self.dose_lot.id),
+            ('qty', '>', 1),
+            ])
+        if not target_quant:
+            raise Warning(
+                _('semen dose no avairable'))
+        new_move = moves_obj.create({
+            'name': 'ins' + self.dose_lot.name,
+            'create_date': fields.Date.today(),
+            'date': self.timestamp,
+            'product_id': self.dose_product.id,
+            'product_uom_qty': 1,
+            'product_uom': self.dose_product.uom_id.id,
+            'location_id': target_quant[0].location_id.id,
+            'location_dest_id': self.specie.consumed_feed_location.id,
+            'company_id': self.animal.initial_location.company_id.id,
+            'origin': self.job_order.name,
+            })
+        for q in target_quant:
+            q.reservation_id = new_move.id
+        new_move.action_done()
+        self.move = new_move
+
+    def is_compatible(self):
+        if self.animal_type == 'female':
+            return True
+        else:
+            return False
+
+    def is_ready(self):
+        if self.female_cycle.state == 'unmated':
+            return True
+        elif self.female_cycle.state == 'mated':
+            return True
+        else:
+            return False
+
+    @api.one
+    def create_new_female_cycle(self):
+        female_clicle_obj = self.env['farm.animal.female_cycle']
+        self.female_cycle = female_clicle_obj.create(
+            {'animal': self.animal.id, })

BIN
models/insemination_event.pyc


+ 75 - 0
models/medication_event.py

@@ -0,0 +1,75 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api
+
+
+class MedicationEvent(models.Model):
+    _name = 'farm.medication.event'
+    _inherit = {'farm.event.feed_mixin': 'FeedEventMixin_id'}
+    _auto = True
+
+    medication_in_feed = fields.Boolean(string='Medication in feed',
+                                        default=False)
+    medicated_feed = fields.Many2one(string='Medicated Feed',
+                                     comodel_name='product.product')
+    feed_product_uom_category = fields.Many2one(
+        comodel_name='product.uom.categ', string='Feed Uom Category',
+        readonly=True)
+
+    @api.one
+    def confirm(self):
+        if not self.medication_in_feed:
+            quants_obj = self.env['stock.quant']
+            moves_obj = self.env['stock.move']
+            target_quant = quants_obj.search([
+                ('lot_id', '=', self.feed_lot.id),
+                ('location_id', '=', self.feed_location.id)])
+            medication_cost = 0
+            for tq in target_quant:
+                medication_cost = tq.cost
+            if len(self.move) == 0:
+                new_move = moves_obj.create({
+                    'name': self.job_order.name+'-'+self.lot.name+'-mov',
+                    'create_date': fields.Date.today(),
+                    'date': self.start_date,
+                    'product_id': self.feed_product.id,
+                    'product_uom_qty': self.feed_quantity,
+                    'product_uom': self.uom.id,
+                    'location_id': self.feed_location.id,
+                    'location_dest_id': self.location.id,
+                    'company_id': self.location.company_id.id,
+                    'origin': self.job_order.name,
+                    })
+                self.move = new_move
+                for q in target_quant:
+                    q.reservation_id = new_move.id
+                new_move.action_done()
+            self.consume_feed('consume_feed', self.end_date, self.feed_product,
+                              self.feed_lot, self.specie, self.location,
+                              self.feed_quantity, self.uom)
+            if self.animal_type == 'group':
+                account = self.animal_group.account
+            else:
+                account = self.animal.account
+            self.set_cost(account, medication_cost, self.feed_quantity)
+        super(MedicationEvent, self).confirm()
+
+    @api.multi
+    def set_cost(self, account, cost, qty):
+        company = self.env['res.company'].search([
+            ('id', '=', self.farm.company_id.id)])
+        journal = self.env['account.analytic.journal'].search([
+            ('code', '=', 'FAR')])
+        analytic_line_obj = self.env['account.analytic.line']
+        analytic_line_obj.create({
+            'name': self.job_order.name,
+            'date': self.end_date,
+            'amount': -(cost * qty),
+            'unit_amount': qty,
+            'account_id': account.id,
+            'general_account_id': company.feed_account.id,
+            'journal_id': journal.id,
+            })

BIN
models/medication_event.pyc


+ 37 - 0
models/move_event.py

@@ -0,0 +1,37 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields
+
+
+class MoveEvent(models.Model):
+    _name = 'farm.move.event'
+    _inherit = {'farm.event': 'AbstractEvent_id'}
+    _auto = True
+
+    from_location = fields.Many2one(comodel_name='stock.location',
+                                    string='Origin', required=True,
+                                    domain=[('usage', '=', 'internal'),
+                                            ('silo', '=', False), ])
+    to_location = fields.Many2one(comodel_name='stock.location',
+                                  string='Destination', required=True,
+                                  domain=[('usage', '=', 'internal'),
+                                          ('silo', '=', False), ])
+    quantity = fields.Integer(string='Quantity', required=True,
+                              default=1)
+    unit_price = fields.Float(string='Unit Price', required=True,
+                              digits=(16, 4),
+                              help='Unitary cost of Animal or Group for'
+                              'analytical accounting.')
+    uom = fields.Many2one(comodel_name='product.uom', string='UOM')
+    weight = fields.Float(string='Weight', digits=(16, 2))
+    move = fields.Many2one(comodel_name='stock.move', string='Stock Move',
+                           readonly=True)
+    weight_record = fields.Selection(
+        string='Weight Record',
+        selection=[(None, ''),
+                   ('farm.animal.weight', 'Animal Weight'),
+                   ('farm.animal.group.weight', 'Group Weight'), ],
+        readonly=True)

BIN
models/move_event.pyc


+ 47 - 0
models/pregnancy_diagnosis_event.py

@@ -0,0 +1,47 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api, _
+from openerp.exceptions import Warning
+
+
+class PregnancyDiagnosisEvent(models.Model):
+    _name = 'farm.pregnancy_diagnosis.event'
+    _inherit = {'farm.event': 'AbstractEvent_id'}
+    _auto = True
+
+    result = fields.Selection([
+        ('negative', 'Negative'), ('positive', 'Positive'),
+        ('nonconclusive', 'Non conclusive'),
+        ('not-pregnant', 'Observed not Pregnant'), ],
+        string='Result',
+        required=True, default='positive')
+    female_cycle = fields.Many2one(comodel_name='farm.animal.female_cycle',
+                                   string='Female Cycle')
+
+    @api.one
+    def confirm(self):
+        if not self.is_compatible():
+            raise Warning(
+                _("Only females can be diagnosed"))
+        if not self.is_ready():
+            raise Warning(
+                _("Only mated females can be diagnosed"))
+        self.female_cycle = self.animal.current_cycle
+        self.animal.update_state()
+        self.animal.current_cycle.update_state(self)
+        super(PregnancyDiagnosisEvent, self).confirm()
+
+    def is_compatible(self):
+        if self.animal_type == 'female':
+            return True
+        else:
+            return False
+
+    def is_ready(self):
+        if self.animal.current_cycle.state == 'mated':
+            return True
+        else:
+            return False

BIN
models/pregnancy_diagnosis_event.pyc


+ 19 - 0
models/product.py

@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields
+
+
+class Template(models.Model):
+    _inherit = 'product.template'
+
+    farrowing_price = fields.Float(string='Farrowing Price', digits=(16, 4),
+                                   help=('Unitary cost for farrowing events.'
+                                         'It\'s only used when the product is'
+                                         'a group product of a farm specie.'))
+    wearing_price = fields.Float(string='Weaning Price', digits=(16, 4),
+                                 help=('Unitary cost for weaning events.'
+                                       'It\'s only used when the product is a'
+                                       'group product of a farm specie.'))

BIN
models/product.pyc


+ 86 - 0
models/production.py

@@ -0,0 +1,86 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api
+from datetime import datetime, timedelta
+#from mx.DateTime.DateTime import today
+
+DFORMAT = "%Y-%m-%d %H:%M:%S"
+
+
+class BOM(models.Model):
+    _inherit = 'mrp.bom'
+
+    semen_dose = fields.Boolean(string='Semen Dose')
+    specie = fields.Many2one(comodel_name='farm.specie',
+                             string='Dose Specie')
+
+class MrpAnaliticRemain(models.Model):
+    _name= 'mrp.analitic.remain'
+
+    date = fields.Date(string='Date')
+    qty_per_unit = fields.Float(string='Cost per unit')
+
+
+class MrpProduction(models.Model):
+    _inherit = 'mrp.production'
+
+    '''
+    @api.multi
+    def calculateCost(self, wiz):
+        super(MrpProduction, self).calculateCost(wiz)
+        analitic_remain_ob = self.env['purchase.analitic.remain']
+        remain_history = self.env['mrp.analitic.remain']
+        factory = self.env['stock.location'].search([
+            ('factory', '=', True)])
+        analitic_remain = analitic_remain_ob.search([
+                                    ('farm', '=', factory.id)])
+        if len(analitic_remain) > 0 and analitic_remain.quantity > 0:
+            today = datetime.today()
+            if analitic_remain.last_calc:
+                last_calc = datetime.strptime(
+                    analitic_remain.last_calc, DFORMAT)
+                dif = today - last_calc
+            else:
+                dif = 3
+            if dif > 1:
+                self.get_last_productions(analitic_remain, today)
+            wiz.lot_id.unit_cost = wiz.lot_id.unit_cost \
+                + analitic_remain.quantity_per_unit
+            analitic_remain.quantity = analitic_remain.quantity\
+                - (wiz.product_qty * analitic_remain.quantity_per_unit)
+            history = remain_history.search([('date', '=', today)])
+            if not history:
+                remain_history.create({
+                    'date': today,
+                    'qty_per_unit': analitic_remain.quantity_per_unit})
+    '''
+
+    @api.multi
+    def get_last_productions(self, analitic_remain, today):
+        productions_obj = self.env['mrp.production']
+        ref_day = (datetime.today() - timedelta(days=30)).strftime(DFORMAT)
+        last_prod = productions_obj.search([
+            ('date_finished', '>', ref_day)])
+        analitic_remain.last_calc = today
+        if len(last_prod) < 15:
+            ref_day = today - timedelta(days=15)
+            last_prod = productions_obj.search([
+                ('date_finished', '>', ref_day)])
+            if len(last_prod) < 8:
+                analitic_remain.quantity_per_unit = 0
+            else:
+                self.get_unit_remain(analitic_remain, last_prod, 15)
+        else:
+            self.get_unit_remain(analitic_remain, last_prod, 30)
+
+    @api.multi
+    def get_unit_remain(self, analitic_remain, last_prod, days):
+        qty = 0
+        for prod in last_prod:
+            qty = qty + prod.product_qty
+        if days == 15:
+            qty = qty * 2
+        analitic_remain.quantity_per_unit = analitic_remain.quantity/qty

BIN
models/production.pyc


+ 505 - 0
models/purchse_analytics.py

@@ -0,0 +1,505 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api, sql_db, _
+from openerp.http import request
+from openerp.exceptions import Warning
+from datetime import datetime, timedelta
+import thread
+from docutils.nodes import transition
+
+DFORMAT = "%Y-%m-%d %H:%M:%S"
+DAFORTMAT = "%Y-%m-%d"
+
+
+class purchase_order_line(models.Model):
+    _inherit = 'purchase.order.line'
+
+    @api.multi
+    @api.depends('order_id.imputed')
+    def _get_imputed(self):
+        for res in self:
+            if res.order_id.imputed:
+                res.imputed = res.order_id.imputed
+
+    @api.multi
+    @api.depends('price_unit', 'product_qty')
+    def _get_aux_price_subtotal(self):
+        for res in self:
+            if res.price_unit and res.product_qty:
+                res.aux_price_subtotal = res.price_unit * res.product_qty
+
+    farm = fields.Many2one(comodel_name='stock.location', string='Farm',
+                           domain=[('usage', '=', 'view')])
+    location_id = fields.Many2one(comodel_name='stock.location', string='Yard',
+                                  domain=[('usage', '!=', 'view'),
+                                          ('silo', '!=', True)])
+    start_date = fields.Datetime(string='Bill start day')
+    end_date = fields.Datetime(string='Bill end date')
+    general_expense = fields.Boolean(string='General Expense', default=False)
+    imputed = fields.Boolean(string='Inputed', compute='_get_imputed',
+                             store=True)
+    aux_price_subtotal = fields.Float(string='amount_untaxed',
+                                      compute='_get_aux_price_subtotal',
+                                      store=True)
+
+    @api.multi
+    def impute_purchase_order(self):
+        for res in self:
+            res.order_id.set_purchase_analitics()
+
+
+class Purchase_analitic_remain(models.Model):
+    _name = 'purchase.analitic.remain'
+
+    farm = fields.Many2one(comodel_name='stock.location', string='Farm')
+    quantity = fields.Float(string='amount')
+    last_calc = fields.Date(string='last day unit calc')
+    quantity_per_unit = fields.Float(string='quantity per unit')
+
+
+class PurchaseOrder(models.Model):
+    _inherit = 'purchase.order'
+
+    imputed = fields.Boolean(string='Imputed', default=False)
+
+    @api.multi
+    def wkf_approve_order(self):
+        super(PurchaseOrder, self).wkf_approve_order()
+        for res in self:
+            for line in res.order_line:
+                if line.start_date:
+                    end_date = datetime.strptime(line.end_date, DFORMAT)
+                    start_date = datetime.strptime(line.start_date, DFORMAT)
+                    pass_days = (end_date - start_date).days
+                    if pass_days < 1 or not end_date or not start_date:
+                        raise Warning(
+                            _('the bill should have lower starting date '
+                              'to the final'))
+                if line.general_expense:
+                    raise Warning(
+                        _("General expenses can't aprove"))
+                if line.farm and line.location_id:
+                    raise Warning(_('Choose farm or yard'))
+            print res.state
+        return True
+
+    @api.multi
+    def set_purchase_analitics(self):
+        for res in self:
+            if not res.imputed:
+                res.imputed = True
+                control = res.order_line[0].general_expense
+                for line in res.order_line:
+                    if line.start_date and line.end_date:
+                        end_date = datetime.strptime(
+                                line.end_date, DFORMAT).date()
+                        if end_date >= datetime.today().date():
+                            raise Warning(
+                                _('Final date after current date'))
+                        if control and res.state != 'done':
+                            res.wkf_po_done()
+                        if line.farm and line.farm.factory:
+                            self.set_factory_cost(line)
+                        else:
+                            start_date = \
+                                datetime.strptime(
+                                    line.start_date, DFORMAT).date()
+                            num_days = (end_date - start_date).days+1
+                            if line.farm and line.farm.transport:
+                                self.set_transport_cost(line)
+                            elif line.farm or line.location_id:
+                                afected_animals = self.get_party_per_day(
+                                    start_date, end_date, line.farm,
+                                    line.location_id)
+                                if len(afected_animals[0]) == 0 \
+                                        and len(afected_animals[1]) == 0:
+                                    analitic_remain_ob = \
+                                        self.env['purchase.analitic.remain']
+                                    if line.farm:
+                                        farm = line.farm
+                                    else:
+                                        farm = self.get_farm(line.location_id)
+                                    analitic_remain = \
+                                        analitic_remain_ob.search([
+                                            ('farm', '=', farm.id)])
+                                    amount = line.price_unit * line.product_qty
+                                    if len(analitic_remain) == 0:
+                                        analitic_remain_ob.create({
+                                            'farm': farm.id,
+                                            'quantity': amount})
+                                    else:
+                                        analitic_remain.quantity = \
+                                            analitic_remain.quantity + amount
+                                else:
+                                    thread.start_new_thread(
+                                        self.set_analytics, (
+                                            afected_animals, line,
+                                            num_days, line.farm))
+
+    @api.multi
+    def set_transport_cost(self, line):
+        pick_type_obj = self.env['stock.picking.type']
+        int_pick_type = pick_type_obj.search([
+            ('code', '=', 'internal')])
+        out_pick_type = pick_type_obj.search([
+            ('code', '=', 'outgoing')])
+        int_pick_type_ids = []
+        for pick_t in int_pick_type:
+            int_pick_type_ids.append(pick_t.id)
+        out_pick_type_ids = []
+        for pick_t in out_pick_type:
+            out_pick_type_ids.append(pick_t.id)
+        picking_obj = self.env['stock.picking']
+        internal_trasports = picking_obj.search([
+            ('picking_type_id', 'in', int_pick_type_ids),
+            ('date_done', '<=', line.end_date),
+            ('date_done', '>=', line.start_date)])
+        out_trasports = picking_obj.search([
+            ('picking_type_id', 'in', out_pick_type_ids),
+            ('date_done', '<=', line.end_date),
+            ('date_done', '>=', line.start_date)])
+        tot_rel_trans = 0
+        for transport in internal_trasports:
+            dest_loc = transport.move_lines[0].location_dest_id
+            warehouse = dest_loc.get_farm_warehouse()
+            tot_rel_trans = tot_rel_trans + warehouse.radius
+        for transport in out_trasports:
+            warehouse = transport.picking_type_id.warehouse_id
+            tot_rel_trans = tot_rel_trans + warehouse.radius
+        cost_per_transport = (line.price_unit * line.product_qty)/tot_rel_trans
+        self.set_internal_trasport(internal_trasports, cost_per_transport,)
+        self.set_out_transport(out_trasports, cost_per_transport)
+
+    @api.multi
+    def set_internal_trasport(self, transports, cost_per_trans):
+        animal_obj = self.env['farm.animal']
+        an_group_obj = self.env['farm.animal.group']
+        for transport in transports:
+            dest_loc = transport.move_lines[0].location_dest_id
+            if dest_loc.silo:
+                dest_loc = dest_loc.locations_to_fed[0].location
+            warehouse = dest_loc.get_farm_warehouse()
+            animals = animal_obj.search([
+                ('location', '=', dest_loc.id)])
+            groups = an_group_obj.search([
+                ('location', '=', dest_loc.id),
+                ('state', '!=', 'sold')])
+            tot_animals = len(animals)
+            for group in groups:
+                tot_animals = tot_animals + group.quantity
+            tot_cost = cost_per_trans * warehouse.radius
+            cost_per_animal = tot_cost/tot_animals
+            for animal in animals:
+                self.set_animal_cost(animal, transport.date_done,
+                                     cost_per_animal, self.env)
+
+    def set_out_transport(self, transports, cost_per_trans):
+        an_group_obj = self.env['farm.animal.group']
+        for transport in transports:
+            warehouse = transport.pickng_type_id.warehouse_id
+            groups = an_group_obj.search([
+                ('location', '=', warehouse.view_location_id.id),
+                ('state', '!=', 'sold')])
+            tot_animals = 0
+            for group in groups:
+                tot_animals = tot_animals + group.quantity
+            tot_cost = cost_per_trans * warehouse.radius
+            cost_per_animal = tot_cost/tot_animals
+            for group in groups:
+                self.set_party_cost(group, transport.date_done,
+                                    cost_per_animal)
+
+    def set_factory_cost_old(self, line):
+        analitic_remain_ob = self.env['purchase.analitic.remain']
+        analitic_remain = analitic_remain_ob.search([
+                                    ('farm', '=', line.farm.id)])
+        amount = self.get_unit_price(line) * line.product_qty
+        if len(analitic_remain) == 0:
+                                    analitic_remain_ob.create({
+                                        'farm': line.farm.id,
+                                        'quantity': amount})
+        else:
+            analitic_remain.quantity = \
+                analitic_remain.quantity + amount
+
+    def set_factory_cost(self, line):
+        new_cr = sql_db.db_connect(
+            self.env.cr.dbname).cursor()
+        uid, context = \
+            self.env.uid, self.env.context
+        with api.Environment.manage():
+            new_env = api.Environment(
+                new_cr, uid, context)
+            productions = new_env['mrp.production'].search(
+                [('date_finished', '>=', line.start_date),
+                 ('date_finished', '<', line.end_date)])
+            moves = []
+            afected_lots = []
+            total_feed = 0
+            for production in productions:
+                total_feed = total_feed + production.product_qty
+                for mov in production.move_created_ids2:
+                    moves.append(mov)
+            amount = self.get_unit_price(line, new_env) * line.product_qty
+            cost_per_kg = amount/total_feed
+            for mov in moves:
+                for quant in mov.quant_ids:
+                    lot = quant.lot_id
+                    if lot.id not in afected_lots:
+                        afected_lots.append(lot.id)
+                        lot.unit_cost = lot.unit_cost + cost_per_kg
+                        self.set_afected_feed_events(lot, cost_per_kg, line,
+                                                     new_env)
+            new_env.cr.commit()
+            new_cr.close()
+            return True
+ 
+    def set_afected_feed_events(self, lot, cost_kg, line,new_env):
+        feed_events = new_env['farm.feed.event'].search(
+            [('state', '=', 'validated'),
+             ('feed_lot', '=', lot.id),
+             ('animal_type', '=', 'group')])
+        journal = new_env['account.analytic.journal'].with_context(
+            {}).search([('code', '=', 'PUR')])
+        analytic_line_obj = new_env['account.analytic.line']
+        for event in feed_events:
+            company = new_env['res.company'].with_context({}).search([
+            ('id', '=', 1)])
+            amount = event.feed_quantity * cost_kg
+            analytic_line_obj.create({
+                'name': 'mrp-cost-' + self.name,
+                'date': line.start_date,
+                'amount': -amount,
+                'unit_amount': 1,
+                'account_id': event.animal_group.account.id,
+                'general_account_id': company.feed_account.id,
+                'journal_id': journal.id,
+                })
+
+    def get_farm(self, location):
+        while(location.location_id.id != 1):
+            location = location.location_id
+        return location
+
+    @api.model
+    def get_party_per_day(self, start_date, end_date, farm, location_id):
+        pass_days = (end_date-start_date).days
+        if pass_days < 1 or not end_date or not start_date:
+            raise Warning(
+                _('the bill should have lower starting date '
+                  'to the final'))
+        ani_groups_obj = self.env['farm.animal.group'].with_context({}).search(
+            [('id', '!=', False)])
+        ani_obj = self.env['farm.animal'].with_context({}).search(
+            [('id', '!=', False)])
+        party_per_day = {}
+        animal_per_day = {}
+        current_day = end_date
+        while current_day >= start_date:
+            party_per_day[current_day] = []
+            animal_per_day[current_day] = []
+            current_day = current_day - timedelta(days=1)
+        for party in ani_groups_obj:
+            transition_location = []
+            for loc in party.specie.lost_found_location:
+                transition_location.append(loc.location.id)
+            transition = self.env['farm.transformation.event'].with_context(
+                {}).search([('animal_group', '=', party.id),
+                            ('from_location.id', 'in', transition_location),
+                            ('to_location.id', 'not in', transition_location)])
+            if party.state == 'sold':
+                sale_move = self.env['farm.move.event'].with_context(
+                    {}).search([('animal_group', '=', party.id)])
+                sale_day = datetime.strptime(
+                    sale_move[-1].timestamp, DFORMAT).date()
+                if len(transition) < 1:
+                    transition_finish = datetime.strptime(party.arrival_date,
+                                                          DAFORTMAT).date()
+                else:
+                    transition_finish = datetime.strptime(transition.timestamp,
+                                                          DFORMAT).date()
+                if farm:
+                    condition1 = party.farm == farm
+                    condition2 = self.get_farm(party.initial_location) == farm
+                else:
+                    condition1 = sale_move[-1].from_location == location_id
+                    condition2 = party.initial_location == location_id
+                if (start_date - sale_day).days < 0 and condition1:
+                    if end_date < sale_day:
+                        current_day = end_date
+                    else:
+                        current_day = sale_day
+                    control_date = self.get_control_date(party, start_date,
+                                                         transition_finish)
+                    self.add_party(
+                        party_per_day, party, current_day, control_date)
+                elif condition2 and (transition_finish - start_date).days > 0:
+                    control_date = self.get_control_date2(party, start_date)
+                    if end_date < transition_finish:
+                        current_day = end_date
+                    else:
+                        current_day = transition_finish
+                    self.add_party(party_per_day, party, current_day,
+                                   control_date)
+            elif party.state == 'fatten':
+                if farm:
+                    condition1 = party.farm == farm
+                    condition2 = self.get_farm(party.initial_location) == farm
+                else:
+                    condition1 = party.location == location_id
+                    condition2 = party.initial_location == location_id
+                if len(transition) < 1:
+                    transition_finish = datetime.strptime(party.arrival_date,
+                                                          "%Y-%m-%d").date()
+                else:
+                    t_f = None
+                    for tran in transition:
+                        if t_f is None or t_f < tran.timestamp:
+                            t_f = tran.timestamp
+                    transition_finish = datetime.strptime(t_f,
+                                                          DFORMAT).date()
+                if condition1:
+                    control_date = self.get_control_date(party, start_date,
+                                                         transition_finish)
+                    self.add_party(
+                        party_per_day, party, end_date, control_date)
+                elif condition2 and \
+                        (transition_finish - start_date).days > 0:
+                    control_date = self.get_control_date2(party, start_date)
+                    if end_date < transition_finish:
+                        current_day = end_date
+                    else:
+                        current_day = transition_finish
+                    self.add_party(party_per_day, party, current_day,
+                                   control_date)
+            else:
+                if farm:
+                    condition = party.farm == farm
+                else:
+                    condition = party.location == location_id
+                if condition:
+                    control_date = self.get_control_date2(party, start_date)
+                    self.add_party(
+                        party_per_day, party, end_date, control_date)
+        for animal in ani_obj:
+            if farm:
+                condition = animal.farm == farm
+            else:
+                condition = animal.location == location_id
+            if condition:
+                control_date = self.get_control_date2(animal, start_date)
+                self.add_party(animal_per_day, animal, end_date, control_date)
+        return [party_per_day, animal_per_day]
+
+    def add_party(self, party_per_day, party, current_day, control_date):
+        while current_day >= control_date:
+            party_per_day[current_day].append(party)
+            current_day = current_day - timedelta(days=1)
+
+    def get_control_date(self, party, start_date, transition_finish):
+        if (start_date - transition_finish).days < 1:
+            return transition_finish
+        else:
+            return start_date
+
+    def get_control_date2(self, party, start_date):
+        arrival_date = datetime.strptime(party.arrival_date, '%Y-%m-%d').date()
+        if (arrival_date - start_date).days < 0:
+            return start_date
+        else:
+            return arrival_date
+
+    def set_analytics(self, afected_animals, line, num_days, farm):
+        new_cr = sql_db.db_connect(
+            self.env.cr.dbname).cursor()
+        uid, context = \
+            self.env.uid, self.env.context
+        with api.Environment.manage():
+            new_env = api.Environment(
+                new_cr, uid, context)
+            cost_per_day = (self.get_unit_price(line, new_env) * line.product_qty)/num_days
+            animals = {}
+            for d, partys in afected_animals[0].iteritems():
+                remain = 0
+                num_animals = len(afected_animals[1][d])
+                for party in partys:
+                    num_animals += party.quantity
+                if farm:
+                    analitic_remain_ob = new_env['purchase.analitic.remain']
+                    analitic_remain = analitic_remain_ob.search([
+                        ('farm', '=', farm.id)])
+                if num_animals == 0:
+                    cost_per_animal_day = 0
+                    if len(analitic_remain) == 0:
+                        analitic_remain_ob.create({
+                            'farm': farm.id,
+                            'quantity': cost_per_day})
+                    else:
+                        analitic_remain.quantity = analitic_remain.quantity\
+                            + cost_per_day
+                else:
+                    if farm and len(analitic_remain) != 0:
+                        remain = analitic_remain.quantity
+                        analitic_remain.unlink()
+                    cost_per_animal_day = (cost_per_day + remain) / num_animals
+                for party in partys:
+                    self.set_party_cost(party, d, cost_per_animal_day, new_env)
+                for animal in afected_animals[1][d]:
+                    if animal.id in animals:
+                        animals[animal.id][1] = \
+                            animals[animal.id][1] + cost_per_animal_day
+                    else:
+                        animals[animal.id] = [animal, cost_per_animal_day, d]
+            for key in animals.iterkeys():
+                an = animals[key]
+                new_env['purchase.order'].set_animal_cost(an[0], an[2], an[1], new_env)
+            num_days -= num_days-1
+            new_env.cr.commit()
+            new_cr.close()
+            return True
+
+    @api.one
+    def set_party_cost(self, party, date, cost_per_animal_day, new_env):
+        company = new_env['res.company'].with_context({}).search([
+            ('id', '=', 1)])
+        journal = new_env['account.analytic.journal'].with_context(
+            {}).search([('code', '=', 'PUR')])
+        analytic_line_obj = new_env['account.analytic.line']
+        analytic_line_obj.create({
+            'name': self.name,
+            'date': date,
+            'amount': -(cost_per_animal_day * party.quantity),
+            'unit_amount': party.quantity,
+            'account_id': party.account.id,
+            'general_account_id': company.feed_account.id,
+            'journal_id': journal.id,
+            })
+
+    @api.one
+    def set_animal_cost(self, animal, date, cost_per_animal_day, new_env):
+        company = new_env['res.company'].with_context({}).search([
+            ('id', '=', animal.farm.company_id.id)])
+        journal = new_env['account.analytic.journal'].with_context(
+            {}).search([('code', '=', 'PUR')])
+        analytic_line_obj = new_env['account.analytic.line']
+        analytic_line_obj.create({
+            'name': self.name,
+            'date': date,
+            'amount': -cost_per_animal_day,
+            'unit_amount': 1,
+            'account_id': animal.account.id,
+            'general_account_id': company.feed_account.id,
+            'journal_id': journal.id,
+            })
+
+    @api.multi
+    def get_unit_price(self, line, new_env):
+        invoice_line = new_env['account.invoice.line'].search(
+            [('purchase_line_id', '=', line.id)])
+        if invoice_line:
+            return invoice_line[0].price_unit
+        else:
+            return line.price_unit

BIN
models/purchse_analytics.pyc


+ 195 - 0
models/removal_event.py

@@ -0,0 +1,195 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api, _
+from openerp.exceptions import Warning
+
+
+class RemovalType(models.Model):
+    _name = 'farm.removal.type'
+
+    name = fields.Char(string='Name', required=True, traslate=True)
+
+
+class RemovalReason(models.Model):
+    _name = 'farm.removal.reason'
+
+    name = fields.Char(string='Name', required=True, traslate=True)
+
+
+class RemovalEvent(models.Model):
+    _name = 'farm.removal.event'
+    _inherit = {'farm.event': 'AbstractEvent_id'}
+    _auto = True
+
+    from_location = fields.Many2one(comodel_name='stock.location',
+                                    string='Origin', required=True,
+                                    domain=[('silo', '=', False), ])
+    quantity = fields.Integer(string='Quantity', required=True,
+                              default=1)
+    removal_type = fields.Many2one(comodel_name='farm.removal.type',
+                                   string='Type')
+    reason = fields.Many2one(comodel_name='farm.removal.reason',
+                             string='Reason')
+    move = fields.Many2one(comodel_name='stock.move', string='Stock Move')
+    specific_lot = fields.Many2one(comodel_name='stock.production.lot',
+                                   string='Specific lot')
+
+    @api.multi
+    def copy(self, default={}):
+        for res in self:
+            default['animal_type'] = res.animal_type
+            default['specie'] = res.specie.id
+            default['removal_type'] = res.removal_type.id
+            default['reason'] = res.reason.id
+            default['animal'] = False
+            default['animal_group'] = False
+            default['move'] = False
+            return super(RemovalEvent, self).copy(default)
+
+    @api.one
+    @api.onchange('animal', 'animal_group')
+    def get_from_location(self):
+        if self.animal_type == 'group':
+            self.from_location = self.animal_group.location
+            self.quantity = self.animal_group.quantity
+        else:
+            self.from_location = self.animal.location
+
+    @api.one
+    def confirm(self):
+        if not self.is_compatible_quant():
+            return False
+        elif not self.is_compatible_to_location():
+            return False
+        ani = None
+        party = None
+        if self.animal_type == 'group':
+            self.remove_group()
+        else:
+            self.remove_animal()
+        if self.animal:
+            ani = self.animal.id
+        else:
+            party = self.animal_group.id
+        self.env['farm.move.event'].create({
+                            'animal_type': self.animal_type,
+                            'specie': self.specie.id,
+                            'farm': self.farm.id,
+                            'animal': ani,
+                            'animal_group': party,
+                            'timestamp': self.timestamp,
+                            'from_location': self.from_location.id,
+                            'to_location': self.move.location_dest_id.id,
+                            'quantity': self.quantity,
+                            'unit_price': 1,
+                            'move': self.move.id,
+                            })
+        super(RemovalEvent, self).confirm()
+
+    @api.one
+    def remove_group(self):
+        moves_obj = self.env['stock.move']
+        quants_obj = self.env['stock.quant']
+        scrap_loc = self.animal_group.specie.removed_location
+        if len(self.specific_lot) == 0:
+            if len(self.animal_group.lot) < 3:
+                lot = self.animal_group.lot[0].lot
+            else:
+                lot = self.animal_group.lot[2].lot
+        else:
+            lot = self.specific_lot
+        target_quant = quants_obj.search([
+            ('lot_id', '=', lot.id),
+            ('location_id', '=', self.from_location.id),
+            ])
+        product_uom = \
+            lot.product_id.product_tmpl_id.uom_id.id
+        new_move = moves_obj.create({
+            'name': 'remove-' + self.animal_group.number,
+            'create_date': fields.Date.today(),
+            'date': self.timestamp,
+            'product_id': lot.product_id.id,
+            'product_uom_qty': self.quantity,
+            'product_uom': product_uom,
+            'location_id': self.from_location.id,
+            'location_dest_id': scrap_loc.id,
+            'company_id': self.animal_group.initial_location.company_id.id,
+            'origin': self.animal_group.number,
+            })
+        for q in target_quant:
+            q.reservation_id = new_move.id
+        new_move.action_done()
+        self.move = new_move
+        self.animal_group.quantity -= self.quantity
+        if self.animal_group.quantity < 1:
+            self.animal_group.removal_date = self.timestamp
+            tags_obj = self.env['farm.tags']
+            for tag in self.animal_group.tags:
+                tag.animal_group = [(3, self.animal_group.id)]
+            new_tag = tags_obj.search([
+                ('name', '=', 'Removed Animals')])
+            if len(new_tag) == 0:
+                new_tag = tags_obj.create(
+                    {'name': 'Removed Animals', })
+            self.animal_group.tags = [(6, 0, [new_tag.id, ])]
+            self.animal_group.state = 'sold'
+
+    @api.one
+    def remove_animal(self):
+        moves_obj = self.env['stock.move']
+        quants_obj = self.env['stock.quant']
+        scrap_loc = self.env['stock.location'].search([
+            ('scrap_location', '=', True)])[0]
+        target_quant = quants_obj.search([
+            ('lot_id', '=', self.animal.lot.lot.id),
+            ('location_id', '=', self.from_location.id),
+            ])
+        product_uom = \
+            self.animal.lot.lot.product_id.product_tmpl_id.uom_id.id
+        new_move = moves_obj.create({
+            'name': 'remove-' + self.animal.number,
+            'create_date': fields.Date.today(),
+            'date': self.timestamp,
+            'product_id': self.animal.lot.lot.product_id.id,
+            'product_uom_qty': self.quantity,
+            'product_uom': product_uom,
+            'location_id': self.from_location.id,
+            'location_dest_id': scrap_loc.id,
+            'company_id': self.animal.location.company_id.id,
+            'origin': self.animal.lot.lot.name,
+            })
+        for q in target_quant:
+            q.reservation_id = new_move.id
+        new_move.action_done()
+        self.animal.removal_date = self.timestamp
+        self.animal.removal_reason = self.reason
+        self.animal.active = False
+        self.move = new_move
+
+    def is_compatible_quant(self):
+        if self.animal_type == 'individual' or \
+            self.animal_type == 'male' or \
+                self.animal_type == 'female':
+            if self.quantity != 1 or self.quantity < 1:
+                raise Warning(
+                    _('Quantity no compatible'))
+        elif self.quantity > self.animal_group.quantity or self.quantity < 1:
+            raise Warning(
+                _('Quantity no compatible'))
+        return True
+
+    def is_compatible_to_location(self):
+        if self.animal_type == 'group':
+            if self.animal_group.location.id != self.from_location.id:
+                raise Warning(
+                    _('the origin is different from the location of'
+                      ' the group'))
+        else:
+            if self.animal.location.id != self.from_location.id:
+                raise Warning(
+                    _('the origin is different from the location of'
+                      ' the animal'))
+        return True

BIN
models/removal_event.pyc


+ 13 - 0
models/res_company.py

@@ -0,0 +1,13 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields
+
+
+class Res_company(models.Model):
+    _inherit = 'res.company'
+
+    feed_account = fields.Many2one(comodel_name='account.account',
+                                   string='Consumed Feed Account')

BIN
models/res_company.pyc


+ 258 - 0
models/semen_extration_event.py

@@ -0,0 +1,258 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api, _
+from openerp.exceptions import Warning
+import math
+
+
+class SemenExtractionEvent(models.Model):
+    _name = 'farm.semen_extraction.event'
+    _inherit = {'farm.event': 'AbstractEvent_id'}
+    _auto = True
+
+    semen_product = fields.Many2one(comodel_name='product.product',
+                                    string="Semen's Product")
+    untreated_semen_qty = fields.Float(string='Semen Extracted Qty',
+                                       required=True, digits=(16, 3))
+    formula_result = fields.Float(string='Formula Result', required=True)
+    solvent_calculated_qty = fields.Float(string='Calc. semen solvent Qty',
+                                          compute='get_solvent_qty')
+    semen_calculated_qty = fields.Float(string='Calc. Semen Produced Qty',
+                                        compute='get_semen_calculated_qty')
+    semen_qty = fields.Float(string='Semen Producec Quantity', digits=(16, 3))
+    semen_lot = fields.Many2one(comodel_name='stock.production.lot',
+                                string='Semen lot')
+    semen_move = fields.Many2one(comodel_name='stock.move', string='Move')
+    dose_location = fields.Many2one(comodel_name='stock.location',
+                                    string='Doses Location',
+                                    domain=[('usage', '=', 'internal')],
+                                    required=True)
+    dose_bom = fields.Many2one(comodel_name='mrp.bom',
+                               string='Dose Container',
+                               )
+    dose_calculated_units = fields.Float(
+        string='Calculated Doses',
+        help='Calculates the number of doses based on Container (BoM) and '
+        'Semen Produced Qty. The quantity is expressed in the UoM of the '
+        'Container.\n'
+        'You have to save the event to see this calculated value.',
+        compute='on_change_with_dose_calculated_units')
+    doses = fields.One2many(comodel_name='farm.semen_extraction.dose',
+                            inverse_name='event', string='Doses')
+    doses_semen_qty = fields.Float(string='Dose Semen Qty',
+                                   compute='on_change_with_doses_semen_qty')
+    semen_remaining_qty = fields.Float(
+        string='Remaining Semen',
+        compute='on_change_with_semen_remaining_qty')
+
+    @api.onchange('specie')
+    def onchange_specie(self):
+        return {'domain': {
+                'semen_product': [('id', '=', self.specie.semen_product.id)]}}
+
+    @api.one
+    def get_solvent_qty(self):
+        self.solvent_calculated_qty = \
+            self.semen_calculated_qty - self.untreated_semen_qty
+
+    @api.one
+    def get_semen_calculated_qty(self):
+        self.semen_calculated_qty = \
+            self.untreated_semen_qty * self.formula_result
+
+    @api.one
+    def on_change_with_dose_calculated_units(self):
+        if not self.dose_bom or not self.semen_qty:
+            self.dose_calculated_units = 0.0
+        else:
+            consumed_semen_qty = 0.0
+            for line in self.dose_bom.bom_line_ids:
+                if line.product_id == self.specie.semen_product:
+                    consumed_semen_qty = line.product_qty
+            if consumed_semen_qty == 0:
+                self.dose_calculated_units = 0.0
+            else:
+                self.dose_calculated_units = \
+                    float(self.semen_qty)/consumed_semen_qty
+
+    @api.one
+    def on_change_with_semen_remaining_qty(self):
+        semen_remaining_qty = self.semen_qty or 0
+        if self.semen_qty is None or not self.doses:
+            self.semen_remaining_qty = semen_remaining_qty
+        else:
+            for dose in self.doses:
+                semen_remaining_qty -= dose.semen_qty or 0.0
+            self.semen_remaining_qty = semen_remaining_qty
+
+    @api.one
+    def on_change_with_doses_semen_qty(self):
+        if self.semen_qty is None or not self.doses:
+            self.doses_semen_qty = 0.0
+        else:
+            doses_qty = 0.0
+            for dose in self.doses:
+                doses_qty += dose.semen_qty or 0.0
+            self.doses_semen_qty = doses_qty
+
+    def is_valid(self):
+        for extraction_event in self:
+            extraction_event.check_doses_semen_quantity()
+            extraction_event.check_deliveries_dose_quantity()
+
+    def check_doses_semen_quantity(self):
+        if self.semen_remaining_qty < 0.0:
+            raise Warning(
+                _('More semen in doses than produced'))
+
+    @api.one
+    def calculate_doses(self):
+        Dose_obj = self.env['farm.semen_extraction.dose']
+        for extraction_event in self:
+            if extraction_event.doses:
+                raise Warning(
+                    _('dose already defined'))
+            if not extraction_event.dose_bom:
+                continue
+            n_doses = math.floor(extraction_event.dose_calculated_units)
+            Dose_obj.create({
+                'event': extraction_event.id,
+                'sequence': 1,
+                'bom': extraction_event.dose_bom.id,
+                'quantity': n_doses})
+
+    @api.one
+    def confirm(self):
+        self.check_doses_semen_quantity()
+        for extraction_event in self:
+            if not extraction_event.doses:
+                raise Warning(
+                    _('no doses'))
+            self.get_semen_move()
+            for dose in extraction_event.doses:
+                dose.get_production()
+                dose.state = 'validated'
+        super(SemenExtractionEvent, extraction_event).confirm()
+
+    @api.one
+    def get_semen_move(self):
+        move_obj = self.env['stock.move']
+        lot_obj = self.env['stock.production.lot']
+        new_lot = lot_obj.create({
+            'product_id': self.specie.semen_product.id})
+        production_location = self.env['stock.location'].search(
+            [('usage', '=', 'production')])
+        new_move = move_obj.create({
+            'name': 'extrac' + new_lot.name,
+            'product_id': self.specie.semen_product.id,
+            'product_uom_qty': self.semen_qty,
+            'location_id': production_location.id,
+            'location_dest_id': self.dose_location.id,
+            'date': self.timestamp,
+            'company_id': self.farm.company_id.id,
+            'origin': 'extraction' + self.lot.name,
+            'product_uom':
+                self.specie.semen_product.product_tmpl_id.uom_id.id,
+            })
+        new_move.action_done()
+        for q in new_move.quant_ids:
+            q.lot_id = new_lot.id
+        self.semen_move = new_move
+        self.semen_lot = new_lot
+
+
+class SemenExtractionDose(models.Model):
+    _name = 'farm.semen_extraction.dose'
+    _order = 'sequence ASC'
+
+    event = fields.Many2one(comodel_name='farm.semen_extraction.event',
+                            string='Event')
+    specie = fields.Many2one(comodel_name='farm.specie', string='Specie',
+                             compute='get_specie')
+    state = fields.Selection(string='state',
+                             selection=[
+                                    ('draft', 'Draft'),
+                                    ('validated', 'Validated')],
+                             default='draft')
+    sequence = fields.Integer(string='Line Num', required=True)
+    bom = fields.Many2one(comodel_name='mrp.bom', string='Container',
+                          required=True,
+                          domain=[('semen_dose', '=', True), ])
+    quantity = fields.Integer(string='Quantity', required=True)
+    semen_qty = fields.Float(string='Semen Qty', compute='get_qty')
+    dose_product = fields.Many2one(comodel_name='product.product',
+                                   string="Dose Product")
+    production = fields.Many2one(comodel_name='mrp.production',
+                                 string='production')
+    lot = fields.Many2one(comodel_name='stock.production.lot',
+                          string='Lot')
+
+    @api.one
+    def get_qty(self):
+        if not self.event or not self.bom or not self.quantity:
+            self.semen_qty = False
+        else:
+            semen_product = self.event.specie.semen_product
+            semen_qty = 0.0
+            for line in self.bom.bom_line_ids:
+                if line.product_id == semen_product:
+                    semen_qty = line.product_qty*self.quantity
+                    break
+            self.semen_qty = semen_qty
+
+    @api.one
+    def get_specie(self):
+        self.specie = self.event.specie
+
+    @api.one
+    def get_production(self):
+        production_location = self.env['stock.location'].search(
+            [('usage', '=', 'production')])
+        production_obj = self.env['mrp.production']
+        products_obj = self.env['product.product']
+        produce_line_obj = self.env['mrp.product.produce.line']
+        wiz_product_produce_obj = self.env['mrp.product.produce']
+        manu_product = products_obj.search(
+            [('product_tmpl_id', '=', self.bom.product_tmpl_id.id)])
+        new_production = production_obj.create({
+            'name': self.event,
+            'date_planned': self.event.timestamp,
+            'company_id': self.event.farm.company_id.id,
+            'product_id': manu_product.id,
+            'bom_id': self.bom.id,
+            'product_uom': self.bom.product_tmpl_id.uom_id.id,
+            'location_src_id': self.event.dose_location.id,
+            'location_dest_id': self.event.dose_location.id,
+            'product_qty': self.quantity,
+            'origin': self.event.job_order.name
+            })
+        new_production.action_confirm()
+        new_production.action_ready()
+        '''
+        for line in new_production.move_lines:
+            line.location_id = production_location
+        '''
+        lots_obj = self.env['stock.production.lot']
+        new_lot = lots_obj.create({
+            'product_id': manu_product.id, })
+        new_wiz_production = wiz_product_produce_obj.create({
+            'product_id': manu_product.id,
+            'product_qty': self.quantity,
+            'mode': 'consume_produce',
+            'lot_id': new_lot.id,
+            })
+        for line in new_production.move_lines:
+            produce_line_obj.create({
+                'product_id': line.product_id.id,
+                'product_qty': line.product_uom_qty,
+                'lot_id': self.event.semen_lot.id,
+                'produce_id': new_wiz_production.id,
+                })
+        new_production.action_produce(self.quantity,
+            'consume_produce', new_wiz_production)
+        new_production.action_production_end()
+        self.production = new_production
+        self.lot = new_lot

BIN
models/semen_extration_event.pyc


+ 162 - 0
models/specie.py

@@ -0,0 +1,162 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api
+
+
+class Specie(models.Model):
+    _name = 'farm.specie'
+
+    name = fields.Char(string='name', traslate=True, required=True,
+                       help='Name of the specie. ie. "Pig"')
+    male_product = fields.Many2one(
+        comodel_name='product.product', string="Male's Product")
+    male_enabled = fields.Boolean(
+        string='Males Enabled',
+        default=True, )
+    female_product = fields.Many2one(
+        comodel_name='product.product',
+        string="Female's Product", )
+    female_enabled = fields.Boolean(
+        string='Females Enabled',
+        default=True, )
+    individual_product = fields.Many2one(
+        comodel_name='product.product',
+        string="Individual's Product", )
+    individual_enabled = fields.Boolean(
+        string='Individuals Enabled', default=True, )
+    group_product = fields.Many2one(
+        comodel_name='product.product', string="Group's Product")
+    group_enabled = fields.Boolean(
+        string='Groups Enabled', default=True, )
+    semen_product = fields.Many2one(
+        comodel_name='product.product', string="Semen's Product",
+        help="Product for the mixture of semen to raise the expected "
+        "quality.\nIt is used in the Production lots produced in the "
+        "Extraction Events and in the BoM containers for doses used in "
+        "deliveries to farms for inseminations.")
+    sale_product = fields.Many2one(comodel_name='product.product',
+                                   string='Product denomination in sales',
+                                   help='use when you sale animal units but'
+                                   ' customer pay meat kilogram')
+    breeds = fields.One2many(comodel_name='farm.specie.breed',
+                             inverse_name='specie', string='Breeds')
+    farm_lines = fields.One2many(comodel_name='farm.specie.farm_line',
+                                 inverse_name='specie', string='Farms')
+    removed_location = fields.Many2one(
+        comodel_name='stock.location', string='Removed Location',
+        domain=[('usage', '=', 'transit')],
+        required=True,
+        help='Virtual location where removed animals are moved to.')
+    foster_location = fields.One2many(
+        comodel_name='farm.foster.locations', inverse_name='specie',
+        string='Foster Location',
+        help='Virtual location where fostered animals are moved to.')
+    lost_found_location = fields.One2many(
+        comodel_name='farm.transit.locations', inverse_name='specie',
+        string='Transit Location',
+        help='Virtual location where lost or found animals are moved to.')
+    future_maders_location = fields.One2many(
+        comodel_name='farm.future_maders.locations', inverse_name='specie',
+        string='Future maders location')
+    feed_lost_found_location = fields.Many2one(
+        comodel_name='stock.location', inverse_name='specie',
+        string='Feed transit',
+        domain=[('usage', '=', 'transit')])
+    consumed_feed_location = fields.Many2one(
+        comodel_name='stock.location', string='consumed feed location',
+        domain=[('usage', '=', 'inventory'), ('scrap_location', '=', True)],
+        required=True)
+
+    @api.onchange('male_enabled')
+    def onChange_male_enabled(self):
+        if self.male_enabled is False:
+            self.male_product = False
+
+    @api.onchange('female_enabled')
+    def onChange_female_enabled(self):
+        if self.female_enabled is False:
+            self.female_product = False
+
+    @api.onchange('individual_enabled')
+    def onChange_individual_enabled(self):
+        if self.individual_enabled is False:
+            self.individual_product = False
+
+    @api.onchange('individual_enabled')
+    def onChange_group_enabled(self):
+        if self.group_enabled is False:
+            self.group_product = False
+
+
+class Breed(models.Model):
+    'Breed of Specie'
+    _name = 'farm.specie.breed'
+
+    specie = fields.Many2one(comodel_name='farm.specie',
+                             string='Specie', required=True,
+                             ondelete='CASCADE')
+    name = fields.Char(string='Name', required=True)
+
+
+class SpecieFarmLine(models.Model):
+    'Managed Farm of specie'
+    _name = 'farm.specie.farm_line'
+
+    specie = fields.Many2one(comodel_name='farm.specie',
+                             string='Specie', required=True,
+                             ondelete='CASCADE')
+    farm = fields.Many2one(comodel_name='stock.location',
+                           string='Farm', required=True,
+                           domain=[('usage', '=', 'view')])
+    event_order_sequence = fields.Many2one(
+        comodel_name='ir.sequence',
+        string="Events Orders' Sequence", required=True, domain=[
+            ('code', '=', 'farm.event.order')
+            ],
+        help="Sequence used for the Event Orders in this farm.")
+    has_male = fields.Boolean(string='Males',
+                              help="In this farm there are males.")
+    male_sequence = fields.Many2one(
+        comodel_name='ir.sequence', string="Males' Sequence",
+        domain=[('code', '=', 'farm.animal')],
+        help='Sequence used for male lots and animals.')
+    semen_lot_sequence = fields.Many2one(
+        comodel_name='ir.sequence',
+        string="Extracted Semen Lots' Sequence",
+        domain=[('code', '=', 'stock.lot')])
+    dose_lot_sequence = fields.Many2one(
+        comodel_name='ir.sequence',
+        string="Semen Dose Lots' Sequence",
+        domain=[('code', '=', 'stock.lot')])
+    has_female = fields.Boolean(string='Females',
+                                help="In this farm there are females.")
+    female_sequence = fields.Many2one(
+        comodel_name='ir.sequence', string="Females' Sequence",
+        domain=[('code', '=', 'farm.animal')],
+        help='Sequence used for female production lots and animals.')
+    has_individual = fields.Boolean(string='Individuals',
+                                    help="In this farm there are individuals.")
+    individual_sequence = fields.Many2one(
+        comodel_name='ir.sequence',
+        string="Individuals' Sequence", domain=[('code', '=', 'farm.animal')],
+        help="Sequence used for individual lots and animals.")
+    has_group = fields.Boolean(string='Groups',
+                               help="In this farm there are groups.")
+    group_sequence = fields.Many2one(
+        comodel_name='ir.sequence', string="Groups' Sequence",
+        domain=[('code', '=', 'farm.animal.group')],
+        help='Sequence used for group production lots and animals.')
+
+
+class SpecieModel(models.Model):
+    'Specie - Model'
+
+    _name = 'farm.specie.ir.model'
+    specie = fields.Many2one(comodel_name='farm.specie', string='Specie',
+                             ondelete='CASCADE',
+                             required=True, select=True)
+    model = fields.Many2one(comodel_name='ir.model', string='Model',
+                            required=True, select=True)

BIN
models/specie.pyc


+ 298 - 0
models/stock.py

@@ -0,0 +1,298 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api, _
+from openerp.exceptions import Warning
+
+ANIMAL_TYPE = [(None, 'No animal'), ('male', 'Male)'), ('female', 'Female'),
+               ('individual', 'Individual'), ('group', 'Group'), ]
+
+
+class stock_move(models.Model):
+    _inherit = 'stock.move'
+
+    @api.model
+    def _get_invoice_line_vals(self, move, inv_type, contetx=None):
+        res = super(stock_move, self)._get_invoice_line_vals(move,
+                                                             inv_type, contetx)
+        specie = self.env['farm.specie'].search([
+            (True, '=', True)])[0]
+        if len(specie.sale_product) != 0:
+            alter_prod = specie.sale_product
+            if res['product_id'] == specie.group_product.id or \
+                    res['product_id'] == specie.female_product.id or \
+                    res['product_id'] == specie.male_product.id:
+                            res['animal_qty'] = res['quantity']
+                            res['product_id'] = alter_prod.id
+                            res['uos_id'] = alter_prod.uos_id.id
+                            res['quantity'] = 1
+                            farm = move.location_id.get_farm_warehouse().id
+                            res['farm'] = farm
+
+        return res
+
+    @api.multi
+    def action_done(self):
+        super(stock_move, self).action_done()
+        customer_location = self.env['stock.location'].search([
+            ('usage', '=', 'customer')])
+        for line in self:
+            if customer_location.id == line.location_dest_id.id:
+                lots = []
+                for lot in line.quant_ids:
+                    lots.append(lot.lot_id.name)
+                animals_obj = self.env['farm.animal.group']
+                partys = animals_obj.search([
+                    ('state', '!=', 'sold'),
+                    ('location', 'child_of', line.location_id.id)])
+                sale_animal = []
+                for party in partys:
+                    for lot in lots:
+                        if party.number == lot and party not in sale_animal:
+                            sale_animal.append(party)
+                if len(sale_animal) > 0:
+                    self.sale_group(sale_animal)
+                else:
+                    species_obj = self.env['farm.specie'].search(
+                        [(True, '=', True)])
+                    for specie in species_obj:
+                        if line.product_id.id == specie.group_product.id:
+                            raise Warning(_('group sold not found'))
+
+    @api.one
+    def sale_group(self, groups):
+        for group in groups:
+            for lot in self.quant_ids:
+                if lot.lot_id.name == group.number:
+                    if lot.qty == group.quantity:
+                        self.totalSale(group, lot.qty)
+                    elif lot.qty < group.quantity and group.state != 'sold':
+                        group.quantity = group.quantity - lot.qty
+                        farm_mov_obj = self.env['farm.move.event']
+                        farm_mov_obj.create({
+                            'animal_type': 'group',
+                            'specie': group.specie.id,
+                            'farm': group.farm.id,
+                            'animal_group': group.id,
+                            'timestamp': self.picking_id.date,
+                            'from_location': group.location.id,
+                            'to_location': self.location_dest_id.id,
+                            'quantity': lot.qty,
+                            'unit_price': 1,
+                            'move': self.id,
+                        })
+                    else:
+                        raise Warning(
+                            _('there are insufficient nº of animals'))
+
+    @api.one
+    def totalSale(self, group, qty):
+        group.state = 'sold'
+        group.removal_date = self.date
+        farm_mov_obj = self.env['farm.move.event']
+        group.quantity = 0
+        farm_mov_obj.create({
+            'animal_type': 'group',
+            'specie': group.specie.id,
+            'farm': group.farm.id,
+            'animal_group': group.id,
+            'timestamp': self.picking_id.date,
+            'from_location': group.location.id,
+            'to_location': self.location_dest_id.id,
+            'quantity': qty,
+            'unit_price': 1,
+            'move': self.id,
+            })
+        tags_obj = self.env['farm.tags']
+        new_tag = tags_obj.search([
+            ('name', '=', group.farm.name + '-Sold')])
+        if len(new_tag) == 0:
+            new_tag = tags_obj.create(
+                {'name': group.farm.name + '-Sold', })
+        group.tags = [(6, 0, [new_tag.id, ])]
+
+
+class Lot(models.Model):
+    _inherit = 'stock.production.lot'
+
+    animal_type = fields.Selection(selection=ANIMAL_TYPE)
+    animal_group = fields.One2many(comodel_name='stock.lot_farm.animal.group',
+                                   inverse_name='animal_group', string='Group')
+    semen_breed = fields.Many2one(comodel_name='farm.specie.breed',
+                                  string='Raza')
+
+
+class LotAnimal(models.Model):
+    _name = 'stock.lot_farm.animal'
+    _rec_name = 'lot'
+
+    lot = fields.Many2one(comodel_name='stock.production.lot',
+                          string='Lot')
+    animal = fields.Many2one(comodel_name='farm.animal', string='Animal',
+                             ondelete='RESTRICT', select=True)
+
+
+class LotAnimalGroup(models.Model):
+    _name = 'stock.lot_farm.animal.group'
+    _rec_name = 'lot'
+
+    lot = fields.Many2one(comodel_name='stock.production.lot',
+                          string='Lot', required=True,
+                          ondelete='RESTRICT', select=True)
+    animal_group = fields.Many2one(
+        comodel_name='farm.animal.group',
+        string='Animal Group', required=True,
+        ondelete='RESTRICT', select=True)
+
+
+class Warehouse(models.Model):
+    _inherit = 'stock.warehouse'
+
+    external = fields.Boolean(String='External Farm')
+    holding_number = fields.Char(string='holding number')
+    radius = fields.Float(string='Radius', help='is used for calculating '
+                          'transport costs, you can use absolute or relative'
+                          ' values', default=1)
+    animal_max = fields.Integer(string='Max num of animals')
+
+
+class Location(models.Model):
+    _inherit = 'stock.location'
+
+    silo = fields.Boolean(string='Silo', select=True, default=False,
+                          help='Indicates that the location is a silo.')
+    factory = fields.Boolean(string='Factory', default=False)
+    transport = fields.Boolean(string='Transport', default=False)
+    farm_yard = fields.Boolean(string='Farm Yard', select=True, default=False)
+    locations_to_fed = fields.One2many(
+        comodel_name='stock.location.silo_stock.location',
+        inverse_name='silo', string='Location to fed',
+        help='Indicates the locations the silo feeds. Note that this will '
+        'only be a default value.')
+    animal_max = fields.Integer(string='Max num of animals')
+
+    @api.multi
+    def get_farm_warehouse(self):
+        for res in self:
+            view_loc = res
+            while view_loc.usage != 'view':
+                view_loc = view_loc.location_id
+            warehouse = self.env['stock.warehouse'].search([
+                ('view_location_id', '=', view_loc.id)])
+        return warehouse
+
+
+class LocationSiloLocation(models.Model):
+    _name = 'stock.location.silo_stock.location'
+
+    silo = fields.Many2one(comodel_name='stock.location', string='silo',
+                           ondelete='CASCADE', required=True, select=True)
+    location = fields.Many2one(comodel_name='stock.location',
+                               string='Location',
+                               ondelete='CASCADE', required=True, select=True)
+
+
+class Foster_location_stock(models.Model):
+    _name = 'farm.foster.locations'
+    _rec_name = 'location'
+
+    specie = fields.Many2one(comodel_name='farm.specie', string='specie')
+    location = fields.Many2one(comodel_name='stock.location',
+                               string='Location',
+                               domain=[('usage', '=', 'transit')])
+
+
+class Transit_location_stock(models.Model):
+    _name = 'farm.transit.locations'
+    _rec_name = 'location'
+
+    specie = fields.Many2one(comodel_name='farm.specie', string='specie')
+    location = fields.Many2one(comodel_name='stock.location',
+                               string='Location',
+                               domain=[('usage', '=', 'transit')])
+
+
+class Future_maders_location_stock(models.Model):
+    _name = 'farm.future_maders.locations'
+    _rec_name = 'location'
+
+    specie = fields.Many2one(comodel_name='farm.specie', string='specie')
+    location = fields.Many2one(comodel_name='stock.location',
+                               string='Location',
+                               domain=[('usage', '=', 'transit')])
+
+
+class StockInventory(models.Model):
+    _inherit = 'stock.inventory'
+
+    feed_analitic = fields.Boolean('Set Feed Analitic', default=False)
+
+
+class StockInventoryLine(models.Model):
+    _inherit = 'stock.inventory.line'
+
+    @api.model
+    def _resolve_inventory_line(self, inventory_line):
+        res = super(
+            StockInventoryLine, self)._resolve_inventory_line(
+                inventory_line)
+        if res:
+            move = self.env['stock.move'].search([('id', '=', res)])
+            diff = inventory_line.theoretical_qty - inventory_line.product_qty
+            if inventory_line.inventory_id.feed_analitic:
+                if diff < 0:
+                    self.set_analitics(move, False)
+                else:
+                    self.set_analitics(move, True)
+        return res
+
+    @api.multi
+    def set_analitics(self, move, lost):
+        analitic_remain_ob = self.env['purchase.analitic.remain']
+        if lost:
+            location = move.location_id
+        else:
+            location = move.location_dest_id
+        factory = location
+        while(factory.location_id.id != 1):
+            factory = factory.location_id
+        analitic_remain = analitic_remain_ob.search([
+                                    ('farm', '=', factory.id)])
+        lot_cost = move.restrict_lot_id.unit_cost
+        qty = move.product_uom_qty
+        cost = 0
+        if lot_cost and lot_cost > 0:
+            cost = lot_cost * qty
+        else:
+            quants_obj = self.env['stock.quant']
+            quants = quants_obj.search([
+                ('lot_id', '=', move.restrict_lot_id.id)])
+            ids = []
+            for q in quants:
+                ids.append(q.id)
+            moves = self.env['stock.move'].with_context({}).search([
+                ('quant_ids', 'in', ids),
+                ('picking_id', '!=', False)])
+            amount = 0.0
+            raw_qty = 0
+            for mov in moves:
+                if mov.price_unit > 0:
+                    amount += mov.price_unit * mov.product_qty
+                    raw_qty = raw_qty + mov.product_qty
+            if raw_qty > 0:
+                unit_price = amount/raw_qty
+                cost += qty * unit_price
+            if cost == 0:
+                prod_tmpl = move.product_id.product_tmpl_id
+                cost = prod_tmpl.standard_price * qty
+        if not lost:
+            cost = cost * -1
+        if len(analitic_remain) == 0:
+            analitic_remain_ob.create({
+                'farm': factory.id,
+                'quantity': cost})
+        else:
+            analitic_remain.quantity = \
+                analitic_remain.quantity + cost

BIN
models/stock.pyc


+ 443 - 0
models/transformation_event.py

@@ -0,0 +1,443 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api,  _
+from openerp.exceptions import Warning
+
+
+class TransformationEvent(models.Model):
+    _name = 'farm.transformation.event'
+    _inherit = {'farm.event': 'AbstractEvent_id'}
+    _auto = True
+
+    from_location = fields.Many2one(comodel_name='stock.location',
+                                    string='Origin', required=True)
+    to_animal_type = fields.Selection(selection=[
+        ('male', 'Male'),
+        ('female', 'Female'),
+        ('individual', 'Individual'),
+        ('group', 'Group'),
+        ], string='Animal Type to Trasform', requiered=True)
+    to_location = fields.Many2one(comodel_name='stock.location',
+                                  string='Destination', required=True,
+                                  domain=[('usage', '=', 'internal'),
+                                          ('silo', '=', False), ])
+    quantity = fields.Integer(string='Quantity', required=True,
+                              default=1)
+    to_animal = fields.Many2one(comodel_name='farm.animal',
+                                string='Destination Animal',
+                                select=True)
+    to_animal_group = fields.Many2one(comodel_name='farm.animal.group',
+                                      string='Destination Group',
+                                      select=True,
+                                      help='Select a Destination Group if you'
+                                      'want to add the transformed animals to'
+                                      'this group. To create a new group leave'
+                                      ' it empty.')
+    move = fields.Many2one(comodel_name='stock.move',
+                           string='Stock Move', readonly=True)
+
+    @api.one
+    @api.onchange('animal', 'animal_group')
+    def get_from_location(self):
+        if self.animal_type == 'group':
+            self.from_location = self.animal_group.location
+            self.quantity = self.animal_group.quantity
+            self.to_animal_group = self.animal_group
+        else:
+            self.from_location = self.animal.location
+
+    @api.one
+    def confirm(self):
+        if not self.is_compatible_trasformation():
+            raise Warning(
+                _('Destination animal type no compatible'))
+        elif not self.is_compatible_quant():
+            return False
+        elif not self.is_compatible_to_location():
+            return False
+        if self.animal_type == 'group' and self.to_animal_type == 'group':
+            if self.animal_group != self.to_animal_group:
+                self.group_to_group()
+            else:
+                self.move_group()
+        elif self.to_animal_type == 'group':
+                self.individual_to_group()
+        else:
+            self.group_to_indvidual()
+        ani = False
+        party = False
+        if self.animal:
+            ani = self.animal.id
+        else:
+            party = self.animal_group.id
+        self.env['farm.move.event'].create({
+                            'animal_type': self.animal_type,
+                            'specie': self.specie.id,
+                            'farm': self.farm.id,
+                            'animal': ani,
+                            'animal_group': party,
+                            'from_location': self.from_location.id,
+                            'timestamp': self.timestamp,
+                            'to_location': self.to_location.id,
+                            'quantity': self.quantity,
+                            'unit_price': 1,
+                            'move': self.move.id,
+                            })
+        super(TransformationEvent, self).confirm()
+
+    def is_compatible_trasformation(self):
+        if self.animal_type == 'female' or self.animal_type == 'male':
+            if self.to_animal_type == 'male' or \
+                    self.to_animal_type == 'female':
+                return False
+        elif self.animal_type == 'individual':
+            if self.to_animal_type == 'individual':
+                return False
+        return True
+
+    def is_compatible_quant(self):
+        if self.to_animal_type == 'individual' or \
+            self.animal_type == 'male' or \
+                self.animal_type == 'female' or self.to_animal_type != 'group':
+            if self.quantity != 1:
+                raise Warning(
+                    _('Quantity no compatible'))
+        elif self.animal_group.quantity < self.quantity:
+            raise Warning(
+                _('quantity is biger than group quantity'))
+        elif self.quantity < 1:
+            raise Warning(
+                _('quantity is smaler than one'))
+        return True
+
+    def is_compatible_to_location(self):
+        if self.animal_type == 'group' and self.to_animal_type == 'group':
+            if self.to_animal_group != self.animal_group:
+                if self.to_animal_group.location.id != \
+                        self.to_location.id:
+                    raise Warning(
+                        _('the destination is different from the location of'
+                          ' the destination group'))
+        elif self.animal_type != 'group':
+            if self.to_animal_group.location.id != \
+                    self.to_location.id:
+                raise Warning(
+                    _('the destination is different from the location of'
+                      ' the destination group'))
+        elif self.animal_group.location == self.to_location:
+            raise Warning(
+                _('the destination of animal is the same of the location'
+                  'of the origin group'))
+        return True
+
+    @api.one
+    def group_to_group(self):
+        moves_obj = self.env['stock.move']
+        quants_obj = self.env['stock.quant']
+        production_lot_obj = self.env['stock.production.lot']
+        animal_group_lot_obj = self.env['stock.lot_farm.animal.group']
+        lots = []
+        lot_ids = []
+        old_lots = []
+        for lot in self.animal_group.lot:
+            lot_ids.append(lot.lot.id)
+            old_lots.append(lot)
+        if len(self.animal_group.lot) > 1:
+            lot_id = self.animal_group.lot[2].lot
+        else:
+            lot_id = self.animal_group.lot[0].lot
+        product_id = lot_id.product_id.id
+        product_uom = \
+            lot_id.product_id.product_tmpl_id.uom_id.id
+        initial_location = self.animal_group.location.id
+        for lot in self.to_animal_group.lot:
+            lots.append(lot.id)
+        for lot in old_lots:
+            duplicate_lot = animal_group_lot_obj.create({
+                'animal_group': self.to_animal_group.id,
+                'lot': lot.lot.id})
+            lots.append(duplicate_lot.id)
+        self.to_animal_group.initial_quantity += self.quantity
+        self.to_animal_group.quantity += self.quantity
+        target_quants = quants_obj.search([
+            ('lot_id', 'in', lot_ids),
+            ('location_id', '=', initial_location),
+            ])
+        if len(self.to_animal_group.lot) < 3:
+            new_lot = production_lot_obj.create({
+                'product_id': product_id,
+                'animal_type': 'group',
+                })
+            new_animal_group_lot = animal_group_lot_obj.create({
+                'lot': new_lot.id,
+                'animal_group': self.to_animal_group.id})
+            lots.append(new_animal_group_lot.id)
+            desty_quants = quants_obj.search([
+                ('lot_id', '=', self.to_animal_group.lot[0].lot.id),
+                ('location_id', '=', self.to_location.id),])
+            for q in desty_quants:
+                q.lot_id = new_lot
+        else:
+            new_lot = self.to_animal_group.lot[2].lot
+        self.to_animal_group.lot = [(6, 0, lots)]
+        new_move = moves_obj.create({
+            'name': 'regroup-' + new_lot.name,
+            'create_date': fields.Date.today(),
+            'date': self.timestamp,
+            'product_id': product_id,
+            'product_uom_qty': self.quantity,
+            'product_uom': product_uom,
+            'location_id': initial_location,
+            'location_dest_id': self.to_animal_group.location.id,
+            'origin': self.job_order.name
+            })
+        master_q = None
+        for q in target_quants:
+            if master_q is None:
+                q.lot_id = new_lot
+                master_q = q
+            else:
+                master_q.qty = master_q.qty + q.qty
+                q.unlink()
+        if master_q is not None:
+            master_q.reservation_id = new_move.id
+        if self.animal_group.quantity > self.quantity:
+            self.animal_group.quantity -= self.quantity
+            self.animal_group.initial_quantity -= self.quantity
+        else:
+            for line in self.animal_group.account.line_ids:
+                line.account_id = self.to_animal_group.account
+                line.name = line.name + '-Regroup-' + self.animal_group.number
+            self.animal_group.active = False
+        new_move.action_done()
+        self.move = new_move
+
+    def get_farm(self, location):
+        while(location.location_id.id != 1):
+            location = location.location_id
+        return location
+
+    @api.one
+    def group_to_indvidual(self):
+        moves_obj = self.env['stock.move']
+        quants_obj = self.env['stock.quant']
+        production_lot_obj = self.env['stock.production.lot']
+        animal_obj = self.env['farm.animal']
+        animal_lot_obj = self.env['stock.lot_farm.animal']
+        self.animal_group.quantity -= 1
+        if len(self.animal_group.lot) > 1:
+            lot = self.animal_group.lot[2].lot
+        else:
+            lot = self.animal_group.lot.lot
+        target_quant = quants_obj.search([
+            ('lot_id', '=', lot.id),
+            ('location_id', '=', self.animal_group.location.id),
+            ])
+        product_uom = \
+            lot.product_id.product_tmpl_id.uom_id.id
+        new_move = moves_obj.create({
+            'name':
+                'separation-' + self.to_animal_type + '-' +
+                lot.name,
+            'create_date': fields.Date.today(),
+            'date': self.timestamp,
+            'product_id': lot.product_id.id,
+            'product_uom_qty': 1,
+            'product_uom': product_uom,
+            'location_id': self.animal_group.location.id,
+            'location_dest_id': self.to_location.id,
+            'origin': self.job_order.name
+            })
+        for q in target_quant:
+            q.reservation_id = new_move.id
+        new_move.action_done()
+        animal = quants_obj.search([
+            ('lot_id', '=', lot.id),
+            ('product_id', '=', self.animal_group.specie.group_product.id),
+            ('location_id', '=', self.to_location.id)])
+        tag = False
+        if self.to_animal_type == 'female':
+            animal.product_id = self.animal_group.specie.female_product.id
+            tag = self.env['farm.tags'].search([
+                ('name', '=', (self.farm.name + '-future'))])
+            if not tag:
+                tag = self.env['farm.tags'].create({
+                    'name': (self.farm.name + '-future')})
+        elif self.to_animal_type == 'male':
+            animal.product_id = self.animal_group.specie.male_product.id
+        else:
+            animal.product_id = self.animal_group.specie.individual_product.id
+        new_lot = production_lot_obj.create({
+            'product_id': animal.product_id.id})
+        animal.lot_id = new_lot
+        self.move = new_move
+        sex = {'male': 'male',
+               'female': 'female',
+               'individual': 'undetermined',
+               }
+        an_lot = animal_lot_obj.create({
+            'lot': new_lot.id})
+        new_animal = animal_obj.create({
+            'type': self.to_animal_type,
+            'specie': self.animal_group.specie.id,
+            'breed': self.animal_group.breed.id,
+            'farm': self.get_farm(self.to_location).id,
+            'origin': 'purchased',
+            'birthdate': self.animal_group.arrival_date,
+            'initial_location': self.to_location.id,
+            'sex': sex[self.to_animal_type],
+            'lot': [(4, an_lot.id)],
+            })
+        if tag:
+            new_animal.tags = [(6, 0, [tag.id, ])]
+        new_animal.origin = 'raised'
+        self.to_animal = new_animal
+
+    @api.one
+    def move_group(self):
+        moves_obj = self.env['stock.move']
+        quants_obj = self.env['stock.quant']
+        if len(self.animal_group.lot) > 1:
+            lot_id = self.animal_group.lot[2].lot.id
+        else:
+            lot_id = self.animal_group.lot[0].lot.id
+        target_quant = quants_obj.search([
+            ('lot_id', '=', lot_id),
+            ('location_id', '=', self.animal_group.location.id),
+            ])
+        if len(self.to_animal_group.lot) > 1:
+            dest_lot = self.to_animal_group.lot[2].lot
+        else:
+            dest_lot = self.to_animal_group.lot[0].lot
+        warehose = self.to_location.get_farm_warehouse()
+        location_dest = self.to_location.id
+        picking_obj = self.env['stock.picking']
+        picking_t = self.env['stock.picking.type'].search([
+            ('warehouse_id', '=', warehose.id)])[1]
+        new_pick = picking_obj.create({
+            'picking_type_id': picking_t.id,
+            'company_id': 1,
+            'partner_id': 1,
+            'move_type': 'one',
+            'date_done': fields.Date.today(),
+            'location_id': self.animal_group.location.id,
+            'location_dest_id': location_dest,
+            })
+        m_g_move = moves_obj.create({
+            'name': 'relocation-' + self.animal_group.number,
+            'date': self.timestamp,
+            'picking_id': new_pick.id,
+            'picking_type_id': picking_t.id, 
+            'product_id': self.animal_group.lot[0].lot.product_id.id,
+            'product_uom_qty': self.quantity,
+            'product_uos_qty': self.quantity,
+            'product_uom':
+                self.animal_group.lot[0].lot.product_id.product_tmpl_id.uom_id.id,
+            'product_uos':
+                self.animal_group.lot[0].lot.product_id.product_tmpl_id.uom_id.id,
+            'location_id': self.animal_group.location.id,
+            'location_dest_id': location_dest,
+            })
+        for q in target_quant:
+            q.lot_id = dest_lot
+            q.reservation_id = m_g_move.id
+        self.move = m_g_move
+        self.animal_group.location = self.to_location
+        new_farm = self.get_farm(self.to_location)
+        self.animal_group.farm = new_farm
+        analy_ac_obj = self.env['account.analytic.account']
+        top_account = analy_ac_obj.search([
+            ('name', '=', new_farm.name)])
+        if not top_account:
+            gen_account = analy_ac_obj.search([
+                ('name', '=', 'General Account')])
+            if not gen_account:
+                gen_account = analy_ac_obj.create({'name': 'General Account'})
+            top_account = analy_ac_obj.create({'name': new_farm.name,
+                                               'parent_id': gen_account.id})
+        self.animal_group.account.parent_id = top_account
+        transition_location = []
+        for loc in self.specie.lost_found_location:
+            transition_location.append(loc.id)
+        if self.to_location.id not in transition_location:
+            self.animal_group.state = 'fatten'
+            tags_obj = self.env['farm.tags']
+            for tag in self.animal_group.tags:
+                tag.animal_group = [(3, self.animal_group.id)]
+            new_tag = tags_obj.search([
+                ('name', '=', self.animal_group.farm.name + '-' +
+                 self.to_location.name)])
+            if len(new_tag) == 0:
+                new_name = self.animal_group.farm.name + '-' \
+                    + self.to_location.name
+                new_tag = tags_obj.create(
+                    {'name': new_name, })
+            self.animal_group.tags = [(6, 0, [new_tag.id, ])]
+        m_g_move.action_done()
+
+    @api.one
+    def individual_to_group(self):
+        moves_obj = self.env['stock.move']
+        quants_obj = self.env['stock.quant']
+        production_lot_obj = self.env['stock.production.lot']
+        animal_group_lot_obj = self.env['stock.lot_farm.animal.group']
+        lots = []
+        for lot in self.to_animal_group.lot:
+            lots.append(lot.id)
+        product_id = self.animal.lot.lot.product_id.id
+        product_uom = \
+            self.animal.lot.lot.product_id.product_tmpl_id.uom_id.id
+        initial_location = self.animal.location.id
+        lot_id = self.animal.lot.lot.id
+        self.to_animal_group.initial_quantity += self.quantity
+        self.to_animal_group.quantity += self.quantity
+        target_quant = quants_obj.search([
+            ('lot_id', '=', lot_id),
+            ('location_id', '=', initial_location),
+            ])
+        if len(self.to_animal_group.lot) < 3:
+            new_lot = production_lot_obj.create({
+                'product_id': product_id
+                })
+        else:
+            new_lot = self.to_animal_group.lot[2]
+        new_animal_group_lot = animal_group_lot_obj.create({
+            'lot': new_lot.id,
+            'animal_group': self.to_animal_group.id})
+        lots.append(new_animal_group_lot.id)
+        self.to_animal_group.lot = lots
+        new_move = moves_obj.create({
+            'name': 'regroup-' + new_lot.name,
+            'create_date': fields.Date.today(),
+            'date': self.timestamp,
+            'product_id': product_id,
+            'product_uom_qty': self.quantity,
+            'product_uom': product_uom,
+            'location_id': initial_location,
+            'location_dest_id': self.to_animal_group.location.id,
+            'origin': self.job_order.name,
+            })
+        for q in target_quant:
+            q.reservation_id = new_move.id
+        new_move.action_done()
+        old_quants = []
+        for lot in self.to_animal_group.lot:
+            old_quants.append(quants_obj.search([
+                ('lot_id', '=', lot.lot.id),
+                ('location_id', '=', self.to_animal_group.location.id)
+                ]))
+        for move in new_move:
+            move.quant_ids.lot_id = new_lot
+        for qs in old_quants:
+            for q in qs:
+                q.lot_id = new_lot
+        self.animal.active = False
+        animal = self.env['stock.quant'].search([
+            ('lot_id', '=', new_lot.id),
+            ('product_id', '=', product_id),
+            ])
+        animal.product_id = self.to_animal_group.lot[0].lot.product_id
+        self.move = new_move

BIN
models/transformation_event.pyc


+ 28 - 0
models/user.py

@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields
+
+
+class User(models.Model):
+    _inherit = 'res.users'
+
+    farm = fields.Many2many(comodel_name='res.user_stock.location',
+                            inverse_name='user', colum1='location',
+                            string='Farms',
+                            help="Farms to which this user is assigned."
+                            "Determine animals that he/she can manage.")
+
+
+class UserLocation(models.Model):
+    _name = 'res.user_stock.location'
+
+    user = fields.Many2one(comodel_name='res.users', string='User',
+                           ondelete='CASCADE', required=True, select=True)
+    location = fields.Many2one(comodel_name='stock.location',
+                               string='Location', ondelete='CASCADE',
+                               domain=[('usage', '=', 'view'), ],
+                               required=True, select=True
+                               )

+ 240 - 0
models/weaning_event.py

@@ -0,0 +1,240 @@
+# -*- coding: utf-8 -*-
+# @authors: Alexander Ezquevo <alexander@acysos.com>
+# Copyright (C) 2015  Acysos S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api, _
+from openerp.exceptions import Warning
+
+
+class WeaningEvent(models.Model):
+    _name = 'farm.weaning.event'
+    _inherit = {'farm.event.import.mixin': 'ImportedEventMixin_id'}
+    _auto = True
+
+    farrowing_group = fields.Many2one(comodel_name='farm.animal.group',
+                                      string='Farrowing Group')
+    quantity = fields.Integer(string='Quantity', compute='get_quantity',
+                              store=True)
+    female_to_location = fields.Many2one(comodel_name='stock.location',
+                                         string='Female Destination',
+                                         required=True,
+                                         domain=[('usage', '=', 'internal'),
+                                                 ('silo', '=', False)])
+    weaned_to_location = fields.Many2one(comodel_name='stock.location',
+                                         string='Weaned Destination',
+                                         required=True,
+                                         domain=[('usage', '=', 'transit'),
+                                                 ('silo', '=', False)])
+    weared_group = fields.Many2one(comodel_name='farm.animal.group',
+                                   string='Weaned group',
+                                   help='Group in which weaned animals should'
+                                   'be added to. If left blank they will keep'
+                                   'the same group.')
+    female_cycle = fields.One2many(
+        comodel_name='farm.weaning.event_female_cycle',
+        inverse_name='event', column1='cycle', string='Female Cicle',
+        readonly=True)
+    female_move = fields.Many2one(comodel_name='stock.move',
+                                  string='Female Stock Move')
+    lost_move = fields.Many2one(comodel_name='stock.move',
+                                string='Lost Stock  Move')
+    weared_move = fields.Many2one(comodel_name='stock.move',
+                                  string='Weared Stock Move')
+    transformation_event = fields.Many2one(
+        comodel_name='farm.transformation.event',
+        string='Transformation Event')
+
+    @api.model
+    @api.returns('self', lambda value: value.id)
+    def create(self, vals):
+        res = super(WeaningEvent, self).create(vals)
+        res.get_quantity()
+        return res
+
+    @api.one
+    @api.onchange('animal')
+    def onchange_animal(self):
+        c_c = self.animal.current_cycle
+        self.weared_group = \
+            c_c.farrowing_event.event.produced_group.animal_group
+
+    @api.one
+    def confirm(self):
+        if not self.is_compatible():
+            raise Warning(
+                _("Only females can wean a group"))
+        if not self.is_ready():
+            raise Warning(
+                _("Only lactating females can wean a group"))
+        company = self.env['res.company'].search([
+            (True, '=', True)])[0]
+        journal = self.env['account.analytic.journal'].search([
+            ('code', '=', 'FAR')])
+        analytic_line_obj = self.env['account.analytic.line']
+        far_event = self.animal.current_cycle.farrowing_event
+        self.farrowing_group = \
+            far_event.event.produced_group.animal_group
+        wean_fem_cy_obj = self.env['farm.weaning.event_female_cycle']
+        wean_fem_cy_obj.create({
+            'event': self.id,
+            'cycle': self.animal.current_cycle.id, })
+        self.get_female_move()
+        if self.farrowing_group.quantity > 0:
+            if self.farrowing_group == self.weared_group:
+                    self.move_group()
+            else:
+                self.trasform_group()
+            self.animal.current_cycle.update_state(self)
+            self.farrowing_group.state = 'transition'
+            tot_cost = 0
+            for line in self.animal.account.line_ids:
+                tot_cost = tot_cost + line.amount
+            analytic_line_obj.create({
+                'name': 'weaning Cost',
+                'date': self.timestamp,
+                'ref': 'farrow',
+                'amount': tot_cost,
+                'unit_amount': 1,
+                'account_id': self.weared_group.account.id,
+                'general_account_id': company.feed_account.id,
+                'journal_id': journal.id,
+                })
+            analytic_line_obj.create({
+                'name': 'weaning Cost',
+                'date': self.timestamp,
+                'ref': 'farrow',
+                'amount': -(tot_cost),
+                'unit_amount': 1,
+                'account_id': self.animal.account.id,
+                'general_account_id': company.feed_account.id,
+                'journal_id': journal.id,
+                })
+        self.animal.current_cycle.update_state(self)
+        super(WeaningEvent, self).confirm()
+
+    @api.one
+    def move_group(self):
+        moves_obj = self.env['stock.move']
+        quants_obj = self.env['stock.quant']
+        f_g = self.farrowing_group
+        target_quant = quants_obj.search([
+            ('lot_id', '=', f_g.lot.lot.id),
+            ('location_id', '=', f_g.location.id),
+            ])
+        f_g_move = moves_obj.create({
+            'name': 'wean-' + f_g.number,
+            'create_date': fields.Date.today(),
+            'date': self.timestamp,
+            'product_id': f_g.lot.lot.product_id.id,
+            'product_uom_qty': self.quantity,
+            'product_uom':
+                f_g.lot.lot.product_id.product_tmpl_id.uom_id.id,
+            'location_id': f_g.location.id,
+            'location_dest_id': self.weaned_to_location.id,
+            'company_id': self.animal.farm.company_id.id, })
+        for q in target_quant:
+            q.reservation_id = f_g_move.id
+        f_g_move.action_done()
+        self.weared_move = f_g_move
+        f_g.location = self.weaned_to_location
+        tags_obj = self.env['farm.tags']
+        tag = tags_obj.search([
+                ('name', '=', self.farm.name + '-lact')])
+        tag.animal_group = [(3, self.farrowing_group.id)]
+        new_tag = tags_obj.search([
+            ('name', '=', self.farm.name + '-transi')])
+        if len(new_tag) == 0:
+            new_tag = tags_obj.create({'name': self.farm.name + '-transi',
+                                       })
+        self.farrowing_group.tags = [(6, 0, [new_tag.id, ])]
+
+    @api.one
+    def trasform_group(self):
+        if self.quantity == self.farrowing_group.quantity:
+            self.get_female_move()
+        trans_eve_obj = self.env['farm.transformation.event']
+        new_trans_ev = trans_eve_obj.create({
+            'animal_type': 'group',
+            'specie': self.specie.id,
+            'farm': self.farm.id,
+            'animal_group': self.farrowing_group.id,
+            'timestamp': self.timestamp,
+            'from_location': self.farrowing_group.location.id,
+            'to_animal_type': 'group',
+            'to_location': self.weaned_to_location.id,
+            'quantity': self.quantity,
+            'to_animal_group': self.weared_group.id,
+            })
+        new_trans_ev.confirm()
+        self.transformation_event = new_trans_ev
+        self.weared_move = new_trans_ev.move
+
+    @api.one
+    def get_female_move(self):
+        moves_obj = self.env['stock.move']
+        quants_obj = self.env['stock.quant']
+        target_quant = quants_obj.search([
+            ('lot_id', '=', self.animal.lot.lot.id),
+            ('location_id', '=', self.animal.location.id),
+            ])
+        fem_move = moves_obj.create({
+            'name': 'wean-mother-' + self.animal.lot.lot.name,
+            'create_date': fields.Date.today(),
+            'date': self.timestamp,
+            'product_id': self.animal.lot.lot.product_id.id,
+            'product_uom_qty': 1,
+            'product_uom':
+                self.animal.lot.lot.product_id.product_tmpl_id.uom_id.id,
+            'location_id': self.animal.location.id,
+            'location_dest_id': self.female_to_location.id,
+            'company_id': self.animal.farm.company_id.id, })
+        for q in target_quant:
+            q.reservation_id = fem_move.id
+        fem_move.action_done()
+        self.female_move = fem_move
+        self.animal.location = self.female_to_location
+        tags_obj = self.env['farm.tags']
+        tag = tags_obj.search([
+                ('name', '=', self.farm.name+'-lact')])
+        tag.animal = [(3, self.animal.id)]
+        new_tag = tags_obj.search([
+            ('name', '=', self.farm.name + '-unmated')])
+        if len(new_tag) == 0:
+            new_tag = tags_obj.create({'name': self.farm.name + '-unmated',
+                                       })
+        self.animal.tags = [(6, 0, [new_tag.id, ])]
+
+    @api.one
+    def get_farrowing_group(self):
+        self.farrowing_group = \
+            self.animal.current_cycle.farrowing_event.event.produced_group
+
+    def is_compatible(self):
+        if self.animal_type == 'female':
+            return True
+        else:
+            return False
+
+    def is_ready(self):
+        if self.animal.current_cycle.state == 'lactating':
+            return True
+        else:
+            return False
+
+    @api.one
+    def get_quantity(self):
+        far_event = self.animal.current_cycle.farrowing_event
+        farrowing_group = far_event.event.produced_group.animal_group
+        self.quantity = farrowing_group.quantity
+
+
+class WearingEventFemaleCycle(models.Model):
+    _name = 'farm.weaning.event_female_cycle'
+
+    event = fields.Many2one(comodel_name='farm.weaning.event',
+                            string='Wearing Event', required=True,
+                            ondelete='RESTRICT')
+    cycle = fields.Many2one(comodel_name='farm.animal.female_cycle',
+                            string='Female Cycle', required=True,
+                            ondelete='RESTRICT')

BIN
models/weaning_event.pyc


+ 18 - 0
security/farm_security.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+<data noupdate="0">
+    <record model="ir.module.category" id="module_category_farm">
+            <field name="name">Farm</field>
+            <field name="description">Helps you manage your farms</field>
+            <field name="sequence">4</field>
+    </record>
+    <record id="group_farm_user" model="res.groups">
+        <field name="name">FarmUser</field>
+        <field name="category_id" ref="module_category_farm"/>
+    </record>
+    <record id="group_farm_manager" model="res.groups">
+        <field name="name">FarmManager</field>
+        <field name="category_id" ref="module_category_farm"/>
+    </record>
+</data>
+</openerp>

+ 61 - 0
security/ir.model.access.csv

@@ -0,0 +1,61 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_abort_event,AbortEvent,model_farm_abort_event,group_farm_manager,1,1,1,1
+access_animal_group,AnimalGroup,model_farm_animal_group,group_farm_manager,1,1,1,1
+access_animal_group_user,AnimalGroup,model_farm_animal_group,group_farm_user,1,1,1,1
+access_animal_group_weight,AnimalGroupWeight,model_farm_animal_group_weight,group_farm_manager,1,1,1,1
+access_animal_group_weight_user,AnimalGroupWeight,model_farm_animal_group_weight,group_farm_user,1,1,1,1
+access_tag,Tag,model_farm_tags,group_farm_manager,1,1,1,1
+access_tag_user,Tag,model_farm_tags,group_farm_user,1,1,1,1
+access_animal,Animal,model_farm_animal,group_farm_manager,1,1,1,1
+access_animal_user,Animal,model_farm_animal,group_farm_user,1,1,1,1
+access_animal_weight,AnimalWeight,model_farm_animal_weight,group_farm_manager,1,1,1,1
+access_female_cycle,FemaleCycle,model_farm_animal_female_cycle,group_farm_manager,1,1,1,1
+access_event_order,EventOrder,model_farm_event_order,group_farm_manager,1,1,1,1
+access_event_order_user,EventOrder,model_farm_event_order,group_farm_user,1,1,1,0
+access_farrowing_problem,FarrowingProblem,model_farm_farrowing_problem,group_farm_manager,1,1,1,1
+acces_farrowing_event,FarrowingEvent,model_farm_farrowing_event,group_farm_manager,1,1,1,1
+access_farrowing_event_female_cycle,FarrowingEventFemaleCycle,model_farm_farrowing_event_female_cycle,group_farm_manager,1,1,1,1
+access_farrowing_event_animal_group,FarrowingEventAnimalGroup,model_farm_farrowing_event_group,group_farm_manager,1,1,1,1
+access_feed_event,FeedEvent,model_farm_feed_event,group_farm_manager,1,1,1,1
+acces_feed_event_user,FeedEvent,model_farm_feed_event,group_farm_user,1,1,1,0
+acces_foster_event,FosterEvent,model_farm_foster_event,group_farm_manager,1,1,1,1
+acces_insemination_event,InseminationEvent,model_farm_insemination_event,group_farm_manager,1,1,1,1
+acces_medication_event,MedicationEvent,model_farm_medication_event,group_farm_manager,1,1,1,1
+acces_medication_event_user,MedicationEvent,model_farm_medication_event,group_farm_user,1,1,1,0
+access_pregnancy_diagnosis_event,PregnancyDiagnosisEvent,model_farm_pregnancy_diagnosis_event,group_farm_manager,1,1,1,1
+access_removal_type,RemovalType,model_farm_removal_type,group_farm_manager,1,1,1,1
+access_removal_reason,RemovalReason,model_farm_removal_reason,group_farm_manager,1,1,1,1
+access_removal_event,RemovalEvent,model_farm_removal_event,group_farm_manager,1,1,1,1
+access_semen_extraction_event,SemenExtractionEvent,model_farm_semen_extraction_event,group_farm_manager,1,1,1,1
+access_semen_extraction_dose,SemenExtractionDose,model_farm_semen_extraction_dose,group_farm_manager,1,1,1,1
+access_specie,Specie,model_farm_specie,group_farm_manager,1,1,1,1
+access_specie_user,Specie,model_farm_specie,group_farm_user,1,0,0,0
+access_breed,Breed,model_farm_specie_breed,group_farm_manager,1,1,1,1
+access_specie_farm_line,SpecieFarmLine,model_farm_specie_farm_line,group_farm_manager,1,1,1,1
+access_specie_farm_line_user,SpecieFarmLine,model_farm_specie_farm_line,group_farm_user,1,1,1,1
+access_trasformation_event,TransformationEvent,model_farm_transformation_event,group_farm_manager,1,1,1,1
+access_trasformation_event_user,TransformationEvent,model_farm_transformation_event,group_farm_user,1,1,1,1
+access_weaning_event,WeaningEvent,model_farm_weaning_event,group_farm_manager,1,1,1,1
+access_weaning_event_female_cycle,WeaningEventFemaleCycle,model_farm_weaning_event_female_cycle,group_farm_manager,1,1,1,1
+access_future_maders_location,Future_maders_location_stock,model_farm_future_maders_locations,group_farm_manager,1,1,1,1
+acces_transit_location_stock,Transit_location_stock,model_farm_transit_locations,group_farm_manager,1,1,1,1
+acces_transit_location_stock_user,Transit_location_stock,model_farm_transit_locations,group_farm_user,1,0,0,0
+access_foster_location_stock,Foster_location_stock,model_farm_foster_locations,group_farm_manager,1,1,1,1
+access_stock_lot_farm_animal,LotAnimal,model_stock_lot_farm_animal,group_farm_manager,1,1,1,1
+acces_stock_lot_farm_animal_group,LotAnimalGroup,model_stock_lot_farm_animal_group,group_farm_manager,1,1,1,1
+acces_stock_lot_farm_animal_group_user,LotAnimalGroup,model_stock_lot_farm_animal_group,group_farm_user,1,1,1,1
+access_feed_inventory_mix,FeedInventoryMixin,model_farm_feed_inventory_mixin,group_farm_manager,1,1,1,1
+access_feed_inventory_location,FeedInventoryLocation,model_farm_feed_stock_location,group_farm_manager,1,1,1,1
+access_feed_inventory,FeedInventory,model_farm_feed_inventory,group_farm_manager,1,1,1,1
+access_feed_provisional_inventory,FeedProvisionalInventory,model_farm_feed_provisional_inventory,group_farm_manager,1,1,1,1
+access_feed_animal_location_date,FeedAnimalLocationDate,model_farm_feed_animal_location_date,group_farm_manager,1,1,1,1
+access_farm_stock_quant,stock_quant,stock.model_stock_quant,group_farm_manager,1,1,1,1
+access_farm_stock_quant_user,stock_quant,stock.model_stock_quant,group_farm_user,1,1,1,1
+access_farm_move,MoveEvent,model_farm_move_event,group_farm_manager,1,1,1,1
+acces_purchase_analitic_remain,Purchase_analitic_remain,model_purchase_analitic_remain,group_farm_manager,1,1,1,1
+access_silo_stock_location,LocationSiloLocation,model_stock_location_silo_stock_location,group_farm_manager,1,1,1,1
+access_silo_stock_location_user,LocationSiloLocation,model_stock_location_silo_stock_location,group_farm_user,1,0,0,0
+access_farm_users,res_users,base.model_res_users,group_farm_manager,1,1,1,1
+access_farm_users_user,res_users,base.model_res_users,group_farm_user,1,0,0,0
+access_consume_stock,ConsumeStock,model_farm_consume_stock,group_farm_manager,1,1,1,1
+access_consume_stock_user,ConsumeStock,model_farm_consume_stock,group_farm_user,0,0,0,0

+ 30 - 0
views/abort_event.xml

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+	<data>
+		<record id="view_abort_event_tree" model="ir.ui.view">
+			<field name="name">abort_event.tree</field>
+			<field name="model">farm.abort.event</field>
+			<field name="mode">primary</field>
+			<field name="inherit_id" ref="view_abstract_event_import_mixin_tree" />
+			<field name="arch" type="xml">
+				<field name="lot" position="after">
+					<field name="female_cycle" />
+				</field>
+			</field>
+		</record>
+		<record id="view_abort_event_form" model="ir.ui.view">
+            <field name="name">abort_event.form</field>
+            <field name="model">farm.abort.event</field>
+            <field name="mode">primary</field>
+            <field name="inherit_id" ref="view_abstract_event_import_mixin_form" />
+            <field name="arch" type="xml">
+                <field name="state" position="after">
+                <h1>Abort Event</h1>
+                </field>
+                <field name="farm" position="after">
+                    <field name="female_cycle" attrs="{'readonly': True}"/>
+                </field>
+            </field>
+        </record>
+	</data>
+</openerp>

+ 71 - 0
views/abstract_event.xml

@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+<data>
+        <record model="ir.ui.view" id="view_abstract_event_tree">
+            <field name="name">abstract_event.tree</field>
+            <field name="model">farm.event</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree string="Event">
+                        <field name="state"/>
+                        <field name="lot"/>
+                        <field name="animal_type"/>
+                </tree>
+            </field>
+        </record>
+        <record model="ir.ui.view" id="view_abstract_event_form">
+            <field name="name">abstract_event.form</field>
+            <field name="model">farm.event</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Event">
+                <header>
+                    <field name="state" widget="statusbar" statusbar_visible="draft,validated" statusbar_colors='{"invoice_except":"red","waiting_date":"blue"}'/>
+                </header>
+                <sheet>
+                    <group col="4" colspan="2" attrs="{'readonly': [('state', '=', 'validated')]}">
+                        <field name="animal_type"/>
+                        <field name="farm"/>
+                        <field name="specie"/>
+                        <field name="animal" 
+                            attrs="{'invisible':[('animal_type','=','group')],
+                            'required':['|',('animal_type','=','individual'),('animal_type','=', 'male'),('animal_type','=', 'female')]}"
+                            domain="[('type', '=', animal_type),('farm', '=', farm)]"/>
+                        <field name="animal_group"
+                            attrs="{'invisible':[('animal_type','!=','group')],'required':[('animal_type','=','group')]}"
+                            domain="[('farm', '=', farm), ('state', '!=', 'sold')]"/>
+                        <field name="lot"/>
+                    </group>
+                    <group col="4" colspan="2">
+                        <field name="timestamp"/>
+                        <field name="employee"/>
+                    </group>
+                    <group>
+                        <field name="notes"/>
+                    </group>
+                </sheet>
+                </form>
+            </field>
+        </record>
+        <record id="view_abstract_event_import_mixin_tree" model="ir.ui.view">
+            <field name="name">abstract_event.import_mixin.tree</field>
+            <field name="model">farm.event.import.mixin</field>
+            <field name="inherit_id" ref="view_abstract_event_tree"/>
+            <field name="arch" type="xml">
+                <field name="animal_type" position="after">
+                        <field name="imported"/>
+                </field>
+            </field>
+        </record>
+        <record id="view_abstract_event_import_mixin_form" model="ir.ui.view">
+            <field name="name">abstract_event.import_mixin.form</field>
+            <field name="model">farm.event.import.mixin</field>
+            <field name="inherit_id" ref="view_abstract_event_form"/>
+            <field name="arch" type="xml">
+                <field name="lot" position="after">
+                        <field name="imported"/>
+                </field>
+            </field>
+        </record> 
+</data>
+</openerp>

+ 30 - 0
views/account_invoice.xml

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+<data>
+    <record model="ir.ui.view" id="farm_invoice_form">
+        <field name="name">farm.invoice.form</field>
+        <field name="model">account.invoice</field>
+        <field name="inherit_id" ref="account.invoice_form"/>
+        <field name="arch" type="xml">
+            <field name="quantity" position="before">
+                <field name="animal_qty"/>
+            </field>
+        </field>
+    </record>
+    <template id="report_invoice_n_animals" inherit_id="account.report_invoice_document">
+            <xpath expr="//table/thead/tr/th[1]" position="before">
+                <t t-if="o.invoice_line[0].animal_qty">
+                <th class="text-right">Num. Animals</th>
+                </t>
+            </xpath>
+            <xpath expr="//tbody/tr/td[1]" position="before">
+            <t t-if="l.animal_qty">
+            <td class="text-right">
+            <span t-field="l.animal_qty"/>
+            </td>
+            </t>
+            
+            </xpath>
+     </template>
+</data>
+</openerp>

+ 205 - 0
views/animal.xml

@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+	<data>
+		<record model="ir.ui.view" id="view_animal_tree">
+			<field name="name">animal.tree</field>
+			<field name="model">farm.animal</field>
+			<field name="type">tree</field>
+			<field name="arch" type="xml">
+				<tree string="Animal">
+					<field name="type" />
+					<field name="specie" />
+					<field name="breed" />
+					<field name="current_cycle" attrs="{'invisible':[('type','!=','female')]}"/>
+					<field name="number" />
+					<field name="weight"/>
+				</tree>
+			</field>
+		</record>
+		<record model="ir.ui.view" id="view_animal_animal_weigth_tree">
+						<field name="name">animal_animal_weigth.tree</field>
+						<field name="model">farm.animal.weight</field>
+						<field name="type">tree</field>
+						<field name="arch" type="xml">
+										<tree string="Animal Weigth">
+														<field name="timestamp" />
+														<field name="weight" />
+										</tree>
+						</field>
+		</record>
+		<record model="ir.ui.view" id="view_animal_form">
+			<field name="name">animal.form</field>
+			<field name="model">farm.animal</field>
+			<field name="type">form</field>
+			<field name="arch" type="xml">
+				<form string="Animal">
+					<header>
+						<field name="state" widget="statusbar"
+							attrs="{'invisible':[('type','!=','female')]}" />
+						<button string="Feed events"
+                                class="oe_stat_button"
+                                icon="fa-building-o" name="%(animal_open_feed_events)d" type="action"
+                                />
+                        <button string="Medication events"
+                                class="oe_stat_button"
+                                icon="fa-building-o" name="%(animal_open_medication_events)d" type="action"
+                                />
+					</header>
+					<sheet>
+						<group>
+							<field name="type" />
+						</group>
+						<group col="4" colspam="2">
+							<field name="specie" />
+							<field name="breed" domain="[('specie', '=', specie)]" />
+						</group>
+						<group>
+							<field name="lot" attrs="{'required': True}"/>
+							<field name="number" />
+						</group>
+						<group col="4" colspam="2">
+							<field name="active" />
+						</group>
+						<group col="4" colspan="2">
+							<field name="farm" attrs="{'required': True}" />
+							<field name="initial_location" domain="['|',('location_id', '=', farm),('location_id.location_id', '=', farm)]" />
+							<field name="location" attrs="{'readonly': True}" />
+							<field name="origin" />
+						</group>
+						<group col="4" colspam="2">
+							<field name="arrival_date" />
+							<field name="birthdate" />
+						</group>
+						<group col="4" colspam="2">
+							<field name="removal_date" />
+							<field name="removal_reason" />
+						</group>
+						<group>
+							<field name="weight"/>
+						</group>
+						<group col="4" colspam="2">
+							<field name="current_weight" />
+							<field name="consumed_feed" />
+						</group>
+				  	<group col="4" colspam="2">
+							<field name="sex" />
+							<field name="purpose" />
+						</group>
+
+						<group>
+							<field name="notes" />
+						</group>
+						<group attrs="{'invisible':[('type','!=','male')]}">
+							<field name="extractions" />
+							<field name="last_extraction" />
+						</group>
+						<group attrs="{'invisible':[('type','!=','female')]}">
+							<field name="cycles" attrs="{'readonly': True}"/>
+							<field name="current_cycle" />
+							<field name="first_mating" />
+							<field name="days_from_insemination" />
+							<field name="last_produced_group" />
+							<field name="days_from_farrowing" />
+						</group>
+						<group>
+						  <field name="account" attrs="{'readonly': True}"/>
+						</group>
+					</sheet>
+				</form>
+			</field>
+		</record>
+		<record model="ir.ui.view" id="view_animal_weight_form">
+			<field name="name">animalWeight.form</field>
+			<field name="model">farm.animal.weight</field>
+			<field name="type">form</field>
+			<field name="arch" type="xml">
+				<form string="Weight">
+					<sheet>
+						<group>
+							<field name="timestamp" />
+							<field name="uom" />
+							<field name="weight" />
+						</group>
+					</sheet>
+				</form>
+			</field>
+		</record>
+		<record model="ir.ui.view" id="view_cycle_form">
+			<field name="name">cycle.form</field>
+			<field name="model">farm.animal.female_cycle</field>
+			<field name="type">form</field>
+			<field name="arch" type="xml">
+				<form string="Female Cycle">
+					<header>
+						<field name="state" widget="statusbar" />
+					</header>
+					<sheet>
+						<group col="4" colspan="2">
+							<field name="animal" />
+							<field name="sequence" attrs="{'readonly': True}" />
+							<field name="ordination_date" />
+						</group>
+						<group col="4" colspan="2">
+							<field name="insemination_events" />
+							<field name="days_between_wearing_and_insemination" />
+							<field name="diagnosis_events" />
+							<field name="pregnant" />
+							<field name="farrowing_event" />
+							<field name="abort_event" />
+							<field name="live"/>
+							<field name="dead"/>
+							<field name="fostered" />
+							<field name="foster_events" />
+							<field name="weaning_event" />
+							<field name="weared" />
+							<field name="days_between_farrowing_weaning"/>
+							<field name="removed" />
+						</group>
+					</sheet>
+				</form>
+			</field>
+		</record>
+		<record model="ir.ui.view" id="animal_search_view">
+            <field name="name">animal.search</field>
+            <field name="model">farm.animal</field>
+            <field name="arch" type="xml">
+                <search string="Search Animal">
+                    <group>
+                        <field name="type" />
+	                    <field name="specie" />
+	                    <field name="breed" />
+	                    <field name="current_cycle" attrs="{'invisible':[('type','!=','female')]}"/>
+	                    <field name="number" />
+                    </group>
+                    <newline />
+                    <group expand="0" string="Group by...">
+                        <filter string="Farm"
+                                domain="[]"
+                                context="{'group_by': 'farm'}" />
+                        <filter string="Location"
+                                domain="[]"
+                                context="{'group_by': 'location'}" />
+                        <filter string="State"
+                                domain="[]"
+                                context="{'group_by': 'state'}" />
+                    </group>
+                </search>
+            </field>
+        </record>
+		<record model="ir.ui.view" id="view_cycle_tree">
+			<field name="name">cycle.tree</field>
+			<field name="model">farm.animal.female_cycle</field>
+			<field name="type">tree</field>
+			<field name="arch" type="xml">
+				<tree string="Female Cycle">
+					<field name="state" widget="statusbar" />
+					<field name="sequence" attrs="{'readonly': True}" />
+					<field name="pregnant" />
+					<field name="fostered" />
+					<field name="weared" />
+				</tree>
+			</field>
+		</record>
+	</data>
+
+</openerp>

+ 119 - 0
views/animal_group.xml

@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+	<data>
+		<record model="ir.ui.view" id="view_animal_group">
+			<field name="name">animal_group.form</field>
+			<field name="model">farm.animal.group</field>
+			<field name="type">form</field>
+			<field name="arch" type="xml">
+				<form string="Animal Group">
+				<header>
+                    <field name="state" widget="statusbar" />
+                    <button string="Feed events" 
+                                class="oe_stat_button" 
+                                icon="fa-building-o" name="%(animal_group2_open_feed_events)d" type="action"
+                                />
+                    <button string="Medication events" 
+                                class="oe_stat_button" 
+                                icon="fa-building-o" name="%(animal_group_open_medication_events)d" type="action"
+                                />
+                </header>
+					<sheet>
+						<group col="4" colspan="2">
+							<field name="specie" />
+							<field name="breed" domain="[('specie', '=', specie)]" />
+							<field name="number" />
+							<field name="location" attrs="{'readonly': True}" />
+							<field name="farm" />
+							<field name="quantity" />
+							<field name="origin" />
+							<field name="arrival_date" />
+							<field name="initial_location" domain="['|',('location_id', '=', farm),('location_id.location_id', '=', farm)]" />
+							<field name="initial_quantity" />
+							<field name="removal_date" />
+							<field name="weights" />
+							<field name="current_weight" />
+							<field name="active" />
+							<field name="consumed_feed" />
+							<field name="transition_days"/>
+							<field name="fattening_days"/>
+							<field name="lot"/>
+						</group>
+						<group>
+                          <field name="account" attrs="{'readonly': True}"/>
+                        </group>
+					</sheet>
+				</form>
+			</field>
+		</record>
+		<record model="ir.ui.view" id="view_animal_group_tree">
+			<field name="name">animal_group.tree</field>
+			<field name="model">farm.animal.group</field>
+			<field name="type">tree</field>
+			<field name="arch" type="xml">
+				<tree string="Animal Group">				
+                        <field name="number" />
+						<field name="arrival_date" />
+						<field name="weaning_day"/>
+						<field name="quantity" />
+						<field name="state"/>
+						<field name="mother"/>		
+				</tree>
+			</field>
+		</record>
+		<record model="ir.ui.view" id="animal_group_search_view">
+            <field name="name">animal.group.search</field>
+            <field name="model">farm.animal.group</field>
+            <field name="arch" type="xml">
+                <search string="Search Animal group">
+                    <group>
+                        <field name="number" />
+                        <field name="state" />
+                        <field name="specie" />
+                        <field name="breed" />
+                    </group>
+                    <newline />
+                    <group expand="0" string="Group by...">
+                        <filter string="Farm"
+                                domain="[]"
+                                context="{'group_by': 'farm'}" />
+                        <filter string="Location"
+                                domain="[]"
+                                context="{'group_by': 'location'}" />
+                        <filter string="State"
+                                domain="[]"
+                                context="{'group_by': 'state'}" />
+                    </group>
+                </search>
+            </field>
+        </record>
+		<record model="ir.ui.view" id="view_animal_group_weigth_tree">
+            <field name="name">animal_group_weigth.tree</field>
+            <field name="model">farm.animal.group.weight</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                    <tree string="Animal Group Weigth">
+                            <field name="timestamp" />
+                            <field name="weight" />
+                    </tree>
+            </field>
+        </record>
+		<record model="ir.ui.view" id="view_animal_group_weigth">
+			<field name="name">animal_group_weigth.form</field>
+			<field name="model">farm.animal.group.weight</field>
+			<field name="type">form</field>
+			<field name="arch" type="xml">
+				<form string="Animal Group Weigth">
+					<sheet>
+						<group>
+							<field name="timestamp" />
+							<field name="quantity" />
+							<field name="uom" />
+							<field name="weight" />
+						</group>
+					</sheet>
+				</form>
+			</field>
+		</record>
+	</data>
+</openerp>

+ 21 - 0
views/breed.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <record model="ir.ui.view" id="view_breed_form">
+            <field name="name">breed.form</field>
+            <field name="model">farm.specie.breed</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Breed">
+                    <sheet>
+                    <group>
+                        <field name="name"/>
+                    </group>
+                    </sheet>
+                </form>
+            </field>
+        </record>
+    
+    </data>
+
+</openerp>

+ 66 - 0
views/consume_stock.xml

@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+<data>
+    <record model="ir.ui.view" id="view_consume_stock_tree">
+            <field name="name">consume.stock.tree</field>
+            <field name="model">farm.consume.stock</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree string="Event">
+                        <field name="state"/>
+                        <field name="to_location"/>
+                        <field name="date"/>
+                </tree>
+            </field>
+        </record>
+        <record model="ir.ui.view" id="view_consume_stock_form">
+            <field name="name">consume.stock.form</field>
+            <field name="model">farm.consume.stock</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Consume stock">
+                <header>
+                    <field name="state" widget="statusbar"/>
+                    <button name="confirm" states="draft" 
+                        string="Confirm Consume" id="consume_confirm"
+                        type="object" />
+                </header>
+                <sheet>
+                    <group col="4" colspan="2">
+                        <field name="type" attrs="{'readonly': [('state', '=', 'confirmed')]}"/>
+                        <field name="date" attrs="{'readonly': [('state', '=', 'confirmed')]}"/>
+                        <field name="origin" attrs="{'readonly': [('state', '=', 'confirmed')]}"/>
+                        <field name="to_location" attrs="{'readonly': [('state', '=', 'confirmed')]}"/>
+                        <field name="product_id" attrs="{'readonly': [('state', '=', 'confirmed')]}"/>
+                        <field name="lot_id" attrs="{'readonly': [('state', '=', 'confirmed')]}"/>
+                        <field name="quantity" attrs="{'readonly': [('state', '=', 'confirmed')]}"/>
+                    </group>
+                </sheet>
+                </form>
+            </field>
+        </record>
+        <record model="ir.ui.view" id="farm_consume_stock_search_view">
+            <field name="name">farm.consume.stock.search</field>
+            <field name="model">farm.consume.stock</field>
+            <field name="arch" type="xml">
+                <search string="Search consume stock">
+                    <group>
+                        <field name="product_id" />
+                    </group>
+                    <newline />
+                    <group expand="0" string="Group by...">
+                        <filter string="Origin"
+                                domain="[]"
+                                context="{'group_by': 'origin'}" />
+                        <filter string="Destinity"
+                                domain="[]"
+                                context="{'group_by': 'to_location'}" />
+                        <filter string="State"
+                                domain="[]"
+                                context="{'group_by': 'state'}" />
+                    </group>
+                </search>
+            </field>
+        </record>
+</data>
+</openerp>

+ 45 - 0
views/event_move.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+<data>
+<record model="ir.ui.view" id="view_move_event_tree">
+            <field name="name">move_event.tree</field>
+            <field name="model">farm.move.event</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree string="Event" position="replace">
+                    <tree string="Animals Moves">
+	                    <field name="animal_type" />
+	                    <field name="timestamp" />
+	                    <field name="quantity" />
+	                    <field name="from_location"/>
+	                    <field name="to_location" />
+                    </tree>
+                </tree>
+            </field>
+        </record>
+        <record model="ir.ui.view" id="view_move_event_form">
+            <field name="name">move_event.form</field>
+            <field name="model">farm.move.event</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Event" position="replace">
+                    <form string="Animal Move">
+                    <sheet>
+                        <group col="4" colspam="2">
+                            <field name="animal_type" attrs="{'readonly': True}"/>
+                            <field name="timestamp" attrs="{'readonly': True}"/>                        
+                            <field name="animal" attrs="{'invisible':[('animal_type','=','group')], 'readonly': True}"/>
+                            <field name="animal_group" attrs="{'invisible':[('animal_type','!=','group')], 'readonly': True}" />
+                            <field name="from_location" attrs="{'readonly': True}"/>
+                            <field name="to_location" attrs="{'readonly': True}"/>
+                        </group>
+                        <group>
+                            <field name="move" attrs="{'readonly': True}"/>
+                        </group>
+                    </sheet>
+                    </form>
+                </form>
+            </field>
+        </record>
+</data>
+</openerp>

+ 76 - 0
views/event_order.xml

@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+	<data>
+		<record model="ir.ui.view" id="view_event_order_tree">
+			<field name="name">event_order.tree</field>
+			<field name="model">farm.event.order</field>
+			<field name="type">tree</field>
+			<field name="arch" type="xml">
+				<tree string="Event order">
+					<field name="name" />
+					<field name="animal_type" />
+					<field name="event_type" />
+					<field name="state" />
+				</tree>
+			</field>
+		</record>
+		<record model="ir.ui.view" id="view_event_order_form">
+            <field name="name">event_order.form</field>
+            <field name="model">farm.event.order</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form>
+                <header>
+                    <field name="state" widget="statusbar" />
+                    <button name="confirm" states="draft" 
+                        string="Confirm Order" id="draft_confirm"
+                        type="object" />
+                </header>
+                <sheet>
+                    <group>
+                        <field name="name" attrs="{'readonly': [('name', '!=', '*')]}"/>
+                        <field name="specie" attrs="{
+                            'readonly':[('state','=','validated')]}"/>
+                        <field name="farm" attrs="{
+                            'readonly':[('state','=','validated')]}"/>
+                        <field name="timestamp"
+                            attrs="{'readonly':[('state','=','validated')]}"/>
+                        <field name="event_type"
+                            attrs="{'readonly':[('state','=','validated')]}"/>
+                        <field name="animal_type"
+                            attrs="{'readonly':[('state','=','validated')]}"/>
+                        <field name="medication_events"
+                            attrs="{'invisible':[('event_type','!=','medication')],
+                            'readonly':[('state','=','validated')]}"/>
+                        <field name="feed_events"
+                            attrs="{'invisible':[('event_type','!=','feed')],
+                            'readonly':[('state','=','validated')]}"/>
+                        <field name="insemination_events"
+                            attrs="{'invisible':[('event_type','!=','insemination')],
+                            'readonly':[('state','=','validated')]}"/>
+                        <field name="pregnancy_diagnosis_events"
+                            attrs="{'invisible':[('event_type','!=','pregnancy_diagnosis')],
+                            'readonly':[('state','=','validated')]}"/>
+                        <field name="abort_events"
+                            attrs="{'invisible':[('event_type','!=','abort')],
+                            'readonly':[('state','=','validated')]}"/>
+                        <field name="farrowing_events"
+                            attrs="{'invisible':[('event_type','!=','farrowing')],
+                            'readonly':[('state','=','validated')]}"/>
+                        <field name="foster_events"
+                            attrs="{'invisible':[('event_type','!=','foster')],
+                            'readonly':[('state','=','validated')]}"/>
+                        <field name="weaning_events"
+                            attrs="{'invisible':[('event_type','!=','weaning')],
+                            'readonly':[('state','=','validated')]}"/>
+                        <field name="trasformation_events"
+                            attrs="{'invisible':[('event_type','!=','trasformation_event')],
+                            'readonly':[('state','=','validated')]}"/>
+                        <field name="notes"/>
+                    </group>
+                </sheet>
+                </form>
+            </field>
+        </record>
+	</data>
+</openerp>

+ 114 - 0
views/farm_menu.xml

@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <menuitem name="Farm" id="menu_farm" sequence="51"/>
+        <menuitem name="Configuration" id="menu_farm_configuration" 
+            parent="menu_farm"/>
+        <menuitem name="Events" id="menu_farm_events" 
+            parent="menu_farm"/>
+        <menuitem name="Animals" id="menu_farm_animals" sequence="100" 
+            parent="menu_farm"/>
+        <menuitem name="Purchases" id="menu_farm_purchases" sequence="120" 
+            parent="menu_farm"/>
+        <record id="farm_specie_view" model="ir.actions.act_window">
+            <field name="name">Specie</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">farm.specie</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" ref="view_specie_tree"/>
+        </record>
+        <record id="farm_farm_line_view" model="ir.actions.act_window">
+            <field name="name">FarmLine</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">farm.specie.farm_line</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" ref="view_farm_line_tree"/>
+        </record>
+        <record id="farm_event_order_view" model="ir.actions.act_window">
+            <field name="name">EventOrder</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">farm.event.order</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" ref="view_event_order_tree"/>
+        </record>
+        <record id="farm_consume_stock_view" model="ir.actions.act_window">
+            <field name="name">ConsumeStock</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">farm.consume.stock</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" ref="view_consume_stock_tree"/>
+        </record>
+        <record id="farm_animal_view" model="ir.actions.act_window">
+            <field name="name">Animals</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">farm.animal</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" ref="view_animal_tree"/>
+        </record>
+         <record id="farm_animal_group_view" model="ir.actions.act_window">
+            <field name="name">Animal groups</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">farm.animal.group</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" ref="view_animal_group_tree"/>
+        </record>
+        <record id="farm_tag_view" model="ir.actions.act_window">
+            <field name="name">Tag</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">farm.tags</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" ref="view_tag_tree"/>
+        </record>
+        <record id="farm_semen_extraction_view" model="ir.actions.act_window">
+            <field name="name">Extraction Event</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">farm.semen_extraction.event</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" ref="view_semen_extraction_event_tree"/>
+        </record>
+        <record id="farm_removal_view" model="ir.actions.act_window">
+            <field name="name">Removal Event</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">farm.removal.event</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" ref="view_removal_event_tree"/>
+        </record>
+        <record id="farm_purchase_line" model="ir.actions.act_window">
+            <field name="domain">[('start_date', '!=', False)]</field>
+            <field name="name">Farm Purchase Line</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">purchase.order.line</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+        </record>   
+        <menuitem action="farm_specie_view" id="menu_farm_configuration_specie"
+            name="Specie" parent="menu_farm_configuration" sequence="2"/>
+        <menuitem action="farm_farm_line_view" id="menu_farm_configuration_farm_line"
+            name="Farm Line" parent="menu_farm_configuration" sequence="6"/>
+        <menuitem action="farm_tag_view" id="menu_farm_configuration_tag"
+            name="Tag" parent="menu_farm_configuration" sequence="3"/>
+        <menuitem action="farm_event_order_view" id="menu_farm_event_order"
+            name="Work order" parent="menu_farm_events" sequence="2"/> 
+        <menuitem action="farm_semen_extraction_view" id="menu_farm_extraction_event"
+            name="Semen Extraction" parent="menu_farm_events" sequence="4"/>
+        <menuitem action="farm_removal_view" id="menu_farm_removal_event"
+            name="Removal Event" parent="menu_farm_events" sequence="5"/>
+        <menuitem action="farm_consume_stock_view" id="menu_farm_consume_stock"
+            name="Comsume Stock" parent="menu_farm_events" sequence="6"/>
+        <menuitem action="farm_animal_view" id="menu_farm_animal"
+            name="Animal" parent="menu_farm_animals" sequence="4"/>
+        <menuitem action="farm_animal_group_view" id="menu_farm_animal_group"
+            name="Animal group" parent="menu_farm_animals" sequence="6"/>
+        <menuitem action="farm_purchase_line" id="menu_farm_purchase_line"
+            name="General expenses" parent="menu_farm_purchases" sequence="50"/>
+    </data>
+</openerp>

+ 67 - 0
views/farrowing_event.xml

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <record id="view_farrowing_event_tree" model="ir.ui.view">
+            <field name="name">farrowing_event.tree</field>
+            <field name="model">farm.farrowing.event</field>
+            <field name="inherit_id" ref="view_abstract_event_import_mixin_tree" />
+            <field name="mode">primary</field>
+            <field name="arch" type="xml">
+                <field name="lot" position="after">
+                    <field name="produced_group" />
+                </field>
+            </field>
+        </record>
+        <record id="view_farrowing_event_form" model="ir.ui.view">
+            <field name="name">farrowing_event.form</field>
+            <field name="model">farm.farrowing.event</field>
+            <field name="mode">primary</field>
+            <field name="inherit_id" ref="view_abstract_event_import_mixin_form" />
+            <field name="arch" type="xml">
+                <field name="state" position="after">
+                <h1>Farrowing Event</h1>
+                </field>
+                <field name="farm" position="after">
+                    <field name="live"/>
+                    <field name="stillborn"/>
+                    <field name="mummified"/>
+                    <field name="dead" />
+                    <field name="produced_group" attrs="{'readonly': True}"/>
+                    <field name="female_cycle"/>
+                    <field name="move"/>
+                    <field name="problem"/>
+                </field>
+            </field>
+        </record>
+        <record id="view_farrowing_event_female_cycle_tree" model="ir.ui.view">
+            <field name="name">farrowing_event_female_cycle.tree</field>
+            <field name="model">farm.farrowing.event_female_cycle</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree>
+                <field name="event" />
+                </tree>
+            </field>
+            </record>
+        <record id="view_farrowing_event_female_cycle_form" model="ir.ui.view">
+            <field name="name">farrowing_event_female_cycle.form</field>
+            <field name="model">farm.farrowing.event_female_cycle</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+            <form string="Farrowing Event - Female Cycle">
+            <group>
+                <field name="event" />
+                </group>
+            </form>
+            </field>
+        </record>
+        <record id="view_farrowing_event_animal_group_form" model="ir.ui.view">
+            <field name="name">farrowing_event_animal_group.form</field>
+            <field name="model">farm.farrowing.event_group</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <field name="animal_group" />
+            </field>
+        </record>
+    </data>
+</openerp>

+ 94 - 0
views/feed_event.xml

@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+    <openerp>
+        <data>
+            <record model="ir.actions.act_window" id="animal_group2_open_feed_events">
+            <field name="domain">[('animal_group', '=', active_ids)]</field>
+            <field name="name">Feed events</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form,graph</field>
+            <field name="res_model">farm.feed.event</field>
+            </record>
+            <record model="ir.actions.act_window" id="animal_open_feed_events">
+            <field name="domain">[('animal', '=', active_ids)]</field>
+            <field name="name">Feed events</field>
+            <field name="res_model">farm.feed.event</field>
+            </record>
+            <record model="ir.ui.view" id="farm_feed_event_graph_view">
+            <field name="name">farm.feed.event.graph</field>
+            <field name="model">farm.feed.event</field>
+            <field name="type">graph</field>
+            <field name="arch" type="xml">
+                <graph string="Feed diagram" type="bar">
+                    <field name="quantity" type="col"/>
+                    <field name="start_date" type="row" interval="month"/>
+                    <field name="feed_quantity" type="measure"/>
+                </graph>
+            </field>
+        </record>
+	        <record id="view_feed_event_tree" model="ir.ui.view">
+	            <field name="name">feed_event.tree</field>
+	            <field name="model">farm.feed.event</field>
+	            <field name="mode">primary</field>
+	            <field name="inherit_id" ref="view_abstract_event_tree"/>
+	            <field name="arch" type="xml">
+	                <field name="lot" position="after">
+	                        <field name="feed_quantity" sum="Tot. feed quantity"/>
+	                        <field name="feed_product"/>
+	                        <field name="feed_lot"/>
+	                </field>     
+	            </field>
+	        </record>
+            <record id="view_feed_event_form" model="ir.ui.view">
+            <field name="name">feed_event.form</field>
+            <field name="model">farm.feed.event</field>
+            <field name="mode">primary</field>
+            <field name="inherit_id" ref="view_abstract_event_form"/>
+            <field name="arch" type="xml">
+            <field name="state" position="after">
+                <h1>Feed Event</h1>
+                </field>
+                <field name="lot" position="after">
+                        <field name="feed_quantity"/>
+                        <field name="feed_quantity_animal_day"/>
+                        <field name="location"/>
+                        <field name="quantity"/>
+                        <field name="feed_location"/>
+                        <field name="feed_product"/>
+                        <field name="feed_lot"
+                            domain="[('product_id', '=', feed_product)]"/>
+                        <field name="uom"/>
+                        <field name="start_date"/>
+                        <field name="end_date"/>
+                        <field name="move"/>
+                </field>     
+            </field>
+        </record>
+        <record model="ir.ui.view" id="feed_event_search_view">
+            <field name="name">farm.feed.event.search</field>
+            <field name="model">farm.feed.event</field>
+            <field name="arch" type="xml">
+                <search string="Search feed event">
+                    <group>
+                        <field name="farm" />
+                        <field name="feed_product" />
+                    </group>
+                    <newline />
+                    <group expand="0" string="Group by...">
+                        <filter string="Farm"
+                                domain="[]"
+                                context="{'group_by': 'farm'}" />
+                        <filter string="Month"
+                                domain="[]"
+                                context="{'group_by': 'start_date:month'}" />
+                        <filter string="Location"
+                                domain="[]"
+                                context="{'group_by': 'location'}" />
+                        <filter string="State"
+                                domain="[]"
+                                context="{'group_by': 'state'}" />
+                    </group>
+                </search>
+            </field>
+        </record>
+        </data>
+    </openerp>

+ 34 - 0
views/foster_event.xml

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <record id="view_foster_event_tree" model="ir.ui.view">
+            <field name="name">foster_event.tree</field>
+            <field name="model">farm.foster.event</field>
+            <field name="inherit_id" ref="view_abstract_event_import_mixin_tree" />
+            <field name="arch" type="xml">
+                <field name="lot" position="after">
+                    <field name="farrowing_group" />
+                </field>
+            </field>
+        </record>
+        <record id="view_foster_event_form" model="ir.ui.view">
+            <field name="name">foster_event.form</field>
+            <field name="model">farm.foster.event</field>
+            <field name="mode">primary</field>
+            <field name="inherit_id" ref="view_abstract_event_import_mixin_form" />
+            <field name="arch" type="xml">
+                <field name="state" position="after">
+                <h1>Foster Event</h1>
+                </field>
+                <field name="farm" position="after">
+                    <field name="pair_female"/>
+                    <field name="pair_event" attrs="{'readonly': True}"/>
+                    <field name="female_cycle" attrs="{'readonly': True}"/>
+                    <field name="farrowing_group" attrs="{'readonly': True}"/>
+                    <field name="quantity"/>
+                    <field name="move" attrs="{'readonly': True}"/>
+                </field>
+            </field>
+        </record>
+    </data>
+</openerp>

+ 35 - 0
views/insemination_event.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <record id="view_insemination_event_tree" model="ir.ui.view">
+            <field name="name">insemination_event.tree</field>
+            <field name="model">farm.insemination.event</field>
+            <field name="mode">primary</field>
+            <field name="inherit_id" ref="view_abstract_event_import_mixin_tree" />
+            <field name="arch" type="xml">
+                <field name="lot" position="after">
+                    <field name="dose_product" />
+                    <field name="female_cycle" />
+                </field>
+            </field>
+        </record>
+        <record id="view_insemination_event_form" model="ir.ui.view">
+            <field name="name">insemination_event.form</field>
+            <field name="model">farm.insemination.event</field>
+            <field name="mode">primary</field>
+            <field name="inherit_id" ref="view_abstract_event_import_mixin_form" />
+            <field name="arch" type="xml">
+                <field name="state" position="after">
+                <h1>Insemination Event</h1>
+                </field>
+                <field name="lot" position="after">
+                    <field name="female_cycle" attrs="{'readonly': True}"/>
+                    <field name="dose_bom" />
+                    <field name="dose_product" />
+                    <field name="dose_lot" domain="[('product_id', '=', dose_product)]"/>
+                    <field name="move" attrs="{'readonly': True, }"/>
+                </field>
+            </field>
+        </record>
+    </data>
+</openerp>

+ 57 - 0
views/medication_event.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+        <data>
+            <record model="ir.actions.act_window" id="animal_group_open_medication_events">
+	            <field name="domain">[('animal_group', '=', active_ids)]</field>
+	            <field name="name">Medication events</field>
+	            <field name="res_model">farm.medication.event</field>
+            </record>
+            <record model="ir.actions.act_window" id="animal_open_medication_events">
+                <field name="domain">[('animal', '=', active_ids)]</field>
+                <field name="name">Medication events</field>
+                <field name="res_model">farm.medication.event</field>
+            </record>
+            <record id="view_medication_event_tree" model="ir.ui.view">
+                <field name="name">medication_event.tree</field>
+                <field name="model">farm.medication.event</field>
+                <field name="mode">primary</field>
+                <field name="inherit_id" ref="view_abstract_event_tree"/>
+                <field name="arch" type="xml">
+                    <field name="lot" position="after">
+                            <field name="feed_product"/>
+                    </field>     
+                </field>
+            </record>
+            <record id="view_medication_event_form" model="ir.ui.view">
+            <field name="name">mediction_event.form</field>
+            <field name="model">farm.medication.event</field>
+            <field name="mode">primary</field>
+            <field name="inherit_id" ref="view_abstract_event_form"/>
+            <field name="arch" type="xml">
+            <field name="state" position="after">
+                <h1>Medication Event</h1>
+                </field>
+                <field name="animal_group" position="replace">
+                     <field name="medication_in_feed"/>
+                     <field name="animal_group" 
+                        attrs="{'invisible':['|',('animal_type','!=','group'), ('medication_in_feed', '=', True)],
+                            'required':[('animal_type','=','group')]}"
+                        domain="[('farm', '=', farm), ('state', '!=', 'sold')]"/> 
+                      <field name="medicated_feed" 
+                         attrs="{'invisible': [('medication_in_feed', '=', False)]}"/>
+                      <field name="feed_product"/>
+                      <field name="feed_product_uom_category"/>
+                      <field name="feed_quantity"/>
+                      <field name="uom"/>
+                      <field name="location" domain="[('location_id', '=', farm)]"/>
+                      <field name="quantity"/>
+                      <field name="feed_location"/>
+                      <field name="feed_lot" domain="[('product_id', '=', feed_product)]"/>
+                      <field name="start_date"/>
+                      <field name="end_date"/>
+                      <field name="move"/>
+                </field>     
+            </field>
+        </record>   
+        </data>
+    </openerp>

+ 39 - 0
views/move_event.xml

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+        <data>
+            <record id="view_move_event_tree" model="ir.ui.view">
+                <field name="name">move_event.tree</field>
+                <field name="model">farm.move.event</field>
+                <field name="mode">primary</field>
+                <field name="inherit_id" ref="view_abstract_event_tree"/>
+                <field name="arch" type="xml">
+                    <field name="lot" position="after">
+                            <field name="from_location"/>
+                            <field name="to_location" />
+                    </field>     
+                </field>
+            </record>
+            <record id="view_move_event_form" model="ir.ui.view">
+            <field name="name">move_event.form</field>
+            <field name="model">farm.move.event</field>
+            <field name="mode">primary</field>
+            <field name="inherit_id" ref="view_abstract_event_form"/>
+            <field name="arch" type="xml">
+            <field name="state" position="after">
+                <h1>Move Event</h1>
+                </field>
+                <field name="lot" position="after">
+                        <field name="from_location"/>
+                        <field name="to_location"/>
+                        <field name="quantity"/>
+                        <field name="unit_price"/>
+                        <field name="uom"/>
+                        <field name="weight"/>
+                        <field name="move"/>
+                        <field name="weight_record"/>
+                        <field name="move"/>
+                </field>     
+            </field>
+        </record>   
+        </data>
+    </openerp>

+ 34 - 0
views/pregnancy_diagnosis_event.xml

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+    <openerp>
+        <data>
+            <record id="view_pregnancy_diagnosis_event_tree" model="ir.ui.view">
+                <field name="name">pregnancy_diagnosis_event.tree</field>
+                <field name="model">farm.pregnancy_diagnosis.event</field>
+                <field name="mode">primary</field>
+                <field name="inherit_id" ref="view_abstract_event_tree"/>
+                <field name="arch" type="xml">
+                    <field name="lot" position="after">
+                            <field name="result"/>
+                            <field name="timestamp"/>
+                    </field>     
+                </field>
+            </record>
+            <record id="view_pregnancy_diagnosis_event_form" model="ir.ui.view">
+            <field name="name">pregnancy_diagnosis.form</field>
+            <field name="model">farm.pregnancy_diagnosis.event</field>
+            <field name="mode">primary</field>
+            <field name="inherit_id" ref="view_abstract_event_form"/>
+            <field name="arch" type="xml">
+            <field name="state" position="after">
+                <h1>Pregnanci Diagnosis Event</h1>
+                </field>
+                <field name="lot" position="after">
+                        <group>
+                            <field name="result" />
+                            <field name="female_cycle" attrs="{'readonly' : True}"/>     
+                        </group>
+                </field>     
+            </field>
+        </record>   
+        </data>
+    </openerp>

+ 20 - 0
views/product.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+    <openerp>
+        <data>
+        <record id="product_template_form_farm_view" model="ir.ui.view">
+            <field name="name">product.template.common.farm.form</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_form_view"/>
+            <field name="arch" type="xml">
+                <notebook position="inside">
+                <page string="Farm">
+                    <group col="4" colspan="2">
+                        <field name="farrowing_price"/>
+                        <field name="wearing_price"/>
+                    </group>
+                </page>
+            </notebook>
+            </field>
+        </record>            
+        </data>
+    </openerp>

+ 16 - 0
views/production.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+    <openerp>
+        <data>
+            <record id="mrp_boom_form_farm_view" model="ir.ui.view">
+            <field name="name">mrp.oom.farm.form</field>
+            <field name="model">mrp.bom</field>
+            <field name="inherit_id" ref="mrp.mrp_bom_form_view"/>
+            <field name="arch" type="xml">
+                <field name="active" position="after">
+                        <field name="semen_dose"/>
+                        <field name="specie"/>
+                </field>
+            </field>
+            </record>
+        </data>
+    </openerp>

+ 105 - 0
views/purchase_analytics.xml

@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+<data>
+
+    <record model="ir.ui.view" id="farm_purchase_order_form_inherit">
+        <field name="name">farm.purchase.order.form.inherit</field>
+        <field name="model">purchase.order</field>
+        <field name="inherit_id" ref="purchase.purchase_order_form"/>
+        <field name="arch" type="xml">
+            <button name="action_cancel" position="after">
+                <field name="imputed" attrs="{'invisible': True}"/>
+                <button name="set_purchase_analitics" states="draft,confirmed" string="Set Analitics"
+                type="object" attrs="{'invisible': [('imputed', '=', True)]}"/>
+            </button>
+            <xpath expr="//field[@name='order_line']/tree" position="inside">
+                <field name="farm"/>
+                <field name="location_id"/>
+                <field name="start_date" attrs="{'required': ['|',('farm', '!=', False),('general_expense', '=', True)]}"/>
+                <field name="end_date" attrs="{'required': ['|',('farm', '!=', False),('general_expense', '=', True)]}"/>
+                <field name="general_expense"/>
+            </xpath>
+        </field>
+    </record>
+    <record model="ir.ui.view" id="view_farm_purchase_line_tree">
+            <field name="name">farm.purchase.line.tree</field>
+            <field name="model">purchase.order.line</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree string="Purchase lines">
+                    <field name="product_id"/>
+                    <field name="farm"/>
+                    <field name="location_id"/>
+                    <field name="start_date"/>
+                    <field name="end_date"/>
+                    <field name="aux_price_subtotal" sum="Tot. price"/>
+                    <field name="imputed"/>
+                </tree>
+            </field>
+        </record>
+        <record model="ir.ui.view" id="view_farm_purchase_line_form">
+            <field name="name">farm.purchase.line.form</field>
+            <field name="model">purchase.order.line</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Purchase line">
+                    <sheet>
+                        <group col="4" colspan="2">
+                            <field name="order_id" attrs="{'readonly':True}"/>
+                            <field name="farm"/>
+		                    <field name="location_id"/>
+		                    <field name="start_date"/>
+		                    <field name="end_date"/>
+		                    <field name="price_subtotal" attrs="{'readonly':True}"/>
+		                    <field name="imputed" attrs="{'readonly':True}"/>
+                        </group>
+                    </sheet>
+                  </form>
+             </field>
+             </record>
+    <record model="ir.ui.view" id="farm_purchase_line_search_view">
+            <field name="name">farm.purchase.line.search</field>
+            <field name="model">purchase.order.line</field>
+            <field name="arch" type="xml">
+                <search string="Search Animal group">
+                    <group>
+                        <field name="farm"/>
+                        <field name="location_id"/>
+                        <field name="product_id"/>
+                        <field name="start_date"/>
+                    </group>
+                    <newline />
+                    <group expand="0" string="Group by...">
+                        <filter string="Farm"
+                                domain="[]"
+                                context="{'group_by': 'farm'}" />
+                        <filter string="Product"
+                                domain="[]"
+                                context="{'group_by': 'product_id'}" />
+                        <filter string="Location"
+                                domain="[]"
+                                context="{'group_by': 'location'}" />
+                        <filter string="month"
+                                domain="[]"
+                                context="{'group_by': 'start_date:month'}" />
+                    </group>
+                </search>
+             </field>
+       </record>
+       <record id="impute_analitics_action" model="ir.actions.server">
+        <field name="name">Impute analitics</field>
+        <field name="type">ir.actions.server</field>
+        <field name="model_id" ref="model_purchase_order_line"/>
+        <field name="state">code</field>
+        <field name="code">self.browse(cr,uid,context.get('active_ids', [])).impute_purchase_order()</field>
+</record>
+<record id="impute analitics" model="ir.values">
+        <field name="name">impute_analitics</field>
+        <field name="key">action</field>
+        <field name="key2">client_action_multi</field>
+        <field name="model">purchase.order.line</field>
+        <field name="value" eval="'ir.actions.server,%d'%impute_analitics_action"/>
+      
+</record>
+</data>
+</openerp>

+ 37 - 0
views/removal_event.xml

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+        <data>
+            <record id="view_removal_event_tree" model="ir.ui.view">
+                <field name="name">removal_event.tree</field>
+                <field name="model">farm.removal.event</field>
+                <field name="mode">primary</field>
+                <field name="inherit_id" ref="view_abstract_event_tree"/>
+                <field name="arch" type="xml">
+                    <field name="lot" position="after">
+                            <field name="removal_type"/>
+                    </field>     
+                </field>
+            </record>
+            <record id="view_removal_event_form" model="ir.ui.view">
+            <field name="name">removal_event.form</field>
+            <field name="model">farm.removal.event</field>
+            <field name="mode">primary</field>
+            <field name="inherit_id" ref="view_abstract_event_form"/>
+            <field name="arch" type="xml">
+            <field name="state" position="after">
+                <h1>Removal Event</h1>
+                <button name="confirm" states="draft" 
+                        string="Confirm Order" id="draft_confirm"
+                        type="object" />
+                </field>
+                <field name="lot" position="after">
+                        <field name="from_location"/>
+                        <field name="quantity"/>
+                        <field name="removal_type"/>
+                        <field name="reason"/>
+                        <field name="move" attrs="{'readonly': True}"/>
+                </field>     
+            </field>
+        </record>   
+        </data>
+    </openerp>

+ 15 - 0
views/res_company.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+<data>
+    <record id="company_form_farm_view" model="ir.ui.view">
+            <field name="name">res.company.farm.form</field>
+            <field name="model">res.company</field>
+            <field name="inherit_id" ref="base.view_company_form"/>
+            <field name="arch" type="xml">
+                <field name="currency_id" position="after">
+                        <field name="feed_account"/>
+                </field>
+            </field>
+    </record>
+</data>
+</openerp>

+ 91 - 0
views/semen_extraction_event.xml

@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+    <openerp>
+        <data>
+            <record id="view_semen_extraction_event_tree" model="ir.ui.view">
+                <field name="name">semen_extraction_event.tree</field>
+                <field name="model">farm.semen_extraction.event</field>
+                <field name="mode">primary</field>
+                <field name="inherit_id" ref="view_abstract_event_tree"/>
+                <field name="arch" type="xml">
+                    <field name="lot" position="after">
+                            <field name="semen_lot"/>
+                            <field name="semen_qty"/>
+                            <field name="dose_bom"/>
+                    </field>     
+                </field>
+            </record>
+            <record id="view_semen_extraction_event_form" model="ir.ui.view">
+            <field name="name">semen_extraction_event.form</field>
+            <field name="model">farm.semen_extraction.event</field>
+            <field name="mode">primary</field>
+            <field name="inherit_id" ref="view_abstract_event_form"/>
+            <field name="arch" type="xml">
+            <field name="state" position="after">
+                <button name="calculate_doses" state="draft" 
+                        string="Calc. Doses" id="calc_doses"
+                        type="object" />
+                <button name="confirm" state="draft" 
+                        string="Confirm Order" id="draft_confirm"
+                        type="object" />
+                <h1>Semen Extraction Event</h1>
+                </field>
+                <field name="lot" position="after">
+                        <group>
+                            <field name="semen_product"/>
+                            <field name="untreated_semen_qty"/>
+                            <field name="formula_result"/>
+                            <field name="solvent_calculated_qty"/>
+                            <field name="semen_calculated_qty"/>
+                            <field name="semen_qty"/>
+                            <field name="semen_lot"
+                                attrs="{'readonly': True}"/>
+                            <field name="semen_move"
+                                attrs="{'readonly': True}"/>
+                            <field name="dose_location"/>
+                            <field name="dose_bom"/>
+                            <field name='dose_calculated_units'/>
+                            <field name="doses" attrs="{'readonly': True}"/>
+                            <field name="doses_semen_qty"/>
+                            <field name="semen_remaining_qty"/>    
+                        </group>
+                </field>     
+            </field>
+        </record>
+        <record model="ir.ui.view" id="view_dose_tree">
+            <field name="name">dose.tree</field>
+            <field name="model">farm.semen_extraction.dose</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree string="Dose">
+                    <field name="sequence" />
+                    <field name="lot" />
+                </tree>
+            </field>
+        </record>
+        <record model="ir.ui.view" id="view_dose_form">
+            <field name="name">dose.form</field>
+            <field name="model">farm.semen_extraction.dose</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Dose">
+                    <header>
+                        <field name="state" widget="statusbar"/>
+                    </header>
+                    <sheet>
+                        <group col="4" colspam="2">
+                            <field name="specie" />
+                            <field name="bom" />
+                            <field name="quantity" />
+                            <field name="semen_qty" />
+                            <field name="dose_product" />
+                        </group>
+                        <group col="4" colspam="2">
+                            <field name="production" />
+                            <field name="lot" />
+                        </group>
+                    </sheet>
+                </form>
+            </field>
+        </record>  
+        </data>
+    </openerp>

+ 93 - 0
views/specie.xml

@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+	<data>
+	   <record model="ir.ui.view" id="view_specie_tree">
+	       <field name="name">specie.tree</field>
+	       <field name="model">farm.specie</field>
+	       <field name="type">tree</field>
+	       <field name="arch" type="xml">
+	           <tree string="Specie">
+	              <field name="name"/>
+	              <field name="male_enabled"/>
+	              <field name="female_enabled"/>
+	              <field name="individual_enabled"/>
+	              <field name="group_enabled"/> 
+	           </tree>  
+	       </field>
+	   </record>
+		<record model="ir.ui.view" id="view_specie_form">
+			<field name="name">specie.form</field>
+			<field name="model">farm.specie</field>
+			<field name="type">form</field>
+			<field name="arch" type="xml">
+				<form string="Specie">
+					<header>
+					   <group >
+					       <field name="name"/>
+					   </group>
+					</header>
+					<sheet>
+					<group col="4" colspan="2">
+						<field name="male_enabled"/>
+						<field name="male_product"
+						  attrs="{'invisible':[('male_enabled','=',False)],'required':[('male_enabled','=',True)]}"/>
+						<field name="female_enabled"/>
+						<field name="female_product"
+						  attrs="{'invisible':[('female_enabled','=',False)],'required':[('female_enabled','=',True)]}"/>
+						<field name="individual_enabled"/>
+						<field name="individual_product"
+						  attrs="{'invisible':[('individual_enabled','=',False)],'required':[('individual_enabled','=',True)]}"/>
+						<field name="group_enabled"/>
+						<field name="group_product"
+						  attrs="{'invisible':[('group_enabled','=',False)],'required':[('group_enabled','=',True)]}"/>
+					</group>
+					<group>	
+						<field name="semen_product"/>
+						<field name="sale_product"/>
+					</group>	
+					<group col="4" colspan="2">
+						<field name="breeds"/>
+						<field name="farm_lines"/>
+					</group>				
+					<group>
+						<field name="removed_location"/>
+						<field name="foster_location"/>
+						<field name="lost_found_location"/>
+						<field name="future_maders_location"/>
+						<field name="feed_lost_found_location"/>
+						<field name="consumed_feed_location"/>
+					</group>
+					</sheet>
+				</form>
+			
+			</field>
+		</record>
+		<record model="ir.ui.view" id="view_farm_line_tree">
+           <field name="name">farm.line.tree</field>
+           <field name="model">farm.specie.farm_line</field>
+           <field name="type">tree</field>
+           <field name="arch" type="xml">
+               <tree string="Farm Line">
+                  <field name="specie"/>
+                  <field name="farm"/>
+               </tree>  
+           </field>
+       </record>
+		<record model="ir.ui.view" id="view_farm_line_form">
+            <field name="name">farm.line.form</field>
+            <field name="model">farm.specie.farm_line</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Farm Line">
+                    <sheet>
+                        <group>
+                            <field name="specie"/>
+                            <field name="farm"/>
+                            <field name="event_order_sequence"/>
+                        </group>
+                    </sheet>
+                  </form>
+              </field>
+          </record>		
+	</data>
+</openerp>

+ 195 - 0
views/stock.xml

@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+<data>
+    <record model="ir.actions.act_window" id="location_open_animal_moves">
+            <field name="domain">['|',('from_location', '=', active_ids), ('to_location', '=', active_ids)]</field>
+            <field name="name">Animal Moves</field>
+            <field name="res_model">farm.move.event</field>
+    </record>
+    <record id="stock_production_lot_form_farm_view" model="ir.ui.view">
+            <field name="name">stock.production.lot.farm.form</field>
+            <field name="model">stock.production.lot</field>
+            <field name="inherit_id" ref="stock.view_production_lot_form"/>
+            <field name="arch" type="xml">
+                <field name="ref" position="after">
+                        <field name="animal_type"/>
+                        <field name="semen_breed"/>
+                        <field name="unit_cost"/>
+                </field>
+            </field>
+    </record>
+    <record model="ir.ui.view" id="view_stock_lot_animal_group_form">
+           <field name="name">stockLotAnimalGroup.form</field>
+           <field name="model">stock.lot_farm.animal.group</field>
+           <field name="type">form</field>
+           <field name="arch" type="xml">
+            <form string="Animal Group Tag">
+                <sheet>
+                <group>
+                <field name="lot" domain="[('animal_type','=','group')]"/>
+                </group>
+                </sheet>
+            </form>
+            </field>
+     </record>
+     <record model="ir.ui.view" id="view_stock_lot_animal_form">
+           <field name="name">stockLot_animal.form</field>
+           <field name="model">stock.lot_farm.animal</field>
+           <field name="type">form</field>
+           <field name="arch" type="xml">
+            <form string="Animal Group Tag">
+                <sheet>
+                <group>
+                <field name="lot"/>
+                </group>
+                </sheet>
+            </form>
+            </field>
+     </record>
+     <record id="stock_location_form_farm_view" model="ir.ui.view">
+            <field name="name">stock.location.farm.form</field>
+            <field name="model">stock.location</field>
+            <field name="inherit_id" ref="stock.view_location_form"/>
+            <field name="arch" type="xml">
+                <div name="buttons" position="inside">
+                    <button string="Animal Moves" 
+                                class="oe_stat_button" 
+                                icon="fa-building-o" name="%(location_open_animal_moves)d" type="action"
+                                />
+                    
+                </div>
+                <field name="scrap_location" position="after">
+                        <field name="farm_yard"/>
+                        <field name="animal_max" 
+                            attrs="{'invisible': [('farm_yard', '=', False)]}"/>
+                        <field name="factory"
+                            attrs="{'invisible': [('usage', '!=', 'view')]}"/>
+                        <field name="transport"
+                            attrs="{'invisible': [('usage', '!=', 'view')]}"/>
+                        <field name="silo"/>
+                        <field name="locations_to_fed"
+                            attrs="{'invisible':[('silo','!=', True)]}"/>
+                </field>
+            </field>
+    </record>
+    <record model="ir.actions.act_window" id="location_open_animal_moves">
+            <field name="domain">['|',('from_location', '=', active_ids), ('to_location', '=', active_ids)]</field>
+            <field name="name">Animal Moves</field>
+            <field name="res_model">farm.move.event</field>
+    </record>
+    <record id="stock_warehouse_form_farm_view" model="ir.ui.view">
+            <field name="name">stock.warehouse.farm.form</field>
+            <field name="model">stock.warehouse</field>
+            <field name="inherit_id" ref="stock.view_warehouse"/>
+            <field name="arch" type="xml">
+                <field name="code" position="after">
+                    <field name="external"/>
+                    <field name="holding_number"/>
+                    <field name="radius"/>
+                    <field name='animal_max'/>
+                </field>
+            </field>
+    </record>
+    <record model="ir.ui.view" id="view_foster_location_tree">
+            <field name="name">forser_location.tree</field>
+            <field name="model">farm.foster.locations</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree>
+                        <field name="location"/>
+                </tree>
+            </field>
+        </record>
+        <record model="ir.ui.view" id="view_foster_location_form">
+            <field name="name">foster_location.form</field>
+            <field name="model">farm.foster.locations</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Foste Location">
+                <sheet>
+                    <field name="location"/>
+                
+                </sheet>
+                </form>
+             </field>
+            </record>
+      <record model="ir.ui.view" id="view_transit_location_tree">
+            <field name="name">transit_location.tree</field>
+            <field name="model">farm.transit.locations</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree>
+                        <field name="location"/>
+                </tree>
+            </field>
+        </record>
+        <record model="ir.ui.view" id="view_transit_location_form">
+            <field name="name">transit_location.form</field>
+            <field name="model">farm.transit.locations</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Foste Location">
+                <sheet>
+                    <field name="location"/>
+                
+                </sheet>
+                </form>
+             </field>
+            </record>
+            <record model="ir.ui.view" id="view_future_location_tree">
+            <field name="name">future_location.tree</field>
+            <field name="model">farm.future_maders.locations</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree>
+                        <field name="location"/>
+                </tree>
+            </field>
+        </record>
+        <record model="ir.ui.view" id="view_future_location_form">
+            <field name="name">future_location.form</field>
+            <field name="model">farm.future_maders.locations</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Foste Location">
+                <sheet>
+                    <field name="location"/>
+                </sheet>
+                </form>
+             </field>
+            </record>
+            <record model="ir.ui.view" id="view_silo_location_tree">
+            <field name="name">silo_location.tree</field>
+            <field name="model">stock.location.silo_stock.location</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree>
+                        <field name="location"/>
+                </tree>
+            </field>
+        </record>
+        <record model="ir.ui.view" id="view_silo_location_form">
+            <field name="name">silo_location.form</field>
+            <field name="model">stock.location.silo_stock.location</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Location to Feed">
+                <group>
+                    
+                    <field name="location"/>
+                </group>
+                </form>
+             </field>
+            </record>
+         <record id="stock_inventory_form_farm_view" model="ir.ui.view">
+            <field name="name">stock.inventory.farm.form</field>
+            <field name="model">stock.inventory</field>
+            <field name="inherit_id" ref="stock.view_inventory_form"/>
+            <field name="arch" type="xml">
+                <field name="filter" position="after">
+                    <field name="feed_analitic"/>
+                </field>
+            </field>
+    </record>
+</data>
+</openerp>

+ 29 - 0
views/tag.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+    <record model="ir.ui.view" id="view_tag_tree">
+            <field name="name">specie.tree</field>
+            <field name="model">farm.tags</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree string="Tag">
+                        <field name="name"/>
+                </tree>
+            </field>
+        </record>
+        <record model="ir.ui.view" id="view_tag_form">
+            <field name="name">specie.form</field>
+            <field name="model">farm.tags</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Tag">
+                    <group>
+                        <field name="name"/>
+                        <field name="animals"/>
+                        <field name="animal_group"/>
+                    </group>
+                </form>
+            </field>
+        </record>
+    </data>
+</openerp>

+ 43 - 0
views/trasformation_event.xml

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+        <data>
+            <record id="view_trasformation_event_tree" model="ir.ui.view">
+                <field name="name">trasformation_event.tree</field>
+                <field name="model">farm.transformation.event</field>
+                <field name="mode">primary</field>
+                <field name="inherit_id" ref="view_abstract_event_tree"/>
+                <field name="arch" type="xml">
+                    <field name="lot" position="after">
+                            <field name="from_location"/>
+                            <field name="to_location"/>
+                    </field>     
+                </field>
+            </record>
+            <record id="view_trasformation_event_form" model="ir.ui.view">
+            <field name="name">trasformation_event.form</field>
+            <field name="model">farm.transformation.event</field>
+            <field name="mode">primary</field>
+            <field name="inherit_id" ref="view_abstract_event_form"/>
+            <field name="arch" type="xml">
+                <field name="state" position="after">
+                <h1>Trasformation</h1>
+                </field>
+                <field name="lot" position="after">
+                            
+                            <field name="to_animal_type"/>
+                            <field name="quantity"/>
+                            <field name="to_animal"
+                                attrs="{'invisible':[('to_animal_type', '=', 'group')],
+                                'readonly': True}"/>
+                            <field name="to_animal_group"
+                                attrs="{'invisible':[('to_animal_type', '!=', 'group')]}"
+                                domain="[('state', '!=', 'sold')]"/>
+                            <field name="from_location"/>
+                            <field name="to_location"/> 
+                            <field name="move"
+                                attr="{'invisible':[('state', '=', 'draft')]"/>   
+                </field>     
+            </field>
+        </record>   
+        </data>
+    </openerp>

+ 62 - 0
views/weaning_event.xml

@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <record id="view_weaning_event_tree" model="ir.ui.view">
+            <field name="name">weaning_event.tree</field>
+            <field name="model">farm.weaning.event</field>
+            <field name="mode">primary</field>
+            <field name="inherit_id" ref="view_abstract_event_import_mixin_tree" />
+            <field name="arch" type="xml">
+                <field name="lot" position="after">
+                    <field name="farrowing_group" />
+                </field>
+            </field>
+        </record>
+        <record id="view_weaning_event_form" model="ir.ui.view">
+            <field name="name">weaning_event.form</field>
+            <field name="model">farm.weaning.event</field>
+            <field name="mode">primary</field>
+            <field name="inherit_id" ref="view_abstract_event_import_mixin_form" />
+            <field name="arch" type="xml">
+                <field name="state" position="after">
+                <h1>Weaning Event</h1>
+                </field>
+                <field name="lot" position="after">
+                    <field name="quantity"/>
+                    <field name="female_to_location" domain="[('location_id.location_id', '=', farm)]"/>
+                    <field name="weared_group" domain="[('state', '!=', 'fatten'), ('state', '!=', 'sold')]"/>
+                    <field name="weaned_to_location"/>
+                    <field name="farrowing_group" attrs="{'readonly': True}"/>
+                    <field name="female_cycle" attrs="{'readonly': True}"/>
+                    <field name="female_move" attrs="{'readonly': True}"/>
+                    <field name="weared_move" attrs="{'readonly': True}"/>
+                    <field name="transformation_event" attrs="{'readonly': True}"/>
+                </field>
+            </field>
+        </record>
+        <record id="view_weaning_event_female_cycle_form" model="ir.ui.view">
+            <field name="name">weaning_event_female_cycle.form</field>
+            <field name="model">farm.weaning.event_female_cycle</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Wearing Event-female cycle">
+                    <group>
+                    <field name="event"/>
+                    </group>
+                </form>
+            </field>
+        
+        </record>
+        <record id="view_weaning_event_female_cycle_tree" model="ir.ui.view">
+            <field name="name">weaning_event_female_cycle.tree</field>
+            <field name="model">farm.weaning.event_female_cycle</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                    <tree>
+                    <field name="event"/>
+                    </tree>
+            </field>
+        
+        </record>
+    </data>
+</openerp>