Browse Source

Nov 11 [ADD] :Initial Commit 'agriculture_management_odoo'

pull/232/head
AjmalCybro 2 years ago
parent
commit
68735fa312
  1. 39
      agriculture_management_odoo/README.rst
  2. 23
      agriculture_management_odoo/__init__.py
  3. 69
      agriculture_management_odoo/__manifest__.py
  4. 17
      agriculture_management_odoo/data/data_sequence.xml
  5. 7
      agriculture_management_odoo/doc/RELEASE_NOTES.md
  6. 34
      agriculture_management_odoo/models/__init__.py
  7. 49
      agriculture_management_odoo/models/animal_details.py
  8. 43
      agriculture_management_odoo/models/animal_rental.py
  9. 122
      agriculture_management_odoo/models/crop_requests.py
  10. 43
      agriculture_management_odoo/models/damage_loss.py
  11. 39
      agriculture_management_odoo/models/farmer_details.py
  12. 30
      agriculture_management_odoo/models/fleet_inherit.py
  13. 44
      agriculture_management_odoo/models/location_details.py
  14. 50
      agriculture_management_odoo/models/pest_details.py
  15. 84
      agriculture_management_odoo/models/pest_request.py
  16. 39
      agriculture_management_odoo/models/seed_details.py
  17. 39
      agriculture_management_odoo/models/tag_details.py
  18. 58
      agriculture_management_odoo/models/vehicle_details.py
  19. 42
      agriculture_management_odoo/models/vehicle_rental.py
  20. 91
      agriculture_management_odoo/report/crop_animal_report.xml
  21. 17
      agriculture_management_odoo/report/crop_report.xml
  22. 92
      agriculture_management_odoo/report/crop_report_template.xml
  23. 90
      agriculture_management_odoo/report/crop_vehicle_report.xml
  24. 17
      agriculture_management_odoo/report/pest_report.xml
  25. 113
      agriculture_management_odoo/report/pest_report_template.xml
  26. 37
      agriculture_management_odoo/security/ir.model.access.csv
  27. 36
      agriculture_management_odoo/security/user_groups.xml
  28. BIN
      agriculture_management_odoo/static/description/assets/icons/check.png
  29. BIN
      agriculture_management_odoo/static/description/assets/icons/chevron.png
  30. BIN
      agriculture_management_odoo/static/description/assets/icons/cogs.png
  31. BIN
      agriculture_management_odoo/static/description/assets/icons/consultation.png
  32. BIN
      agriculture_management_odoo/static/description/assets/icons/ecom-black.png
  33. BIN
      agriculture_management_odoo/static/description/assets/icons/education-black.png
  34. BIN
      agriculture_management_odoo/static/description/assets/icons/hotel-black.png
  35. BIN
      agriculture_management_odoo/static/description/assets/icons/license.png
  36. BIN
      agriculture_management_odoo/static/description/assets/icons/lifebuoy.png
  37. BIN
      agriculture_management_odoo/static/description/assets/icons/logo.png
  38. BIN
      agriculture_management_odoo/static/description/assets/icons/manufacturing-black.png
  39. BIN
      agriculture_management_odoo/static/description/assets/icons/pos-black.png
  40. BIN
      agriculture_management_odoo/static/description/assets/icons/puzzle.png
  41. BIN
      agriculture_management_odoo/static/description/assets/icons/restaurant-black.png
  42. BIN
      agriculture_management_odoo/static/description/assets/icons/service-black.png
  43. BIN
      agriculture_management_odoo/static/description/assets/icons/trading-black.png
  44. BIN
      agriculture_management_odoo/static/description/assets/icons/training.png
  45. BIN
      agriculture_management_odoo/static/description/assets/icons/update.png
  46. BIN
      agriculture_management_odoo/static/description/assets/icons/user.png
  47. BIN
      agriculture_management_odoo/static/description/assets/icons/wrench.png
  48. BIN
      agriculture_management_odoo/static/description/assets/modules/budget_image.png
  49. BIN
      agriculture_management_odoo/static/description/assets/modules/credit_image.png
  50. BIN
      agriculture_management_odoo/static/description/assets/modules/employee_image.png
  51. BIN
      agriculture_management_odoo/static/description/assets/modules/export_image.png
  52. BIN
      agriculture_management_odoo/static/description/assets/modules/gantt_image.png
  53. BIN
      agriculture_management_odoo/static/description/assets/modules/quotation_image.png
  54. BIN
      agriculture_management_odoo/static/description/assets/screenshots/agr_conf_3.png
  55. BIN
      agriculture_management_odoo/static/description/assets/screenshots/agr_crop_4.png
  56. BIN
      agriculture_management_odoo/static/description/assets/screenshots/agr_manager_1.png
  57. BIN
      agriculture_management_odoo/static/description/assets/screenshots/agr_user_2.png
  58. BIN
      agriculture_management_odoo/static/description/assets/screenshots/agr_vehicle_repor_6.png
  59. BIN
      agriculture_management_odoo/static/description/assets/screenshots/agr_vehicle_report_print_5.png
  60. BIN
      agriculture_management_odoo/static/description/assets/screenshots/animal_rental_10.png
  61. BIN
      agriculture_management_odoo/static/description/assets/screenshots/animal_repor_8.png
  62. BIN
      agriculture_management_odoo/static/description/assets/screenshots/animal_report_print_7.png
  63. BIN
      agriculture_management_odoo/static/description/assets/screenshots/damage_loss_11.png
  64. BIN
      agriculture_management_odoo/static/description/assets/screenshots/hero.gif
  65. BIN
      agriculture_management_odoo/static/description/assets/screenshots/main_rep_pdf_out_16.png
  66. BIN
      agriculture_management_odoo/static/description/assets/screenshots/main_report_14.png
  67. BIN
      agriculture_management_odoo/static/description/assets/screenshots/pest_details_13.png
  68. BIN
      agriculture_management_odoo/static/description/assets/screenshots/pest_req_12.png
  69. BIN
      agriculture_management_odoo/static/description/assets/screenshots/rental_veh_9.png
  70. BIN
      agriculture_management_odoo/static/description/assets/screenshots/report_wiz_15.png
  71. BIN
      agriculture_management_odoo/static/description/banner.png
  72. BIN
      agriculture_management_odoo/static/description/icon.png
  73. 699
      agriculture_management_odoo/static/description/index.html
  74. 54
      agriculture_management_odoo/views/animal_details_views.xml
  75. 44
      agriculture_management_odoo/views/animal_rental_views.xml
  76. 150
      agriculture_management_odoo/views/crop_request.xml
  77. 48
      agriculture_management_odoo/views/damage_loss.xml
  78. 64
      agriculture_management_odoo/views/farmer_details_view.xml
  79. 18
      agriculture_management_odoo/views/fleet_inherit_view.xml
  80. 44
      agriculture_management_odoo/views/location_details_view.xml
  81. 177
      agriculture_management_odoo/views/menu_action.xml
  82. 127
      agriculture_management_odoo/views/menu_items.xml
  83. 52
      agriculture_management_odoo/views/pest_details.xml
  84. 78
      agriculture_management_odoo/views/pest_request.xml
  85. 46
      agriculture_management_odoo/views/seed_details_view.xml
  86. 37
      agriculture_management_odoo/views/tag_details.xml
  87. 43
      agriculture_management_odoo/views/vehicle_details_view.xml
  88. 44
      agriculture_management_odoo/views/vehicle_rental_views.xml
  89. 23
      agriculture_management_odoo/wizard/__init__.py
  90. 58
      agriculture_management_odoo/wizard/crop_report_wiz.py
  91. 25
      agriculture_management_odoo/wizard/crop_report_wiz.xml
  92. 53
      agriculture_management_odoo/wizard/pest_report_wiz.py
  93. 25
      agriculture_management_odoo/wizard/pest_report_wiz.xml

39
agriculture_management_odoo/README.rst

@ -0,0 +1,39 @@
Agriculture Management
======================
App for managing the Agriculture cultivation
Configuration
=============
* No additional configurations needed
Company
-------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
Credits
-------
* Developer: VYSHNAV AR @cybrosys
Contacts
--------
* Mail Contact : odoo@cybrosys.com
* Website : https://cybrosys.com
Bug Tracker
-----------
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
Maintainer
==========
.. image:: https://cybrosys.com/images/logo.png
:target: https://cybrosys.com
This module is maintained by Cybrosys Technologies.
For support and more information, please visit `Our Website <https://cybrosys.com/>`__
Further information
===================
HTML Description: `<static/description/index.html>`__

23
agriculture_management_odoo/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import models
from . import wizard

69
agriculture_management_odoo/__manifest__.py

@ -0,0 +1,69 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
{
'name': 'Agriculture Management In Odoo',
'version': '15.0.1.0.0',
'summary': 'Agriculture Management In Odoo',
'description': """Agriculture Management In Odoo""",
'category': 'Productivity',
'website': 'https://www.cybrosys.com',
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'license': 'LGPL-3',
'depends': [
'base',
'fleet',
],
'data': [
'security/user_groups.xml',
'security/ir.model.access.csv',
'data/data_sequence.xml',
'report/crop_report.xml',
'report/pest_report.xml',
'report/crop_report_template.xml',
'report/pest_report_template.xml',
'report/crop_vehicle_report.xml',
'report/crop_animal_report.xml',
'wizard/crop_report_wiz.xml',
'wizard/pest_report_wiz.xml',
'views/menu_action.xml',
'views/menu_items.xml',
'views/seed_details_view.xml',
'views/animal_details_views.xml',
'views/location_details_view.xml',
'views/vehicle_details_view.xml',
'views/fleet_inherit_view.xml',
'views/farmer_details_view.xml',
'views/pest_request.xml',
'views/pest_details.xml',
'views/damage_loss.xml',
'views/crop_request.xml',
'views/tag_details.xml',
'views/vehicle_rental_views.xml',
'views/animal_rental_views.xml',
],
'images': ['static/description/banner.png'],
'installable': True,
'application': True,
'auto_install': False,
}

17
agriculture_management_odoo/data/data_sequence.xml

@ -0,0 +1,17 @@
<data>
<record id="seq_pesticide" model="ir.sequence">
<field name="name">Pest Request</field>
<field name="code">pest.request</field>
<field name="prefix">PEST/REQ/</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
</record>
<record id="seq_crop" model="ir.sequence">
<field name="name">Crop Request</field>
<field name="code">crop.requests</field>
<field name="prefix">CROP/REQ/</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
</record>
</data>

7
agriculture_management_odoo/doc/RELEASE_NOTES.md

@ -0,0 +1,7 @@
## Module <agriculture_management_odoo>
#### 10.11.2022
#### Version 15.0.1.0.0
#### ADD
- Initial commit for agriculture_management_odoo

34
agriculture_management_odoo/models/__init__.py

@ -0,0 +1,34 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import crop_requests
from . import seed_details
from . import animal_details
from . import location_details
from . import vehicle_details
from . import fleet_inherit
from . import farmer_details
from . import pest_details
from . import pest_request
from . import damage_loss
from . import tag_details
from . import vehicle_rental
from . import animal_rental

49
agriculture_management_odoo/models/animal_details.py

@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
'''Module for Creating Animal Records'''
from odoo import models, fields
class AnimalDetails(models.Model):
'''Details of Animals'''
_name = 'animal.details'
_inherit = ['mail.thread', 'mail.activity.mixin']
_description = "Animal Details"
_rec_name = 'breed'
image = fields.Binary(string='Image', tracking=True)
breed = fields.Char(string='Breed', required=True, tracking=True)
age = fields.Char(string='Age', required=True, tracking=True)
state = fields.Selection(
[('available', 'Available'), ('not_available', 'Not Available')],
default="available",
string='Status', required=True, tracking=True)
note = fields.Text(string='Note', tracking=True)
def action_not_available(self):
self.state = 'not_available'
def action_sold(self):
self.state = 'sold'
def action_available(self):
self.state = 'available'

43
agriculture_management_odoo/models/animal_rental.py

@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
'''Model for Renting the Animals'''
from odoo import models, fields, api
class AnimalRental(models.Model):
_name = 'animal.rental'
_inherit = ['mail.thread', 'mail.activity.mixin']
_description = 'Animal Rental'
animal_id = fields.Many2one('animal.details', string='Animal',
required=True, tracking=True)
no_of_days = fields.Float(string='No of Days', tracking=True,
compute='compute_days', store=True)
start_date = fields.Date(string='Start Date', required=True, tracking=True)
end_date = fields.Date(string='End Date', required=True, tracking=True)
note = fields.Text(string='Description', tracking=True)
@api.depends('start_date', 'end_date')
def compute_days(self):
if self.start_date and self.end_date:
days = (self.end_date - self.start_date).days
self.no_of_days = days

122
agriculture_management_odoo/models/crop_requests.py

@ -0,0 +1,122 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
'''Model For Creating Crop Requests'''
from odoo import models, fields, api, _
class CropRequests(models.Model):
'''Details to create Crop Requests'''
_name = 'crop.requests'
_inherit = ["mail.thread", 'mail.activity.mixin']
_description = "Agriculture Management"
_rec_name = 'ref'
ref = fields.Char(string='Reference', required=True, copy=False,
readonly=True, tracking=True,
default=lambda self: _('New'))
farmer_id = fields.Many2one('farmer.details', string='Farmer',
required=True, tracking=True)
seed_id = fields.Many2one('seed.details', string='Crop', required=True,
tracking=True)
location_id = fields.Many2one('location.details', string='Location',
required=True, tracking=True)
request_date = fields.Date(string='Request Date',
default=fields.Date.context_today, required=True,
tracking=True)
state = fields.Selection(
[('draft', 'Draft'), ('confirm', 'Confirmed'),
('ploughing', 'Ploughing'), ('sowing', 'Sowing'),
('manuring', 'Manuring'), ('irrigation', 'Irrigation'),
('weeding', 'Weeding'), ('harvest', 'Harvest'), ('storage', 'Storage'),
('cancel', 'Cancel')],
string='Status', default='draft', tracking=True,
group_expand='_group_expand_states')
note = fields.Text(string='Note', tracking=True)
machinery_ids = fields.One2many('crop.machinery', 'des', string='Machinery',
tracking=True)
animal_ids = fields.One2many('crop.animals', 'dec', string='Animals',
tracking=True)
tags_id = fields.Many2many('agr.tag', string='Tags', tracking=True)
user_id = fields.Many2one('res.users', string='Responsible User',
default=lambda self: self.env.user)
@api.model
def create(self, values):
if values.get('ref', _('New')) == _('New'):
values['ref'] = self.env['ir.sequence'].next_by_code(
'crop.requests') or _('New')
res = super(CropRequests, self).create(values)
return res
def action_draft(self):
self.state = 'draft'
def action_confirm(self):
self.state = 'confirm'
def action_ploughing(self):
self.state = 'ploughing'
def action_sowing(self):
self.state = 'sowing'
def action_manuring(self):
self.state = 'manuring'
def action_irrigation(self):
self.state = 'irrigation'
def action_weeding(self):
self.state = 'weeding'
def action_harvest(self):
self.state = 'harvest'
def action_cancel(self):
self.state = 'cancel'
def action_storage(self):
self.state = 'storage'
def _group_expand_states(self, states, domain, order):
return [key for
key, val in type(self).state.selection]
class CropMachinery(models.Model):
'''Model For Attaching Vehicles'''
_name = 'crop.machinery'
des = fields.Many2one('crop.requests')
vehicle_id = fields.Many2one('vehicle.details', string='Vehicle',
tracking=True)
qty = fields.Integer(string='Quantity')
class CropAnimals(models.Model):
'''Model For Attaching Animals'''
_name = 'crop.animals'
dec = fields.Many2one('crop.requests')
animal_id = fields.Many2one('animal.details', string='Animal',
tracking=True)
qty = fields.Integer(string='Quantity')

43
agriculture_management_odoo/models/damage_loss.py

@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models, fields
class DamageLossDetails(models.Model):
_name = 'damage.loss'
_inherit = ["mail.thread", 'mail.activity.mixin']
name = fields.Char(string='Name', required=True, tracking=True)
farmer_id = fields.Many2one('farmer.details', string='Farmer',
required=True, tracking=True)
crop_id = fields.Many2one('crop.requests', string='Crop', required=True,
tracking=True)
location_id = fields.Many2one('location.details', string='Location',
required=True, tracking=True)
damage_loss_type = fields.Selection(
[('damage', 'Damage'), ('loss', 'Loss')], string='Damage/Loss Type',
required=True, tracking=True)
damage_loss_date = fields.Date(string='Damage/Loss Date',
default=fields.Date.context_today,
required=True, tracking=True)
note = fields.Text(string='Damage/Loss Description', tracking=True)
damage_loss_image = fields.Binary(string='Image', tracking=True)

39
agriculture_management_odoo/models/farmer_details.py

@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models, fields, api
class FarmerDetails(models.Model):
_name = 'farmer.details'
_inherit = ["mail.thread", 'mail.activity.mixin']
_description = 'Farmer Details'
_rec_name = 'farmer_name'
farmer_name = fields.Many2one('res.partner', string='Farmer', required=True,
tracking=True)
farmer_image = fields.Binary(string='Image', tracking=True)
note = fields.Text(string='Notes', tracking=True)
@api.onchange('farmer_name')
def onchange_farmer_name(self):
if self.farmer_name:
self.farmer_image = self.farmer_name.image_1920

30
agriculture_management_odoo/models/fleet_inherit.py

@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
'''Inheriting the Fleet Module To Get Vehicles'''
from odoo import fields, models
class Fleet(models.Model):
_inherit = "fleet.vehicle"
registration_date = fields.Date(string="Registration Date",
default=fields.Date.today)

44
agriculture_management_odoo/models/location_details.py

@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models, fields
class LocationDetails(models.Model):
_name = 'location.details'
_inherit = ['mail.thread', 'mail.activity.mixin']
_description = "Location Details"
_rec_name = 'location_name'
location_name = fields.Char(string='Location Name', required=True,
tracking=True)
location_address = fields.Char(string='Location Address', required=True,
tracking=True)
location_area = fields.Float(string='Location Area', required=True,
tracking=True)
location_area_unit = fields.Selection(
[('acres', 'Acres'), ('hectares', 'Hectares')], string='Area Unit',
required=True, tracking=True)
location_type = fields.Selection([('plot', 'Plot'), ('field', 'Field')],
default="plot",
string='Location Type', required=True,
tracking=True)
note = fields.Text(string='Note', tracking=True)

50
agriculture_management_odoo/models/pest_details.py

@ -0,0 +1,50 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models, fields, api
class PestDetails(models.Model):
_name = 'pest.details'
_inherit = ["mail.thread", 'mail.activity.mixin']
_description = 'Pest Details'
_rec_name = 'pest_name'
pest_name = fields.Char(string='Pesticide', required=True, tracking=True)
pest_expiry_date = fields.Date(string='Expiry Date', required=True,
tracking=True)
pest_description = fields.Text(string='Pest Description', tracking=True)
pest_image = fields.Binary(string='Image', tracking=True)
pest_cost = fields.Float(string='Cost', required=True, tracking=True)
pest_quantity = fields.Integer(string='Quantity', required=True,
tracking=True)
total_cost = fields.Float(string='Total Cost',
compute='_compute_total_cost', store=True,
tracking=True)
currency_id = fields.Many2one('res.currency', string='Currency',
default=lambda
self: self.env.user.company_id.currency_id,
tracking=True)
@api.depends('pest_cost', 'pest_quantity')
def _compute_total_cost(self):
for record in self:
record.total_cost = record.pest_cost * record.pest_quantity

84
agriculture_management_odoo/models/pest_request.py

@ -0,0 +1,84 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models, fields, api, _
class PestRequests(models.Model):
_name = 'pest.request'
_inherit = ["mail.thread", 'mail.activity.mixin']
_description = 'Pest Request'
_rec_name = 'reference'
reference = fields.Char(string='Reference', required=True, copy=False,
readonly=True, tracking=True,
default=lambda self: _('New'))
request_date = fields.Date(string='Request Date',
default=fields.Date.context_today, required=True,
tracking=True)
farmer_id = fields.Many2one('res.partner', string='Farmer', required=True,
tracking=True)
crop_id = fields.Many2one('crop.requests', string='Crop', required=True,
tracking=True)
location_id = fields.Many2one('location.details', string='Location',
tracking=True)
pest_id = fields.Many2one('pest.details', string='Pest', required=True,
tracking=True)
currency_id = fields.Many2one('res.currency', string='Currency',
default=lambda
self: self.env.user.company_id.currency_id)
pest_quantity = fields.Integer(string='Pest Quantity', required=True,
tracking=True)
pest_cost = fields.Float(string='Pest Cost', required=True, tracking=True)
total_cost = fields.Float(string='Total Cost',
compute='_compute_total_cost', store=True,
tracking=True)
disease = fields.Text(string='Disease', tracking=True, required=True)
note = fields.Text(string='Note', tracking=True)
state = fields.Selection(
[('draft', 'Draft'), ('pending', 'Pending'), ('approve', 'Approved'),
('rejected', 'Rejected')],
string='Status', default='draft', tracking=True)
def action_draft(self):
self.state = 'draft'
def action_pending(self):
self.state = 'pending'
def action_approved(self):
self.state = 'approve'
def action_rejected(self):
self.state = 'rejected'
@api.depends('pest_cost', 'pest_quantity')
def _compute_total_cost(self):
for record in self:
record.total_cost = record.pest_cost * record.pest_quantity
@api.model
def create(self, values):
if values.get('reference', _('New')) == _('New'):
values['reference'] = self.env['ir.sequence'].next_by_code(
'pest.request') or _('New')
res = super(PestRequests, self).create(values)
return res

39
agriculture_management_odoo/models/seed_details.py

@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models, fields
class SeedDetails(models.Model):
_name = 'seed.details'
_inherit = ["mail.thread", 'mail.activity.mixin']
_description = "Seed Details"
name = fields.Char(string='Name', required=True, tracking=True)
quantity = fields.Integer(string='Quantity', required=True, tracking=True)
unit = fields.Selection([('kg', 'Kilograms'), ('gms', 'Grams')],
string='Unit', required=True, tracking=True)
seed_type = fields.Selection(
[('registered', 'Registered'), ('breeder', 'Breeder'),
('foundation', 'Foundation'),
('certified', 'Certified')], string='Type', required=True,
tracking=True)
note = fields.Text(string='Note', tracking=True)

39
agriculture_management_odoo/models/tag_details.py

@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from random import randint
from odoo import fields, models
class Tag(models.Model):
_name = "agr.tag"
_description = "Agriculture Tags"
def _get_default_color(self):
return randint(1, 11)
name = fields.Char('Tag Name', required=True, translate=True)
color = fields.Integer('Color', default=_get_default_color)
_sql_constraints = [
('name_uniq', 'unique (name)', "Tag name already exists !"),
]

58
agriculture_management_odoo/models/vehicle_details.py

@ -0,0 +1,58 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from datetime import datetime
from odoo import models, fields, api
class VehicleDetails(models.Model):
_name = 'vehicle.details'
_inherit = ['mail.thread', 'mail.activity.mixin']
_description = "Vehicle Details"
name = fields.Char(string='Name', tracking=True, )
vehicle_main_id = fields.Many2one('fleet.vehicle', string='Vehicle',
required=True, tracking=True,
domain=(
[('state_id', '=', 'Registered')]))
vehicle_type = fields.Selection(
[('tractor', 'Tractor'), ('harvester', 'Harvester'),
('pickup', 'Pickup'), ('other', 'Other')],
string='Vehicle Type', required=True, tracking=True)
vehicle_model = fields.Char(string='Model Year', compute='compute_model',
store=True, tracking=True)
note = fields.Text(string='Note', tracking=True)
@api.onchange("vehicle_main_id")
def onchange_vehicle(self):
self.name = str(
self.vehicle_main_id.model_id.brand_id.name or " ") + "/" + str(
self.vehicle_main_id.model_id.name or " ") + "/" + str(
self.vehicle_main_id.license_plate or " ")
@api.depends('vehicle_main_id')
def compute_model(self):
for ref in self:
ref.vehicle_model = False
if ref.vehicle_main_id.registration_date:
date = datetime.strptime(
str(ref.vehicle_main_id.registration_date), '%Y-%m-%d')
ref.vehicle_model = str(date.year)

42
agriculture_management_odoo/models/vehicle_rental.py

@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models, fields, api
class VehicleRental(models.Model):
_name = 'vehicle.rental'
_inherit = ['mail.thread', 'mail.activity.mixin']
_description = 'Vehicle Rental'
vehicle_id = fields.Many2one('vehicle.details', string='Vehicle',
required=True, tracking=True)
no_of_days = fields.Float(string='No of Days', tracking=True,
compute='compute_days', store=True)
start_date = fields.Date(string='Start Date', required=True, tracking=True)
end_date = fields.Date(string='End Date', required=True, tracking=True)
note = fields.Text(string='Description', tracking=True)
@api.depends('start_date', 'end_date')
def compute_days(self):
if self.start_date and self.end_date:
days = (self.end_date - self.start_date).days
self.no_of_days = days

91
agriculture_management_odoo/report/crop_animal_report.xml

@ -0,0 +1,91 @@
<odoo>
<template id="animal_crop">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t t-call="web.external_layout">
<div class="page">
<strong>
<h1>Crop Animal Report</h1>
</strong>
<table class="table table-sm"
style="border: 2px solid black;">
<tr>
<td>REFERENCE</td>
<td>:</td>
<td>
<t t-esc="doc.ref"/>
</td>
</tr>
<tr>
<td>FARMER</td>
<td>:</td>
<td>
<t t-esc="doc.farmer_id.farmer_name.name"/>
</td>
</tr>
<tr>
<td>CROP</td>
<td>:</td>
<td>
<t t-esc="doc.seed_id.name"/>
</td>
</tr>
<tr>
<td>LOCATION</td>
<td>:</td>
<td>
<t t-esc="doc.location_id.location_name"/>
</td>
</tr>
</table>
<br>
</br>
<style>
table, thead, th, td, tr, tbody {
border: 1px solid black;
border-collapse: collapse;
padding: 5px;
}
</style>
<table class="table table-sm"
style="border: 2px solid black;">
<thead>
<tr>
<strong>
<th>Animal</th>
<th>Quantity</th>
</strong>
</tr>
</thead>
<tbody>
<tr t-foreach="doc.animal_ids" t-as="line">
<td>
<span t-esc="line.animal_id.breed"/>
</td>
<td>
<span t-esc="line.qty"/>
</td>
</tr>
</tbody>
</table>
</div>
</t>
</t>
</t>
</template>
<record id="report_animal_crop" model="ir.actions.report">
<field name="name">Animal Crop Report</field>
<field name="model">crop.requests</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">agriculture_management_odoo.animal_crop
</field>
<field name="report_file">agriculture_management_odoo.animal_crop
</field>
<field name="binding_type">report</field>
<field name="binding_model_id" ref="model_crop_requests"/>
</record>
</odoo>

17
agriculture_management_odoo/report/crop_report.xml

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="action_crop_request_report" model="ir.actions.report">
<field name="name">Crop Report</field>
<field name="model">crop.report.wizard</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">
agriculture_management_odoo.report_crop_details
</field>
<field name="report_file">
agriculture_management_odoo.report_crop_details
</field>
<field name="binding_model_id" ref="model_crop_report_wizard"/>
<field name="binding_type">report</field>
</record>
</odoo>

92
agriculture_management_odoo/report/crop_report_template.xml

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template id="report_crop_details">
<t t-call="web.html_container">
<t t-call="web.external_layout">
<div class="page">
<div class="oe_structure"/>
<div class="text-center">
<h1>Crop Report</h1>
</div>
<table class="table table-condensed">
<tr>
<td>FROM DATE</td>
<td>:</td>
<td>
<t t-if="form.get('date_from')">
<t t-esc="form['date_from']"/>
</t>
</td>
</tr>
<tr>
<td>TO DATE</td>
<td>:</td>
<td>
<t t-if="form.get('date_to')">
<t t-esc="form['date_to']"/>
</t>
</td>
</tr>
<table class="table table-condensed">
<thead>
<tr>
<th style="text-align:left;color:black!important;">
Reference
</th>
<th style="text-align:left;color:black!important;">
Farmer
</th>
<th style="text-align:left;color:black!important;">
Crop
</th>
<th style="text-align:left;color:black!important;">
Request Date
</th>
<th style="text-align:left;color:black!important;">
Location
</th>
<th style="text-align:left;color:black!important;">
Status
</th>
</tr>
</thead>
<tbody>
<t>
<tr t-foreach="record" t-as="val">
<td>
<span t-att-style="style"
t-esc="val[0]"/>
</td>
<td>
<span t-att-style="style"
t-esc="val[1]"/>
</td>
<td>
<span t-att-style="style"
t-esc="val[2]"/>
</td>
<td>
<span t-att-style="style"
t-esc="val[3]"/>
</td>
<td>
<span t-att-style="style"
t-esc="val[5]"/>
</td>
<td>
<span t-att-style="style"
t-esc="val[4]"/>
</td>
</tr>
</t>
</tbody>
</table>
</table>
</div>
</t>
</t>
</template>
</odoo>

90
agriculture_management_odoo/report/crop_vehicle_report.xml

@ -0,0 +1,90 @@
<odoo>
<template id="vehicle_crop">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t t-call="web.external_layout">
<div class="page">
<strong>
<h1>Crop Vehicle Report</h1>
</strong>
<table class="table table-sm"
style="border: 2px solid black;">
<tr>
<td>REFERENCE</td>
<td>:</td>
<td>
<t t-esc="doc.ref"/>
</td>
</tr>
<tr>
<td>FARMER</td>
<td>:</td>
<td>
<t t-esc="doc.farmer_id.farmer_name.name"/>
</td>
</tr>
<tr>
<td>CROP</td>
<td>:</td>
<td>
<t t-esc="doc.seed_id.name"/>
</td>
</tr>
<tr>
<td>LOCATION</td>
<td>:</td>
<td>
<t t-esc="doc.location_id.location_name"/>
</td>
</tr>
</table>
<br>
</br>
<style>
table, thead, th, td, tr, tbody {
border: 1px solid black;
border-collapse: collapse;
padding: 5px;
}
</style>
<table class="table table-sm"
style="border: 2px solid black;">
<thead>
<tr>
<strong>
<th>Vehicle</th>
<th>Quantity</th>
</strong>
</tr>
</thead>
<tbody>
<tr t-foreach="doc.machinery_ids" t-as="line">
<td>
<span t-esc="'%s/%s/%s' % (line.vehicle_id.vehicle_main_id.model_id.name,line.vehicle_id.vehicle_main_id.model_id.name,line.vehicle_id.vehicle_main_id.license_plate)"/>
</td>
<td>
<span t-esc="line.qty"/>
</td>
</tr>
</tbody>
</table>
</div>
</t>
</t>
</t>
</template>
<record id="report_vehicle_crop" model="ir.actions.report">
<field name="name">Vehicle Crop Report</field>
<field name="model">crop.requests</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">agriculture_management_odoo.vehicle_crop
</field>
<field name="report_file">agriculture_management_odoo.vehicle_crop
</field>
<field name="binding_type">report</field>
<field name="binding_model_id" ref="model_crop_requests"/>
</record>
</odoo>

17
agriculture_management_odoo/report/pest_report.xml

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="action_pest_request_report" model="ir.actions.report">
<field name="name">pest Report</field>
<field name="model">pest.report.wizard</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">
agriculture_management_odoo.report_pest_details
</field>
<field name="report_file">
agriculture_management_odoo.report_pest_details
</field>
<field name="binding_model_id" ref="model_pest_report_wizard"/>
<field name="binding_type">report</field>
</record>
</odoo>

113
agriculture_management_odoo/report/pest_report_template.xml

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template id="report_crop_details">
<t t-call="web.html_container">
<t t-call="web.external_layout">
<div class="page">
<div class="oe_structure"/>
<div class="text-center">
<h1>Pest Report</h1>
</div>
<table class="table table-condensed">
<tr>
<td>FROM DATE</td>
<td>:</td>
<td>
<t t-if="form.get('date_from')">
<t t-esc="form['date_from']"/>
</t>
</td>
</tr>
<tr>
<td>TO DATE</td>
<td>:</td>
<td>
<t t-if="form.get('date_to')">
<t t-esc="form['date_to']"/>
</t>
</td>
</tr>
<table class="table table-condensed">
<thead>
<tr>
<th style="text-align:left;color:black!important;">
Reference
</th>
<th style="text-align:left;color:black!important;">
Farmer
</th>
<th style="text-align:left;color:black!important;">
Crop
</th>
<th style="text-align:left;color:black!important;">
Disease
</th>
<th style="text-align:left;color:black!important;">
Pest
</th>
<th style="text-align:left;color:black!important;">
Quantity
</th>
<th style="text-align:left;color:black!important;">
Cost
</th>
<th style="text-align:left;color:black!important;">
Total
</th>
<th style="text-align:left;color:black!important;">
Status
</th>
</tr>
</thead>
<tbody>
<t>
<tr t-foreach="record" t-as="val">
<td>
<span t-att-style="style"
t-esc="val[0]"/>
</td>
<td>
<span t-att-style="style"
t-esc="val[1]"/>
</td>
<td>
<span t-att-style="style"
t-esc="val[2]"/>
</td>
<td>
<span t-att-style="style"
t-esc="val[3]"/>
</td>
<td>
<span t-att-style="style"
t-esc="val[4]"/>
</td>
<td>
<span t-att-style="style"
t-esc="val[5]"/>
</td>
<td>
<span t-att-style="style"
t-esc="val[6]"/>
</td>
<td>
<span t-att-style="style"
t-esc="val[7]"/>
</td>
<td>
<span t-att-style="style"
t-esc="val[8]"/>
</td>
</tr>
</t>
</tbody>
</table>
</table>
</div>
</t>
</t>
</template>
</odoo>

37
agriculture_management_odoo/security/ir.model.access.csv

@ -0,0 +1,37 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_crop_requests,access.crop.requests,model_crop_requests,base.group_user,1,1,1,1
access_seed_details,access.seed.details,model_seed_details,base.group_user,1,1,1,1
access_animal_details,access.animal.details,model_animal_details,base.group_user,1,1,1,1
access_location_details,access.location.details,model_location_details,base.group_user,1,1,1,1
access_vehicle_details,access.vehicle.details,model_vehicle_details,base.group_user,1,1,1,1
access_farmer_details,access.farmer.details,model_farmer_details,base.group_user,1,1,1,1
access_pest_request,access.pest.request,model_pest_request,base.group_user,1,1,1,1
access_pest_details,access.pest.details,model_pest_details,base.group_user,1,1,1,1
access_damage_loss,access.damage.loss,model_damage_loss,base.group_user,1,1,1,1
access_crop_machinery,access.crop.machinery,model_crop_machinery,base.group_user,1,1,1,1
access_crop_animals,access.crop.animals,model_crop_animals,base.group_user,1,1,1,1
access_agr_tag,access.agr.tag,model_agr_tag,base.group_user,1,1,1,1
access_vehicle_rental,access.vehicle.rental,model_vehicle_rental,base.group_user,1,1,1,1
access_animal_rental,access.animal.rental,model_animal_rental,base.group_user,1,1,1,1
access_crop_report_wizard,access.crop.report.wizard,model_crop_report_wizard,base.group_user,1,1,1,1
access_pest_report_wizard,access.pest.report.wizard,model_pest_report_wizard,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_crop_requests access.crop.requests model_crop_requests base.group_user 1 1 1 1
3 access_seed_details access.seed.details model_seed_details base.group_user 1 1 1 1
4 access_animal_details access.animal.details model_animal_details base.group_user 1 1 1 1
5 access_location_details access.location.details model_location_details base.group_user 1 1 1 1
6 access_vehicle_details access.vehicle.details model_vehicle_details base.group_user 1 1 1 1
7 access_farmer_details access.farmer.details model_farmer_details base.group_user 1 1 1 1
8 access_pest_request access.pest.request model_pest_request base.group_user 1 1 1 1
9 access_pest_details access.pest.details model_pest_details base.group_user 1 1 1 1
10 access_damage_loss access.damage.loss model_damage_loss base.group_user 1 1 1 1
11 access_crop_machinery access.crop.machinery model_crop_machinery base.group_user 1 1 1 1
12 access_crop_animals access.crop.animals model_crop_animals base.group_user 1 1 1 1
13 access_agr_tag access.agr.tag model_agr_tag base.group_user 1 1 1 1
14 access_vehicle_rental access.vehicle.rental model_vehicle_rental base.group_user 1 1 1 1
15 access_animal_rental access.animal.rental model_animal_rental base.group_user 1 1 1 1
16 access_crop_report_wizard access.crop.report.wizard model_crop_report_wizard base.group_user 1 1 1 1
17 access_pest_report_wizard access.pest.report.wizard model_pest_report_wizard base.group_user 1 1 1 1

36
agriculture_management_odoo/security/user_groups.xml

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record model="ir.module.category" id="module_agriculture_management_odoo">
<field name="name">Agriculture Management</field>
<field name="description">Category for Agriculture</field>
</record>
<record id="group_agriculture_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="module_agriculture_management_odoo"/>
</record>
<record id="group_agriculture_admin" model="res.groups">
<field name="name">Manager</field>
<field name="category_id" ref="module_agriculture_management_odoo"/>
<field name="implied_ids" eval="[(4, ref('group_agriculture_user'))]"/>
</record>
<record id="rule_own_doc" model="ir.rule">
<field name="name">View Own Docs</field>
<field ref="model_crop_requests" name="model_id"/>
<field name="domain_force">['|',('user_id', '=', user.id),('create_uid',
'=', user.id)]
</field>
<field name="groups"
eval="[(4, ref('agriculture_management_odoo.group_agriculture_user'))]"/>
</record>
<record id="rule_all_doc" model="ir.rule">
<field name="name">View All Docs</field>
<field ref="model_crop_requests" name="model_id"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups"
eval="[(4, ref('agriculture_management_odoo.group_agriculture_admin'))]"/>
</record>
</odoo>

BIN
agriculture_management_odoo/static/description/assets/icons/check.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
agriculture_management_odoo/static/description/assets/icons/chevron.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

BIN
agriculture_management_odoo/static/description/assets/icons/cogs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
agriculture_management_odoo/static/description/assets/icons/consultation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
agriculture_management_odoo/static/description/assets/icons/ecom-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

BIN
agriculture_management_odoo/static/description/assets/icons/education-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

BIN
agriculture_management_odoo/static/description/assets/icons/hotel-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

BIN
agriculture_management_odoo/static/description/assets/icons/license.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
agriculture_management_odoo/static/description/assets/icons/lifebuoy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
agriculture_management_odoo/static/description/assets/icons/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
agriculture_management_odoo/static/description/assets/icons/manufacturing-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
agriculture_management_odoo/static/description/assets/icons/pos-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
agriculture_management_odoo/static/description/assets/icons/puzzle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
agriculture_management_odoo/static/description/assets/icons/restaurant-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
agriculture_management_odoo/static/description/assets/icons/service-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

BIN
agriculture_management_odoo/static/description/assets/icons/trading-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
agriculture_management_odoo/static/description/assets/icons/training.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

BIN
agriculture_management_odoo/static/description/assets/icons/update.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
agriculture_management_odoo/static/description/assets/icons/user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

BIN
agriculture_management_odoo/static/description/assets/icons/wrench.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
agriculture_management_odoo/static/description/assets/modules/budget_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
agriculture_management_odoo/static/description/assets/modules/credit_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
agriculture_management_odoo/static/description/assets/modules/employee_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
agriculture_management_odoo/static/description/assets/modules/export_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
agriculture_management_odoo/static/description/assets/modules/gantt_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
agriculture_management_odoo/static/description/assets/modules/quotation_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
agriculture_management_odoo/static/description/assets/screenshots/agr_conf_3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

BIN
agriculture_management_odoo/static/description/assets/screenshots/agr_crop_4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

BIN
agriculture_management_odoo/static/description/assets/screenshots/agr_manager_1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

BIN
agriculture_management_odoo/static/description/assets/screenshots/agr_user_2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
agriculture_management_odoo/static/description/assets/screenshots/agr_vehicle_repor_6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

BIN
agriculture_management_odoo/static/description/assets/screenshots/agr_vehicle_report_print_5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

BIN
agriculture_management_odoo/static/description/assets/screenshots/animal_rental_10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
agriculture_management_odoo/static/description/assets/screenshots/animal_repor_8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
agriculture_management_odoo/static/description/assets/screenshots/animal_report_print_7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
agriculture_management_odoo/static/description/assets/screenshots/damage_loss_11.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
agriculture_management_odoo/static/description/assets/screenshots/hero.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 KiB

BIN
agriculture_management_odoo/static/description/assets/screenshots/main_rep_pdf_out_16.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
agriculture_management_odoo/static/description/assets/screenshots/main_report_14.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
agriculture_management_odoo/static/description/assets/screenshots/pest_details_13.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
agriculture_management_odoo/static/description/assets/screenshots/pest_req_12.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

BIN
agriculture_management_odoo/static/description/assets/screenshots/rental_veh_9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
agriculture_management_odoo/static/description/assets/screenshots/report_wiz_15.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
agriculture_management_odoo/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
agriculture_management_odoo/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

699
agriculture_management_odoo/static/description/index.html

@ -0,0 +1,699 @@
<div class="container" style="padding: 1rem !important; margin-bottom: 1rem !important;">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12 d-flex justify-content-between" style="border-bottom: 1px solid #d5d5d5;">
<div class="my-3">
<img src="./assets/icons/logo.png" style="width: auto !important; height: 40px !important;">
</div>
<div class="my-3 d-flex align-items-center">
<div
style="background-color: #7C7BAD !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;">
<i class="fa fa-check mr-1"></i>Community
</div>
<div
style="background-color: #875A7B !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;">
<i class="fa fa-check mr-1"></i>Enterprise
</div>
</div>
</div>
</div>
</div>
<div class="container" style="padding: 0rem 1.5rem 4rem !important">
<div class="row" style="height: 900px !important;">
<div class="col-sm-12 col-md-12 col-lg-12"
style="padding: 4rem 1rem !important; background-color: #714B67 !important; height: 600px !important; border-radius: 20px !important;">
<h1
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #FFFFFF !important; font-size: 3.5rem !important; text-align: center !important;">
Agriculture Management</h1>
<p
style="font-family: 'Montserrat', sans-serif !important; font-weight: 300 !important; color: #FFFFFF !important; font-size: 1.4rem !important; text-align: center !important;">
A Module For Managing Agriculture.
</p>
<img src="./assets/screenshots/hero.gif" class="img-responsive" width="100%" height="auto" />
</div>
</div>
<div class="row">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin-bottom: 2rem !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-compass mr-2"></i>Explore this module
</h2>
<div class="row">
<div class="col-md-6">
<a href="#overview" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Overview</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
Learn more about this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#features" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Features</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
View features of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#screenshots" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Screenshots</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
See key screenshots of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
</div>
</div>
</div>
<div class="row" id="overview">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-pie-chart mr-2"></i>Overview
</h2>
</div>
<div class="col-mg-12 pl-3">
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;">
In the Agriculture Management App, We can manage the agriculture to our own need.
We can also manage the rentals of vehicle and animals for agriculture purpose.
We can also customize and hide the fields.</p>
</div>
</p>
</div>
<div class="row" id="features">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-star mr-2"></i>Features
</h2>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Set the Manager and User in settings.</h4>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Create Crop Requests.</h4>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Create Rentals for Vehicles and Animals.</h4>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Create Damage/Loss Report.</h4>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Create Pesticide Request and Can View the Pesticide Details.</h4>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Create Total Crop Request Report.</h4>
</div>
</div>
</div>
<div class="row" id="screenshots">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-image mr-2"></i>Screenshots
</h2>
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Provide User Access</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
In Settings, user can have Manager access which is overall access and another one is User access.
layout</p>
<img src="assets/screenshots/agr_manager_1.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
<img src="assets/screenshots/agr_user_2.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Configuration </h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
User can create Seed, Farmers, Vehicles, Animals, Locations and Tags used for creating Crop Request.
</p>
<img src="assets/screenshots/agr_conf_3.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Create Crop Request using created values in configuration.</h4>
<img src="assets/screenshots/agr_crop_4.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
User can print report of current record of used vehicles. </h4>
<img src="assets/screenshots/agr_vehicle_report_print_5.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Report view of used vehicle report.</h4>
<img src="assets/screenshots/agr_vehicle_repor_6.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
User Can Print Report Of Current Record of Used Animals.</h4>
<img src="assets/screenshots/animal_report_print_7.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Report View Of Used Animal Report.</h4>
<img src="assets/screenshots/animal_repor_8.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
User Can Rent The Vehicles.</h4>
<img src="assets/screenshots/rental_veh_9.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
User Can Rent The Animals.</h4>
<img src="assets/screenshots/animal_rental_10.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
User Can Submit Damage/ Loss of the Crops.</h4>
<img src="assets/screenshots/damage_loss_11.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
User Can Request Pesticide For The Crops.</h4>
<img src="assets/screenshots/pest_req_12.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
User Can Create and View Pesticides Available.</h4>
<img src="assets/screenshots/pest_details_13.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
User Can Take The Crop Request Report.</h4>
<img src="assets/screenshots/main_report_14.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Enter The Date Range To Print Report.</h4>
<img src="assets/screenshots/report_wiz_15.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Report View Of Crop Request.</h4>
<img src="assets/screenshots/main_rep_pdf_out_16.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
</div>
<!-- SUGGESTED PRODUCTS -->
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center"
style="text-align: center; padding: 2.5rem 1rem !important;">
<h2 style="color: #212529 !important;">Suggested Products</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner">
<div class="carousel-item active" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/export_stockinfo_xls/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/export_image.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/custom_gantt_view/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/gantt_image.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/sales_credit_limit/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/credit_image.png">
</div>
</a>
</div>
</div>
<div class="carousel-item" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/base_account_budget/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/budget_image.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/product_to_quotation/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/quotation_image.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/employee_documents_expiry/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/employee_image.png">
</div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev" style="left:-25px;width: 35px;color: #000;">
<span class="carousel-control-prev-icon"><i class="fa fa-chevron-left" style="font-size:24px"></i></span> </a>
<a class="carousel-control-next" href="#demo1" data-slide="next" style="right:-25px;width: 35px;color: #000;">
<span class="carousel-control-next-icon"><i class="fa fa-chevron-right" style="font-size:24px"></i></span>
</a>
</div>
</div>
</div>
<!-- END OF SUGGESTED PRODUCTS -->
<!-- OUR SERVICES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Services</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/cogs.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Customization</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/wrench.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/lifebuoy.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Support</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/user.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Hire
Odoo
Developer</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/puzzle.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Integration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/update.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Migration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/consultation.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Consultancy</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/training.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/license.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Licensing Consultancy</h6>
</div>
</div>
</section>
<!-- END OF END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Industries</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/trading-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Trading
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easily procure
and
sell your products</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/pos-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
POS
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easy
configuration
and convivial experience</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/education-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Education
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
A platform for
educational management</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/manufacturing-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Manufacturing
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Plan, track and
schedule your operations</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/ecom-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
E-commerce &amp; Website
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Mobile
friendly,
awe-inspiring product pages</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/service-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Service Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Keep track of
services and invoice</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/restaurant-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Restaurant
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Run your bar or
restaurant methodically</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/hotel-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Hotel Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
An
all-inclusive
hotel management application</p>
</div>
</div>
</div>
</section>
<!-- END OF END OF OUR INDUSTRIES -->
<!-- FOOTER -->
<!-- Footer Section -->
<section class="container" style="margin: 5rem auto 2rem;">
<div class="row" style="max-width:1540px;">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Need Help?</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
</div>
<!-- Contact Cards -->
<div class="row d-flex justify-content-center align-items-center"
style="max-width:1540px; margin: 0 auto 2rem auto;">
<div class="col-lg-12" style="padding: 0rem 3rem 2rem; border-radius: 10px; margin-right: 3rem; ">
<div class="row mt-4">
<div class="col-lg-6">
<a href="mailto:odoo@cybrosys.com" target="_blank" class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #4d4d4d; color: #FFF; border-radius: 4px;"><i
class="fa fa-envelope mr-2"></i>odoo@cybrosys.com</a>
</div>
<div class="col-lg-6">
<a href="https://api.whatsapp.com/send?phone=918606827707" target="_blank"
class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #25D366; color: #FFF; border-radius: 4px;"><i
class="fa fa-whatsapp mr-2"></i>+91 86068 27707</a>
</div>
</div>
</div>
</div>
<!-- End of Contact Cards -->
</section>
<!-- Footer -->
<section class="oe_container" style="padding: 2rem 3rem 1rem;">
<div class="row" style="max-width:1540px; margin: 0 auto; margin-right: 3rem; ">
<!-- Logo -->
<div class="col-lg-12 d-flex justify-content-center align-items-center" style="margin-top: 3rem;">
<img src="https://www.cybrosys.com/images/logo.png" width="200px" height="auto" />
</div>
<!-- End of Logo -->
<div class="col-lg-12">
<hr
style="margin-top: 3rem;background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(229,229,229,1) 33%, rgba(229,229,229,1) 58%, rgba(0,212,255,0) 100%); height: 2px; border-style: none;">
<!-- End of Footer Section -->
</div>
</div>
</section>
<!-- END OF FOOTER -->
</div>

54
agriculture_management_odoo/views/animal_details_views.xml

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_animal_details_tree" model="ir.ui.view">
<field name="name">animal.details.tree</field>
<field name="model">animal.details</field>
<field name="arch" type="xml">
<tree>
<field name="breed"/>
<field name="age"/>
</tree>
</field>
</record>
<record id="view_animals_details_form" model="ir.ui.view">
<field name="name">animal.details.form</field>
<field name="model">animal.details</field>
<field name="arch" type="xml">
<form>
<header>
<button id="button_not_available"
name="action_not_available" string="Not Available"
class="btn-primary"
type="object" states="available"/>
<button id="button_available" name="action_available"
string="Set To Available" class="btn-primary"
type="object" states="not_available,sold"/>
<field name="state" widget="statusbar"
statusbar_visible="available,not_available,sold"/>
</header>
<sheet>
<h1>
<field name="breed"/>
</h1>
<group>
<group>
<field name="age"/>
</group>
<group>
<field name="image" widget="image"/>
</group>
</group>
<field name="note" placeholder="Animal Description"/>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
</odoo>

44
agriculture_management_odoo/views/animal_rental_views.xml

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_animal_rental_tree" model="ir.ui.view">
<field name="name">animal.rental.tree</field>
<field name="model">animal.rental</field>
<field name="arch" type="xml">
<tree>
<field name="animal_id"/>
<field name="no_of_days"/>
<field name="start_date"/>
<field name="end_date"/>
</tree>
</field>
</record>
<record id="view_animal_rental_form" model="ir.ui.view">
<field name="name">animal.rental.form</field>
<field name="model">animal.rental</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<group>
<field name="animal_id"/>
<field name="no_of_days"/>
</group>
<group>
<field name="start_date"/>
<field name="end_date"/>
</group>
</group>
<field name="note"
placeholder="Vehicle Description........."/>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
</odoo>

150
agriculture_management_odoo/views/crop_request.xml

@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_crop_request_kanban" model="ir.ui.view">
<field name="name">crop.request.kanban</field>
<field name="model">crop.requests</field>
<field name="arch" type="xml">
<kanban default_group_by="state"
class="o_kanban_small_column o_kanban_project_tasks"
records_draggable="true" default_order="state"
examples="project"
js_class="project_task_kanban" sample="1">
<field name="ref"/>
<field name="farmer_id"/>
<field name="request_date"/>
<field name="seed_id"/>
<field name="tags_id" widget="many2many_tags"
options="{'color_field': 'color'}"/>
<progressbar field="state"
colors='{"draft": "warning","confirm": "info", "cancel": "danger", "ploughing": "muted", "harvest": "muted", "storage": "success", "manuring": "primary"}'/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_global_click">
<div class="oe_kanban_details">
<strong>
<field name="ref"/>
<br/>
<field name="farmer_id"/>
<br/>
<field name="request_date"/>
<br/>
<field name="seed_id"/>
<br/>
<field name="tags_id"
widget="many2many_tags"
options="{'color_field': 'color'}"/>
<br/>
</strong>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="view_crop_request_tree" model="ir.ui.view">
<field name="name">crop.request.tree</field>
<field name="model">crop.requests</field>
<field name="arch" type="xml">
<tree>
<field name="ref"/>
<field name="seed_id"/>
<field name="farmer_id"/>
<field name="location_id"/>
</tree>
</field>
</record>
<record id="view_crop_request_form" model="ir.ui.view">
<field name="name">crop.request.form</field>
<field name="model">crop.requests</field>
<field name="arch" type="xml">
<form>
<header>
<button id="button_draft" name="action_draft" string="Draft"
type="object" class="oe_highlight"
states="cancel"/>
<button id="button_confirm" name="action_confirm"
string="Submit" type="object" class="btn-primary"
states="draft"/>
<button id="button_ploughing" name="action_ploughing"
string="Ploughing"
class="btn-primary"
type="object" states="confirm"/>
<button id="button_sowing" name="action_sowing"
string="Sowing" class="btn-primary"
type="object" states="ploughing"/>
<button id="button_manuring" name="action_manuring"
string="Manure" class="btn-primary"
type="object" states="sowing"/>
<button id="button_irrigation" name="action_irrigation"
string="Irrigation" class="btn-primary"
type="object" states="manuring"/>
<button id="button_weeding" name="action_weeding"
string="Weeding" class="btn-primary"
type="object" states="irrigation"/>
<button id="button_harvest" name="action_harvest"
string="Harvest" class="btn-primary"
type="object" states="weeding"/>
<button id="button_storage" name="action_storage"
string="Storage" class="btn-primary"
type="object" states="harvest"/>
<button id="button_cancel" name="action_cancel"
string="Cancelled" class="btn-primary"
type="object"
states="ploughing,sowing,manuring,irrigation,weeding,harvest,storage"/>
<field name="state" widget="statusbar"
statusbar_visible="draft,confirm,ploughing,sowing,manuring,irrigation,weeding,harvest,storage,cancel"/>
</header>
<sheet>
<h1>
<field name="ref"/>
</h1>
<group>
<group>
<field name="farmer_id"/>
<field name="seed_id"/>
<field name="user_id"/>
</group>
<group>
<field name="request_date"/>
<field name="location_id"/>
<field name="tags_id" widget="many2many_tags"
options="{'color_field': 'color'}"/>
</group>
</group>
<notebook>
<page string="Machinery" name="used_machinery">
<field name="machinery_ids">
<tree editable="bottom">
<field name="vehicle_id"/>
<field name="qty"/>
</tree>
</field>
</page>
<page string="Animals" name="used_animals">
<field name="animal_ids">
<tree editable="bottom">
<field name="animal_id"/>
<field name="qty"/>
</tree>
</field>
</page>
<page string="Description" name="description">
<field name="note"
placeholder="Crop Description........"/>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
</odoo>

48
agriculture_management_odoo/views/damage_loss.xml

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_damage_loss_tree" model="ir.ui.view">
<field name="name">damage.loss.tree</field>
<field name="model">damage.loss</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="farmer_id"/>
<field name="crop_id"/>
<field name="location_id"/>
<field name="damage_loss_type"/>
</tree>
</field>
</record>
<record id="view_damage_loss_form" model="ir.ui.view">
<field name="name">damage.loss.form</field>
<field name="model">damage.loss</field>
<field name="arch" type="xml">
<form>
<sheet>
<h1>
<field name="name"/>
</h1>
<group>
<group>
<field name="farmer_id"/>
<field name="crop_id"/>
<field name="location_id"/>
<field name="damage_loss_type"/>
<field name="damage_loss_date"/>
</group>
<group>
<field name="damage_loss_image" widget="image"/>
</group>
</group>
<field name="note" placeholder="Damage/Loss Description"/>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
</odoo>

64
agriculture_management_odoo/views/farmer_details_view.xml

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_farmer_details_kanban" model="ir.ui.view">
<field name="name">farmer.details.kanban</field>
<field name="model">farmer.details</field>
<field name="arch" type="xml">
<kanban>
<field name="farmer_name"/>
<field name="farmer_image"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_global_click">
<div class="oe_kanban_details">
<ul>
<group>
<group>
<div class="o_kanban_image_fill_left o_kanban_image_full">
<img t-att-src="record.farmer_image"
alt=""/>
<field name="farmer_image"
widget="image"/>
</div>
<h5>
<field name="farmer_name"/>
</h5>
</group>
</group>
</ul>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="view_farmer_details_form" model="ir.ui.view">
<field name="name">farmer.details.form</field>
<field name="model">farmer.details</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<group>
<field name="farmer_name"
widget="res_partner_many2one"
context="{'show_address': 1}"
options='{"always_reload": True}'/>
</group>
<group>
<field name="farmer_image" widget="image"/>
</group>
</group>
<field name="note" placeholder="Location Description"/>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
</odoo>

18
agriculture_management_odoo/views/fleet_inherit_view.xml

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_order_form_inherit" model="ir.ui.view">
<field name="name">fleet.vehicle.inherited</field>
<field name="model">fleet.vehicle</field>
<field name="inherit_id" ref="fleet.fleet_vehicle_view_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='first_contract_date']"
position="replace">
<field name="first_contract_date" invisible="1"/>
</xpath>
<xpath expr="//field[@name='first_contract_date']"
position="before">
<field name="registration_date"/>
</xpath>
</field>
</record>
</odoo>

44
agriculture_management_odoo/views/location_details_view.xml

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_location_details_tree" model="ir.ui.view">
<field name="name">location.details.tree</field>
<field name="model">location.details</field>
<field name="arch" type="xml">
<tree>
<field name="location_name"/>
<field name="location_area_unit" optional="hide"/>
<field name="location_area"/>
<field name="location_type"/>
</tree>
</field>
</record>
<record id="view_location_details_form" model="ir.ui.view">
<field name="name">location.details.form</field>
<field name="model">location.details</field>
<field name="arch" type="xml">
<form>
<sheet>
<h1>
<field name="location_name"/>
</h1>
<group>
<group>
<field name="location_address"/>
<field name="location_area"/>
</group>
<group>
<field name="location_type"/>
<field name="location_area_unit"/>
</group>
</group>
<field name="note" placeholder="Location Description"/>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
</odoo>

177
agriculture_management_odoo/views/menu_action.xml

@ -0,0 +1,177 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Action Menu under Crops-->
<record id="action_crop_details" model="ir.actions.act_window">
<field name="name">Crops</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">crop.requests</field>
<field name="view_mode">kanban,tree,form</field>
<field name="context">{'search_default_available':1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create Your First Crop Request
</p>
</field>
</record>
<!-- Action Menu under rental-->
<record id="action_vehicle_rental" model="ir.actions.act_window">
<field name="name">Vehicle Rental</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">vehicle.rental</field>
<field name="view_mode">tree,form,kanban</field>
<field name="context">{'search_default_available':1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create Your First Vehicle Rental Request
</p>
</field>
</record>
<record id="action_animal_rental" model="ir.actions.act_window">
<field name="name">Vehicle Rental</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">animal.rental</field>
<field name="view_mode">tree,form,kanban</field>
<field name="context">{'search_default_available':1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create Your First Animal Rental Request
</p>
</field>
</record>
<!-- Action Menu under Disease & Pesticides-->
<record id="action_pest_request" model="ir.actions.act_window">
<field name="name">Pesticide Request</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">pest.request</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_available':1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create Your First Pest Request
</p>
</field>
</record>
<record id="action_pest_details" model="ir.actions.act_window">
<field name="name">Pesticide Details</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">pest.details</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_available':1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create Your First Pesticide
</p>
</field>
</record>
<!-- Action of menu Damage and Loss-->
<record id="action_damage_loss" model="ir.actions.act_window">
<field name="name">Damage and Loss</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">damage.loss</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_available':1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create Your First Damage and Loss
</p>
</field>
</record>
<!-- Action of menu Reporting-->
<record id="action_crop_report" model="ir.actions.act_window">
<field name="name">Crop Report</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">crop.report.wizard</field>
<field name="view_mode">form</field>
<field name="view_id" ref="crop_report_view_form"/>
<field name="target">new</field>
</record>
<record id="action_pest_report" model="ir.actions.act_window">
<field name="name">Pest Report</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">pest.report.wizard</field>
<field name="view_mode">form</field>
<field name="view_id" ref="pest_report_view_form"/>
<field name="target">new</field>
</record>
<!-- Action of menu under configuration-->
<record id="action_seed_details" model="ir.actions.act_window">
<field name="name">Seeds</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">seed.details</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_available':1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create Your First Seed
</p>
</field>
</record>
<record id="action_animal_details" model="ir.actions.act_window">
<field name="name">Animals</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">animal.details</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_available':1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create Your First Animal
</p>
</field>
</record>
<record id="action_location_details" model="ir.actions.act_window">
<field name="name">Locations</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">location.details</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_available':1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create Your First Location
</p>
</field>
</record>
<record id="action_vehicle_details" model="ir.actions.act_window">
<field name="name">Vehicles</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">vehicle.details</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_available':1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create Your First Vehicle
</p>
</field>
</record>
<record id="action_tags_details" model="ir.actions.act_window">
<field name="name">Tags</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">agr.tag</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_available':1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create Your First Tag
</p>
</field>
</record>
<record id="action_farmer_details" model="ir.actions.act_window">
<field name="name">Farmers</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">farmer.details</field>
<field name="view_mode">kanban,form,tree</field>
<field name="context">{'search_default_available':1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create Your First Farmer
</p>
</field>
</record>
</odoo>

127
agriculture_management_odoo/views/menu_items.xml

@ -0,0 +1,127 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Root Menu-->
<menuitem id="menu_agriculture_management_root"
name="Agriculture Management"
sequence="20"/>
<menuitem id="menu_crop_root"
name="Crops"
parent="menu_agriculture_management_root"
sequence="20"/>
<menuitem id="menu_rental_root"
name="Rentals"
parent="menu_agriculture_management_root"
sequence="20"/>
<menuitem id="menu_calamities"
name="Damage and Loss"
parent="menu_agriculture_management_root"
action="action_damage_loss"
sequence="30"/>
<menuitem id="menu_disease_and_pest_root"
name="Disease and Pesticides"
parent="menu_agriculture_management_root"
sequence="50"/>
<menuitem id="menu_reporting_root"
name="Reporting"
parent="menu_agriculture_management_root"
groups="agriculture_management_odoo.group_agriculture_admin"
sequence="50"/>
<menuitem id="menu_configuration_root"
name="Configuration"
parent="menu_agriculture_management_root"
groups="agriculture_management_odoo.group_agriculture_admin"
sequence="100"/>
<!-- menu under Crops-->
<menuitem id="menu_crop_request"
name="Crop Request"
parent="menu_crop_root"
action="action_crop_details"
sequence="20"/>
<!-- menu under rentals-->
<menuitem id="menu_vehicle_rental"
name="Vehicle Rentals"
parent="menu_rental_root"
action="action_vehicle_rental"
sequence="20"/>
<menuitem id="menu_animal_rental"
name="Animal Rentals"
parent="menu_rental_root"
action="action_animal_rental"
sequence="20"/>
<!--menu under Disease and Pesticides-->
<menuitem id="menu_pest_request"
name="Pesticide Request"
parent="menu_disease_and_pest_root"
action="action_pest_request"
sequence="20"/>
<menuitem id="menu_pest_details"
name="Pesticides Details"
parent="menu_disease_and_pest_root"
action="action_pest_details"
sequence="20"/>
<!--menu under Reporting -->
<menuitem id="menu_crop_reporting"
name="Crop Reporting"
parent="menu_reporting_root"
action="action_crop_report"
sequence="10"/>
<menuitem id="menu_pest_reporting"
name="Pest Reporting"
parent="menu_reporting_root"
action="action_pest_report"
sequence="10"/>
<!--menu under configuration -->
<menuitem id="menu_seed_conf"
name="Seed"
parent="menu_configuration_root"
action="action_seed_details"
sequence="10"/>
<menuitem id="menu_farmer_conf"
name="Farmers"
parent="menu_configuration_root"
action="action_farmer_details"
sequence="12"/>
<menuitem id="menu_animal_conf"
name="Animals"
parent="menu_configuration_root"
action="action_animal_details"
sequence="20"/>
<menuitem id="menu_location_conf"
name="Locations"
parent="menu_configuration_root"
action="action_location_details"
sequence="20"/>
<menuitem id="menu_vehicle_conf"
name="Vehicles"
parent="menu_configuration_root"
action="action_vehicle_details"
sequence="15"/>
<menuitem id="menu_tags_conf"
name="Tags"
parent="menu_configuration_root"
action="action_tags_details"
sequence="25"/>
</odoo>

52
agriculture_management_odoo/views/pest_details.xml

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_pest_details_tree" model="ir.ui.view">
<field name="name">pest.details.tree</field>
<field name="model">pest.details</field>
<field name="arch" type="xml">
<tree>
<field name="pest_name"/>
<field name="pest_expiry_date"/>
<field name="pest_quantity"/>
<field name="pest_cost"/>
<field name="total_cost"/>
</tree>
</field>
</record>
<record id="view_pest_details_form" model="ir.ui.view">
<field name="name">pest.details.form</field>
<field name="model">pest.details</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<group>
<field name="pest_name"/>
<field name="pest_expiry_date"/>
<field name="currency_id" invisible="1"/>
<field name="pest_quantity"/>
<field name="pest_cost" widget='monetary'
options="{'currency_field': 'currency_id'}"
optional="show"/>
<field name="total_cost" widget='monetary'
options="{'currency_field': 'currency_id'}"
optional="show"/>
</group>
<group>
<field name="pest_image" widget="image"/>
</group>
</group>
<field name="pest_description"
placeholder="Pesticide Description..............."/>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
</odoo>

78
agriculture_management_odoo/views/pest_request.xml

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_pest_request_tree" model="ir.ui.view">
<field name="name">pest.request.tree</field>
<field name="model">pest.request</field>
<field name="arch" type="xml">
<tree>
<field name="reference"/>
<field name="farmer_id"/>
<field name="crop_id"/>
<field name="location_id"/>
<field name="disease"/>
<field name="total_cost"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="view_pest_request_form" model="ir.ui.view">
<field name="name">pest.request.form</field>
<field name="model">pest.request</field>
<field name="arch" type="xml">
<form>
<header>
<button id="button_draft" name="action_draft" string="Draft"
type="object" class="oe_highlight"
states="rejected,approve"/>
<button id="button_pending" name="action_pending"
string="Submit" type="object" class="btn-primary"
states="draft"/>
<button id="button_approved" name="action_approved"
string="Approved"
class="btn-primary"
type="object" states="pending"
groups="agriculture_management_odoo.group_agriculture_admin"/>
<button id="button_rejected" name="action_rejected"
string="Reject"
class="btn-primary"
type="object" states="pending"
groups="agriculture_management_odoo.group_agriculture_admin"/>
<field name="state" widget="statusbar"
statusbar_visible="draft"/>
</header>
<sheet>
<h1>
<field name="reference"/>
</h1>
<group>
<group>
<field name="farmer_id"/>
<field name="crop_id"/>
<field name="disease"/>
<field name="pest_id"/>
<field name="currency_id" invisible="1"/>
<field name="total_cost" widget='monetary'
options="{'currency_field': 'currency_id'}"
optional="show"/>
</group>
<group>
<field name="request_date"/>
<field name="location_id"/>
<field name="pest_quantity"/>
<field name="pest_cost" widget='monetary'
options="{'currency_field': 'currency_id'}"
optional="show"/>
</group>
</group>
<field name="note" placeholder="Pesticide Description"/>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
</odoo>

46
agriculture_management_odoo/views/seed_details_view.xml

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_seed_details_tree" model="ir.ui.view">
<field name="name">seed.details.tree</field>
<field name="model">seed.details</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="seed_type"/>
<field name="quantity"/>
<field name="unit" optional="hide"/>
</tree>
</field>
</record>
<record id="view_seed_details_form" model="ir.ui.view">
<field name="name">seed.details.form</field>
<field name="model">seed.details</field>
<field name="arch" type="xml">
<form>
<sheet>
<h1>
<field name="name">Name</field>
</h1>
<group>
<group>
<field name="quantity"/>
<field name="seed_type"/>
</group>
<group>
<field name="unit"/>
</group>
</group>
<field name="note" placeholder="Seed Description"/>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
</odoo>

37
agriculture_management_odoo/views/tag_details.xml

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="agriculture_tag_view_form" model="ir.ui.view">
<field name="name">agriculture.tag.view.form</field>
<field name="model">agr.tag</field>
<field name="arch" type="xml">
<form string="Tags">
<sheet>
<div class="oe_title">
<label for="name"/>
<h1>
<field name="name" placeholder="e.g. Services"/>
</h1>
</div>
<group>
<group>
<field name="color" required="True"
widget="color_picker"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="agriculture_tag_view_tree" model="ir.ui.view">
<field name="name">agriculture.tag.view.tree</field>
<field name="model">agr.tag</field>
<field name="arch" type="xml">
<tree string="Tags" editable="bottom" sample="1">
<field name="name"/>
<field name="color" widget="color_picker"/>
</tree>
</field>
</record>
</odoo>

43
agriculture_management_odoo/views/vehicle_details_view.xml

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_vehicle_details_tree" model="ir.ui.view">
<field name="name">vehicle.details.tree</field>
<field name="model">vehicle.details</field>
<field name="arch" type="xml">
<tree>
<field name="vehicle_main_id"/>
<field name="vehicle_model"/>
<field name="vehicle_type"/>
</tree>
</field>
</record>
<record id="view_vehicles_details_form" model="ir.ui.view">
<field name="name">vehicle.details.form</field>
<field name="model">vehicle.details</field>
<field name="arch" type="xml">
<form>
<sheet>
<h1>
<field name="name"/>
</h1>
<group>
<group>
<field name="vehicle_main_id"/>
<field name="vehicle_model"/>
</group>
<group>
<field name="vehicle_type"/>
</group>
</group>
<field name="note" placeholder="Vehicle Description"/>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
</odoo>

44
agriculture_management_odoo/views/vehicle_rental_views.xml

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_vehicle_rental_tree" model="ir.ui.view">
<field name="name">vehicle.rental.tree</field>
<field name="model">vehicle.rental</field>
<field name="arch" type="xml">
<tree>
<field name="vehicle_id"/>
<field name="no_of_days"/>
<field name="start_date"/>
<field name="end_date"/>
</tree>
</field>
</record>
<record id="view_vehicles_rental_form" model="ir.ui.view">
<field name="name">vehicle.rental.form</field>
<field name="model">vehicle.rental</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<group>
<field name="vehicle_id"/>
<field name="no_of_days"/>
</group>
<group>
<field name="start_date"/>
<field name="end_date"/>
</group>
</group>
<field name="note"
placeholder="Vehicle Description........."/>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
</odoo>

23
agriculture_management_odoo/wizard/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import crop_report_wiz
from . import pest_report_wiz

58
agriculture_management_odoo/wizard/crop_report_wiz.py

@ -0,0 +1,58 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models
class CropReport(models.TransientModel):
_name = 'crop.report.wizard'
_description = 'Crop Report Wizard'
date_from = fields.Date(string='From Date')
date_to = fields.Date(string='To Date')
def action_pdf_report(self):
ret = """select crop_requests.ref, res_partner.name,
seed_details.name, crop_requests.request_date, crop_requests.state,
location_details.location_name from crop_requests
inner join farmer_details ON
crop_requests.farmer_id = farmer_details.id
inner join res_partner ON
farmer_details.farmer_name = res_partner.id
inner join seed_details ON
crop_requests.seed_id = seed_details.id
inner join location_details ON
crop_requests.location_id = location_details.id"""
if self.date_from and self.date_to:
ret = ret + """ where crop_requests.request_date > '""" + str(
self.date_from) + """' AND crop_requests.request_date < '""" + str(
self.date_to) + """'"""
self.env.cr.execute(ret)
record = self.env.cr.fetchall()
data = {
'form': self.read()[0],
'date_to': self.date_to,
'date_from': self.date_from,
'record': record
}
return self.env.ref(
'agriculture_management_odoo.action_crop_request_report').report_action(
self, data=data)

25
agriculture_management_odoo/wizard/crop_report_wiz.xml

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="crop_report_view_form" model="ir.ui.view">
<field name="name">crop.report.wizard.form</field>
<field name="model">crop.report.wizard</field>
<field name="arch" type="xml">
<form string="Crop Report">
<group>
<group>
<field name="date_from"/>
</group>
<group>
<field name="date_to"/>
</group>
</group>
<footer>
<button name="action_pdf_report" string="Print PDF"
type="object" class="btn-primary"/>
<button string="Cancel" class="btn-secondary"
special="cancel"/>
</footer>
</form>
</field>
</record>
</odoo>

53
agriculture_management_odoo/wizard/pest_report_wiz.py

@ -0,0 +1,53 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models
class CropReport(models.TransientModel):
_name = 'pest.report.wizard'
_description = 'Pest Report Wizard'
date_from = fields.Date(string='From Date')
date_to = fields.Date(string='To Date')
def action_pdf_report(self):
ret = """select pest_request.reference, res_partner.name, crop_requests.ref,
pest_request.disease, pest_details.pest_name,pest_request.pest_quantity,
pest_request.pest_cost, pest_request.total_cost,pest_request.state from pest_request
inner join res_partner on pest_request.farmer_id = res_partner.id
inner join crop_requests on crop_requests.id = pest_request.crop_id
inner join pest_details on pest_details.id = pest_request.pest_id"""
if self.date_from and self.date_to:
ret = ret + """ where crop_requests.request_date > '""" + str(
self.date_from) + """' AND crop_requests.request_date < '""" + str(
self.date_to) + """'"""
self.env.cr.execute(ret)
record = self.env.cr.fetchall()
data = {
'form': self.read()[0],
'date_to': self.date_to,
'date_from': self.date_from,
'record': record
}
return self.env.ref(
'agriculture_management_odoo.action_crop_request_report').report_action(
self, data=data)

25
agriculture_management_odoo/wizard/pest_report_wiz.xml

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="pest_report_view_form" model="ir.ui.view">
<field name="name">pest.report.wizard.form</field>
<field name="model">pest.report.wizard</field>
<field name="arch" type="xml">
<form string="Pest Report">
<group>
<group>
<field name="date_from"/>
</group>
<group>
<field name="date_to"/>
</group>
</group>
<footer>
<button name="action_pdf_report" string="Print PDF"
type="object" class="btn-primary"/>
<button string="Cancel" class="btn-secondary"
special="cancel"/>
</footer>
</form>
</field>
</record>
</odoo>
Loading…
Cancel
Save