diff --git a/pet_shop_management/README.rst b/pet_shop_management/README.rst new file mode 100644 index 000000000..74fb4149f --- /dev/null +++ b/pet_shop_management/README.rst @@ -0,0 +1,49 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Pet Shop Management +==================== +Pet shop management module is used to mange the pets , their selling + sitting and their sitting can be scheduled with the sitting employees, + and can be see the pets sitting schedule and pet information through + the website also. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: (V16) Gayathri V, Contact: odoo@cybrosys.com + +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. + +License +------- +General Public License, Version 3 (LGPL v3). +(http://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/pet_shop_management/__init__.py b/pet_shop_management/__init__.py new file mode 100644 index 000000000..71d1fe5c0 --- /dev/null +++ b/pet_shop_management/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies() +# Author: Gayathri v (odoo@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 . +# +############################################################################# +from . import controllers +from . import models +from . import reports +from . import wizards diff --git a/pet_shop_management/__manifest__.py b/pet_shop_management/__manifest__.py new file mode 100644 index 000000000..661303fd3 --- /dev/null +++ b/pet_shop_management/__manifest__.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies() +# Author: Gayathri v (odoo@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 . +# +############################################################################# +{ + 'name': 'Pet Shop Management', + 'version': '16.0.1.0.0', + 'category': 'Sales', + 'summary': 'Pet shop management module is used mange the pet selling and sitting', + 'description': """Pet shop management module is used to mange the pets , + their selling sitting and their sitting can be scheduled with the sitting + employees, and can be see the pets sitting schedule and pet information through + the website also.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['sale_management', 'hr', 'stock', 'website'], + 'data': [ + 'data/ir_sequence_data.xml', + 'security/ir.model.access.csv', + 'security/pet_shop_management_groups.xml', + 'security/hr_employee_security.xml', + 'security/product_security.xml', + 'views/sitting_schedule_views.xml', + 'views/pet_type_views.xml', + 'views/product_views.xml', + 'views/working_shifts.xml', + 'views/pets_portal_templates.xml', + 'views/sittings_portal_templates.xml', + 'views/sale_order_views.xml', + 'views/hr_employee_views.xml', + 'views/res_partner_views.xml', + 'views/pet_shop_management_menu.xml', + 'reports/pet_information_template.xml', + 'reports/report.xml', + 'wizards/pet_setting_schedule_views.xml', + ], + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/pet_shop_management/controllers/__init__.py b/pet_shop_management/controllers/__init__.py new file mode 100644 index 000000000..fd651bd27 --- /dev/null +++ b/pet_shop_management/controllers/__init__.py @@ -0,0 +1,24 @@ +"""Pet shop management""" +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Gayathri v (odoo@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 . +# +############################################################################# +from . import pet_shop_management +from . import portal diff --git a/pet_shop_management/controllers/pet_shop_management.py b/pet_shop_management/controllers/pet_shop_management.py new file mode 100644 index 000000000..2ebfeb73f --- /dev/null +++ b/pet_shop_management/controllers/pet_shop_management.py @@ -0,0 +1,112 @@ +"""Pet shop management""" +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Gayathri v (odoo@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 . +# +############################################################################# +from odoo import http, _ +from odoo.exceptions import AccessError, MissingError +from odoo.http import request +from odoo.addons.portal.controllers.portal import CustomerPortal +from odoo.addons.portal.controllers.portal import pager as portal_pager, \ + get_records_pager + + +class PortalPets(CustomerPortal): + """Getting portal values""" + + def _prepare_home_portal_values(self, counters): + values = super()._prepare_home_portal_values(counters) + if 'pets_count' in counters: + pets_count = request.env['product.product'].sudo().search_count( + self._get_pets_domain()) \ + if request.env['product.product'].check_access_rights('read', + raise_exception=False) else 0 + values['pets_count'] = pets_count + return values + + def _pets_get_page_view_values(self, pets, access_token, **kwargs): + """Page view values""" + values = { + 'page_name': 'Pets Information', + 'pets': pets, + } + return self._get_page_view_values(pets, access_token, values, + 'my_pets_history', False, **kwargs) + + def _get_pets_domain(self): + """Retrieving records based on the domain""" + return [('is_pet', '=', True), + ('responsible_id', '=', request.env.user.id)] + + @http.route(['/my/pets', '/my/pets/page/'], type='http', + auth="user", website=True) + def portal_my_pets(self, page=1, date_begin=None, date_end=None, + sortby=None): + """This is used to view the pets""" + values = self._prepare_portal_layout_values() + pet = request.env['product.product'] + domain = self._get_pets_domain() + searchbar_sortings = { + 'date': {'label': _('Date'), 'pets': 'number desc'}, + } + if not sortby: + sortby = 'date' + pets_count = pet.search_count(domain) + pager = portal_pager( + url="/my/pets", + url_args={'date_begin': date_begin, 'date_end': date_end, + 'sortby': sortby}, + total=pets_count, + page=page, + step=self._items_per_page + ) + pets = pet.search(domain, limit=self._items_per_page, + offset=pager['offset']) + request.session['my_pets_history'] = pets.ids[:100] + values.update({ + 'date': date_begin, + 'pets': pets, + 'page_name': 'pets', + 'pager': pager, + 'default_url': '/my/pets', + 'searchbar_sortings': searchbar_sortings, + 'sortby': sortby, + }) + return request.render("pet_shop_management.portal_my_pets", values) + + @http.route(['/my/pets/'], type='http', auth="public", + website=True) + def portal_my_pets_detail(self, pets_id, access_token=None, + report_type=None, download=False, **kw): + """Detail information of the pets""" + try: + pets_sudo = self._document_check_access('product.product', pets_id, + access_token) + except (AccessError, MissingError): + return request.redirect('/my') + if report_type in ('html', 'pdf', 'text'): + return self._show_report(model=pets_sudo, + report_type=report_type, + report_ref='pet_shop_management' + '.view_product_product_form', + download=download) + values = self._pets_get_page_view_values(pets_sudo, access_token, + **kw) + return request.render("pet_shop_management.portal_pets_page", values) diff --git a/pet_shop_management/controllers/portal.py b/pet_shop_management/controllers/portal.py new file mode 100644 index 000000000..5eb2c1852 --- /dev/null +++ b/pet_shop_management/controllers/portal.py @@ -0,0 +1,94 @@ +"""Pet sittings""" +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Gayathri v (odoo@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 . +# +############################################################################# +from datetime import date +from odoo import http, _ +from odoo.http import request +from odoo.addons.portal.controllers.portal import CustomerPortal +from odoo.addons.portal.controllers.portal import pager as portal_pager, \ + get_records_pager + + +class PortalSittingsSchedules(CustomerPortal): + """This class is used to gets the sitting portal values""" + + def _prepare_home_portal_values(self, counters): + """Preparing portal values for sittings""" + values = super()._prepare_home_portal_values(counters) + if 'sittings_count' in counters: + sittings_count = request.env[ + 'sitting.schedule'].sudo().search_count( + self._get_sittings_domain()) \ + if request.env['sitting.schedule'].check_access_rights('read', + raise_exception=False) else 0 + values['sittings_count'] = sittings_count + return values + + def _sittings_get_page_view_values(self, sittings, access_token, **kwargs): + """This is used to view the sittings page""" + values = { + 'page_name': 'sittings', + 'sittings': sittings, + } + return self._get_page_view_values(sittings, access_token, values, + 'my_sittings_history', False, + **kwargs) + + def _get_sittings_domain(self): + """Function for domain condition""" + return [('end_date', '<=', date.today())] + + @http.route(['/my/sittings', '/my/sittings/page/'], type='http', + auth="user", website=True) + def portal_my_sittings(self, page=1, date_begin=None, date_end=None, + sortby=None): + """This is used to shown the sittings values""" + values = self._prepare_portal_layout_values() + sitting = request.env['sitting.schedule'] + domain = self._get_sittings_domain() + searchbar_sortings = { + 'date': {'label': _('Date'), 'sittings': 'number desc'}, + } + if not sortby: + sortby = 'date' + sittings_count = sitting.search_count(domain) + pager = portal_pager( + url="/my/sitting", + url_args={'date_begin': date_begin, 'date_end': date_end, + 'sortby': sortby}, + total=sittings_count, + page=page, + step=self._items_per_page + ) + sittings = sitting.search(domain, limit=self._items_per_page, + offset=pager['offset']) + request.session['my_sittings_history'] = sittings.ids[:100] + values.update({ + 'date': date_begin, + 'sittings': sittings, + 'page_name': 'sittings', + 'pager': pager, + 'default_url': '/my/sittings', + 'searchbar_sortings': searchbar_sortings, + 'sortby': sortby, + }) + return request.render("pet_shop_management.portal_my_sittings", values) diff --git a/pet_shop_management/data/ir_sequence_data.xml b/pet_shop_management/data/ir_sequence_data.xml new file mode 100644 index 000000000..449c59265 --- /dev/null +++ b/pet_shop_management/data/ir_sequence_data.xml @@ -0,0 +1,14 @@ + + + + + + Pet Sequence + pet.sequence + PS/PT/ + 3 + 1 + 1 + + + diff --git a/pet_shop_management/doc/RELEASE_NOTES.md b/pet_shop_management/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..ab046364c --- /dev/null +++ b/pet_shop_management/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 14.12.2023 +#### Version 16.0.1.0.0 +##### ADD +- Initial commit for Pet Shop Management diff --git a/pet_shop_management/models/__init__.py b/pet_shop_management/models/__init__.py new file mode 100644 index 000000000..edef643c7 --- /dev/null +++ b/pet_shop_management/models/__init__.py @@ -0,0 +1,29 @@ +"""Pet shop management""" +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Gayathri v (odoo@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 . +# +############################################################################# +from . import hr_employee +from . import pet_type +from . import pet_vaccines +from . import product +from . import sale_order +from . import sitting_schedule +from . import working_time diff --git a/pet_shop_management/models/hr_employee.py b/pet_shop_management/models/hr_employee.py new file mode 100644 index 000000000..8d93ecdbb --- /dev/null +++ b/pet_shop_management/models/hr_employee.py @@ -0,0 +1,32 @@ +"""Veterinarian""" +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies() +# Author: Gayathri v (odoo@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 . +# +############################################################################# +from odoo import fields, models + + +class HrEmployee(models.Model): + """Inheriting employee to identifies the walker /veterinarian""" + _inherit = 'hr.employee' + is_veterinarian = fields.Boolean(string='Is Veterinarian', + help='Identifies it is a veterinarian') + is_walker_sitters = fields.Boolean(string='Walker', + help='Identifies it is a walker') diff --git a/pet_shop_management/models/pet_type.py b/pet_shop_management/models/pet_type.py new file mode 100644 index 000000000..f8399190a --- /dev/null +++ b/pet_shop_management/models/pet_type.py @@ -0,0 +1,31 @@ +"""Pet type""" +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Gayathri v (odoo@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 . +# +############################################################################# +from odoo import fields, models + + +class PetType(models.Model): + """This is used to identifies the type of pet""" + _name = 'pet.type' + _description = "Pet Type" + + name = fields.Char(string='Name', help="Pet type") diff --git a/pet_shop_management/models/pet_vaccines.py b/pet_shop_management/models/pet_vaccines.py new file mode 100644 index 000000000..0a48c888e --- /dev/null +++ b/pet_shop_management/models/pet_vaccines.py @@ -0,0 +1,42 @@ +"""Pets""" +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Gayathri v (odoo@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 . +# +############################################################################# +from odoo import fields, models + + +class PetVaccines(models.Model): + """This is used to identify the vaccines""" + _name = 'pet.vaccines' + _rec_name = 'vaccine_name' + _description = "Pet Vaccines" + + pet_vaccine_id = fields.Many2one('product.product', + string='Vaccine', + help='Vaccine product id') + vaccine_name = fields.Char(string='Vaccine Name', + help='Name of the vaccine') + date = fields.Date(string='Date', help='Date') + date_exp = fields.Date(string='Date Expired', help='Date expired') + veterinarian_id = fields.Many2one('hr.employee', + string='Veterinarian', + help='Veterinarian of the pet', + domain="[('is_veterinarian', '=', True)]") diff --git a/pet_shop_management/models/product.py b/pet_shop_management/models/product.py new file mode 100644 index 000000000..9e3a4f076 --- /dev/null +++ b/pet_shop_management/models/product.py @@ -0,0 +1,144 @@ +"""Pets""" +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Gayathri v (odoo@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 . +# +############################################################################# +from datetime import timedelta, date +from odoo import api, fields, models, _ +from odoo.exceptions import UserError + + +class Product(models.Model): + """Inheriting pets as product""" + _inherit = 'product.product' + + is_pet = fields.Boolean(string='Is Pet', + help='This is used to identify the pet') + image_1920 = fields.Image(string="Image", help='This is the image of pet', + compute='_compute_image_1920', + inverse='_set_image_1920') + age = fields.Float(compute='_compute_age', string='Age', + help='Age of the pet') + sex = fields.Selection([ + ('male', 'Male'), + ('female', 'Female'), + ('other', 'Other') + ], string='Sex', help='Sex of the pet') + dob = fields.Date(string='Date Of Birth', help='Date of birth of pet') + pet_type_id = fields.Many2one('pet.type', string='Pet Type', + help='Type of the pet') + color = fields.Char(string='Color', help='Color of the pet') + stay = fields.Char(string='Stay', help='Stay of the pet') + pet_seq = fields.Char(string='Pet No.', required=True, + copy=False, + readonly=True, + index=True, + default=lambda self: 'New') + photo_one = fields.Binary(string='Image', help='Additional photo of pet') + photo_two = fields.Binary(string='Image', help='Additional photo of pet') + photo_three = fields.Binary(string='Image', help='Additional photo of pet') + notes = fields.Text(string='Note', help="Additional notes") + veterinarian_id = fields.Many2one('hr.employee', + domain="[('is_veterinarian', '=', True)]", + string='Veterinarian', + help='Veterinarian of the pet') + is_contact = fields.Boolean(string='Contact if your pet has any hesitation', + help='To know the pets hesitation') + is_allergy = fields.Boolean( + string='Has your pet ever had any allergic reaction to a medicine?', + help='To know pets allergic reaction') + is_reaction = fields.Boolean( + string='Has your pet ever had a reaction to a vaccine?', + help='To know the reaction to the vaccine.') + previous_reactions = fields.Text( + string='Has Your pet had any previous medical or surgical problems?', + help='To know the pets surgical problems') + pet_place = fields.Char(string='Where did your pet come from', + default='Pet Store', + help='Where did your pet come from') + pet_food = fields.Char(string='what do you feed your pet', + help='What do you feed your pet') + is_pet_service = fields.Boolean(string='Is pet Service', + help="pet as service") + pet_vaccines_ids = fields.One2many('pet.vaccines', + 'pet_vaccine_id', + string='Pet Vaccines', + help='Pet vaccines') + vaccine = fields.Binary(string='Image', help='To upload the vaccine info') + customer_id = fields.Many2one('res.partner', string='Customer', + help='Customer of thr pet', + domain="[('type', '!=', 'private')]") + responsible_id = fields.Many2one('res.users', string='Scheduler User', + default=lambda self: self.env.user, + required=True, + help='Responsible for the pet') + partner_id = fields.Many2one('res.partner', string='Partner', + required=True) + is_sale_order = fields.Boolean(string='Sale Order', default=False) + month = fields.Integer(string='Month', help='If the pet is below one year', + compute="_compute_age") + + @api.depends('dob') + def _compute_age(self): + """Computes pets age according to their dob""" + for rec in self: + if rec.dob: + rec.age = (date.today() - rec.dob) // timedelta(days=365.2425) + rec.month = (date.today() - rec.dob) // timedelta(days=30) + else: + rec.age = False + rec.month = False + + def create_sale_order(self): + """Creating sale order if there is exist""" + onhand = self.env['stock.quant'].search([ + ('product_id', '=', self.id)]) + if len(onhand) != 0: + sale = self.env['sale.order'].create({ + 'partner_id': self.partner_id.id, + }) + sale.order_line = [(5, 0, 0)] + vals = { + 'order_id': sale.id, + 'product_id': self.id, + 'product_template_id': self.product_tmpl_id.id, + 'name': self.product_tmpl_id.name, + } + sale.order_line = [(0, 0, vals)] + else: + raise UserError( + _("There is no pets to sell(Available quantity is Zero)")) + return { + 'type': 'ir.actions.act_window', + 'target': 'current', + 'name': _('Create Sale'), + 'res_id': sale.id, + 'view_mode': 'form', + 'res_model': 'sale.order', + } + + @api.model + def create(self, vals): + """To create the sequence""" + if vals.get('pet_seq', 'New') == 'New': + vals['pet_seq'] = self.env['ir.sequence'].next_by_code( + 'pet.sequence') or 'New' + result = super().create(vals) + return result diff --git a/pet_shop_management/models/sale_order.py b/pet_shop_management/models/sale_order.py new file mode 100644 index 000000000..06d708a63 --- /dev/null +++ b/pet_shop_management/models/sale_order.py @@ -0,0 +1,64 @@ +"""Pet sittings""" +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Gayathri v (odoo@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 . +# +############################################################################# +from odoo import fields, models, _ + + +class SaleOrder(models.Model): + """Pet sittings""" + _inherit = 'sale.order' + + pet_sittings = fields.Boolean(default=False, string="Pet Sittings", + help="Identifying is pet sitting.") + + def pet_sitting(self): + """Sitting Schedule wizards""" + self.pet_sittings = True + return { + 'type': 'ir.actions.act_window', + 'target': 'new', + 'name': _('Pet Sitting Schedule'), + 'view_mode': 'form', + 'res_model': 'pet.sitting.schedule', + 'context': {'default_model_id': self.id, + 'default_schedule_description': self.name} + } + + def action_return_meetings(self): + """Return the meetings view""" + return { + 'type': 'ir.actions.act_window', + 'target': 'current', + 'name': _('Meetings'), + 'view_mode': 'calendar', + 'res_model': 'sitting.schedule' + } + + +class SaleOrderLine(models.Model): + """Inheriting sale order line to add a new field""" + _inherit = 'sale.order.line' + + walker_sitting = fields.Many2one('hr.employee', + domain="[('is_walker_sitters', '=', True)]", + string='Walker/Sitting', + help='Pets walker') diff --git a/pet_shop_management/models/sitting_schedule.py b/pet_shop_management/models/sitting_schedule.py new file mode 100644 index 000000000..939671f40 --- /dev/null +++ b/pet_shop_management/models/sitting_schedule.py @@ -0,0 +1,50 @@ +"""Pet sitting schedule""" +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Gayathri v (odoo@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 . +# +############################################################################# +from odoo import fields, models + + +class SittingSchedule(models.Model): + """Sitting Schedule wizards""" + _name = 'sitting.schedule' + _description = 'Sitting Schedule' + + name = fields.Char(string='Name', help="Name") + number_id = fields.Many2one('sale.order', string='Number', + help='Sale order reference') + date_start = fields.Date(string='Start Date', + help='Start date of sitting schedule') + end_date = fields.Date(string='End Date', + help='End date of sitting schedule') + attendees_ids = fields.Many2many('hr.employee', + domain="[('is_walker_sitters', '=', True)]", + string='Attendees', + help="The attendees of the sitting " + "schedule") + duration = fields.Datetime(sting='Duration', + help='Duration of the schedule') + pet_info_ids = fields.One2many('pet.info', + 'info_pet_id', string='Pet info', + help='Information regarding the pets') + service_ids = fields.One2many('pet.service', + 'service_pet_id', + string='Service', help='Service information') diff --git a/pet_shop_management/models/working_time.py b/pet_shop_management/models/working_time.py new file mode 100644 index 000000000..fd1ebe885 --- /dev/null +++ b/pet_shop_management/models/working_time.py @@ -0,0 +1,57 @@ +"""Working shifts""" +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Gayathri v (odoo@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 . +# +############################################################################# +from odoo import fields, models + + +class WorkTime(models.Model): + """This is used assign the working time for employee""" + _name = 'working.time' + _description = "working time" + + working_time = fields.Float(string='Working Time', + help='Working time of employee') + company_id = fields.Many2one('res.company', string='Company', + help='Company') + name = fields.Char(string='Name', help='Name of shift') + avg_working_hours = fields.Char(string='Average Working Hours', + help='Average working hours') + working_hours = fields.One2many('working.hours', + 'working_id', + string='Working hours', + help='working hours') + + +class WorkingHours(models.Model): + """Assigns the working hours""" + _name = 'working.hours' + _description = "working hours" + + name = fields.Many2one('hr.employee', + domain="[('is_walker_sitters', '=', True)]", + string='Name', help='Name of the employee') + working_id = fields.Many2one('working.time', string='Working time', + help='Working time of the employee') + day = fields.Char(string='Day of Week', help='Day of the week') + start_date = fields.Date(string='Start Date', + help='Start date of the shift') + end_date = fields.Date(string='End Date', help='Start date of the shift') diff --git a/pet_shop_management/reports/__init__.py b/pet_shop_management/reports/__init__.py new file mode 100644 index 000000000..df4b7e1c1 --- /dev/null +++ b/pet_shop_management/reports/__init__.py @@ -0,0 +1,23 @@ +"""Report pet Information""" +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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 . +# +############################################################################# +from . import report_pet_shop_management_report_pet_information diff --git a/pet_shop_management/reports/pet_information_template.xml b/pet_shop_management/reports/pet_information_template.xml new file mode 100644 index 000000000..c14a952f3 --- /dev/null +++ b/pet_shop_management/reports/pet_information_template.xml @@ -0,0 +1,205 @@ + + + + diff --git a/pet_shop_management/reports/report.xml b/pet_shop_management/reports/report.xml new file mode 100644 index 000000000..c34ff7a0d --- /dev/null +++ b/pet_shop_management/reports/report.xml @@ -0,0 +1,17 @@ + + + + + Pet Information Report Main Action + product.product + qweb-pdf + pet_shop_management.report_pet_information + + pet_shop_management.report_pet_information + + 'Pet Information - %s' % (object.name) + + + report + + \ No newline at end of file diff --git a/pet_shop_management/reports/report_pet_shop_management_report_pet_information.py b/pet_shop_management/reports/report_pet_shop_management_report_pet_information.py new file mode 100644 index 000000000..00adfeb89 --- /dev/null +++ b/pet_shop_management/reports/report_pet_shop_management_report_pet_information.py @@ -0,0 +1,38 @@ +"""Pets""" +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Gayathri v (odoo@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 . +# +############################################################################# +from odoo import models + + +class PetInformationReports(models.AbstractModel): + """This Class is used for the report""" + _name = 'report.pet_shop_management.report_pet_information' + + def _get_report_values(self, docids, data=None): + """Returns the document data to report""" + docs = self.env['product.product'].browse(docids) + return { + 'doc_ids': docids, + 'doc_model': 'product.product', + 'docs': docs, + 'data': data, + } diff --git a/pet_shop_management/security/hr_employee_security.xml b/pet_shop_management/security/hr_employee_security.xml new file mode 100644 index 000000000..bc1f71d31 --- /dev/null +++ b/pet_shop_management/security/hr_employee_security.xml @@ -0,0 +1,11 @@ + + + + + PetShop: multi-company + + + ['|',('company_id','=',False),('company_id', 'in', company_ids)] + + + diff --git a/pet_shop_management/security/ir.model.access.csv b/pet_shop_management/security/ir.model.access.csv new file mode 100644 index 000000000..4564967f0 --- /dev/null +++ b/pet_shop_management/security/ir.model.access.csv @@ -0,0 +1,10 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_pet_type_user,access.pet.type.user,model_pet_type,base.group_user,1,1,1,1 +access_working_time_user,access.working.time.user,model_working_time,base.group_user,1,1,1,1 +access_working_hours_user,access.working.hours.user,model_working_hours,base.group_user,1,1,1,1 +access_pet_vaccines_user,access.pet.vaccines.user,model_pet_vaccines,base.group_user,1,1,1,1 +access_pet_sitting_schedule_user,access.pet.sitting.schedule.user,model_pet_sitting_schedule,base.group_user,1,1,1,1 +access_pet_info_user,access.pet.info.user,model_pet_info,base.group_user,1,1,1,1 +access_attendees_pet_user,access.attendees.pet.user,model_attendees_pet,base.group_user,1,1,1,1 +access_pet_service_user,access.pet.service.user,model_pet_service,base.group_user,1,1,1,1 +access_sitting_schedule_user,access.sitting.schedule.user,model_sitting_schedule,base.group_user,1,1,1,1 diff --git a/pet_shop_management/security/pet_shop_management_groups.xml b/pet_shop_management/security/pet_shop_management_groups.xml new file mode 100644 index 000000000..f90051cd3 --- /dev/null +++ b/pet_shop_management/security/pet_shop_management_groups.xml @@ -0,0 +1,24 @@ + + + + + Pet User + User Can Manage Pet Information + + + Pet User + + + + Pet Manager + + + + + Pet Sales Manager + + + + diff --git a/pet_shop_management/security/product_security.xml b/pet_shop_management/security/product_security.xml new file mode 100644 index 000000000..7aa002a6c --- /dev/null +++ b/pet_shop_management/security/product_security.xml @@ -0,0 +1,11 @@ + + + + + PetShop: multi-company + + + ['|',('company_id','=',False),('company_id', 'in', company_ids)] + + + diff --git a/pet_shop_management/static/description/assets/icons/check.png b/pet_shop_management/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/pet_shop_management/static/description/assets/icons/check.png differ diff --git a/pet_shop_management/static/description/assets/icons/chevron.png b/pet_shop_management/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/pet_shop_management/static/description/assets/icons/chevron.png differ diff --git a/pet_shop_management/static/description/assets/icons/cogs.png b/pet_shop_management/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/pet_shop_management/static/description/assets/icons/cogs.png differ diff --git a/pet_shop_management/static/description/assets/icons/consultation.png b/pet_shop_management/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/pet_shop_management/static/description/assets/icons/consultation.png differ diff --git a/pet_shop_management/static/description/assets/icons/ecom-black.png b/pet_shop_management/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/pet_shop_management/static/description/assets/icons/ecom-black.png differ diff --git a/pet_shop_management/static/description/assets/icons/education-black.png b/pet_shop_management/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/pet_shop_management/static/description/assets/icons/education-black.png differ diff --git a/pet_shop_management/static/description/assets/icons/hotel-black.png b/pet_shop_management/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/pet_shop_management/static/description/assets/icons/hotel-black.png differ diff --git a/pet_shop_management/static/description/assets/icons/license.png b/pet_shop_management/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/pet_shop_management/static/description/assets/icons/license.png differ diff --git a/pet_shop_management/static/description/assets/icons/lifebuoy.png b/pet_shop_management/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/pet_shop_management/static/description/assets/icons/lifebuoy.png differ diff --git a/pet_shop_management/static/description/assets/icons/logo.png b/pet_shop_management/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/pet_shop_management/static/description/assets/icons/logo.png differ diff --git a/pet_shop_management/static/description/assets/icons/manufacturing-black.png b/pet_shop_management/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/pet_shop_management/static/description/assets/icons/manufacturing-black.png differ diff --git a/pet_shop_management/static/description/assets/icons/pos-black.png b/pet_shop_management/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/pet_shop_management/static/description/assets/icons/pos-black.png differ diff --git a/pet_shop_management/static/description/assets/icons/puzzle.png b/pet_shop_management/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/pet_shop_management/static/description/assets/icons/puzzle.png differ diff --git a/pet_shop_management/static/description/assets/icons/restaurant-black.png b/pet_shop_management/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/pet_shop_management/static/description/assets/icons/restaurant-black.png differ diff --git a/pet_shop_management/static/description/assets/icons/service-black.png b/pet_shop_management/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/pet_shop_management/static/description/assets/icons/service-black.png differ diff --git a/pet_shop_management/static/description/assets/icons/trading-black.png b/pet_shop_management/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/pet_shop_management/static/description/assets/icons/trading-black.png differ diff --git a/pet_shop_management/static/description/assets/icons/training.png b/pet_shop_management/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/pet_shop_management/static/description/assets/icons/training.png differ diff --git a/pet_shop_management/static/description/assets/icons/update.png b/pet_shop_management/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/pet_shop_management/static/description/assets/icons/update.png differ diff --git a/pet_shop_management/static/description/assets/icons/user.png b/pet_shop_management/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/pet_shop_management/static/description/assets/icons/user.png differ diff --git a/pet_shop_management/static/description/assets/icons/wrench.png b/pet_shop_management/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/pet_shop_management/static/description/assets/icons/wrench.png differ diff --git a/pet_shop_management/static/description/assets/misc/categories.png b/pet_shop_management/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/pet_shop_management/static/description/assets/misc/categories.png differ diff --git a/pet_shop_management/static/description/assets/misc/check-box.png b/pet_shop_management/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/pet_shop_management/static/description/assets/misc/check-box.png differ diff --git a/pet_shop_management/static/description/assets/misc/compass.png b/pet_shop_management/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/pet_shop_management/static/description/assets/misc/compass.png differ diff --git a/pet_shop_management/static/description/assets/misc/corporate.png b/pet_shop_management/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/pet_shop_management/static/description/assets/misc/corporate.png differ diff --git a/pet_shop_management/static/description/assets/misc/customer-support.png b/pet_shop_management/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/pet_shop_management/static/description/assets/misc/customer-support.png differ diff --git a/pet_shop_management/static/description/assets/misc/cybrosys-logo.png b/pet_shop_management/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/pet_shop_management/static/description/assets/misc/cybrosys-logo.png differ diff --git a/pet_shop_management/static/description/assets/misc/features.png b/pet_shop_management/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/pet_shop_management/static/description/assets/misc/features.png differ diff --git a/pet_shop_management/static/description/assets/misc/logo.png b/pet_shop_management/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/pet_shop_management/static/description/assets/misc/logo.png differ diff --git a/pet_shop_management/static/description/assets/misc/pictures.png b/pet_shop_management/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/pet_shop_management/static/description/assets/misc/pictures.png differ diff --git a/pet_shop_management/static/description/assets/misc/pie-chart.png b/pet_shop_management/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/pet_shop_management/static/description/assets/misc/pie-chart.png differ diff --git a/pet_shop_management/static/description/assets/misc/right-arrow.png b/pet_shop_management/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/pet_shop_management/static/description/assets/misc/right-arrow.png differ diff --git a/pet_shop_management/static/description/assets/misc/star.png b/pet_shop_management/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/pet_shop_management/static/description/assets/misc/star.png differ diff --git a/pet_shop_management/static/description/assets/misc/support.png b/pet_shop_management/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/pet_shop_management/static/description/assets/misc/support.png differ diff --git a/pet_shop_management/static/description/assets/misc/whatsapp.png b/pet_shop_management/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/pet_shop_management/static/description/assets/misc/whatsapp.png differ diff --git a/pet_shop_management/static/description/assets/modules/1.png b/pet_shop_management/static/description/assets/modules/1.png new file mode 100644 index 000000000..25ed3e0b6 Binary files /dev/null and b/pet_shop_management/static/description/assets/modules/1.png differ diff --git a/pet_shop_management/static/description/assets/modules/2.png b/pet_shop_management/static/description/assets/modules/2.png new file mode 100644 index 000000000..8658f1826 Binary files /dev/null and b/pet_shop_management/static/description/assets/modules/2.png differ diff --git a/pet_shop_management/static/description/assets/modules/3.png b/pet_shop_management/static/description/assets/modules/3.png new file mode 100644 index 000000000..e339ff769 Binary files /dev/null and b/pet_shop_management/static/description/assets/modules/3.png differ diff --git a/pet_shop_management/static/description/assets/modules/4.png b/pet_shop_management/static/description/assets/modules/4.png new file mode 100644 index 000000000..4a9e2bd5d Binary files /dev/null and b/pet_shop_management/static/description/assets/modules/4.png differ diff --git a/pet_shop_management/static/description/assets/modules/5.png b/pet_shop_management/static/description/assets/modules/5.png new file mode 100644 index 000000000..f14dc60c5 Binary files /dev/null and b/pet_shop_management/static/description/assets/modules/5.png differ diff --git a/pet_shop_management/static/description/assets/modules/6.png b/pet_shop_management/static/description/assets/modules/6.png new file mode 100644 index 000000000..3add135c3 Binary files /dev/null and b/pet_shop_management/static/description/assets/modules/6.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/1.png b/pet_shop_management/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..4af91b23e Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/1.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/10.png b/pet_shop_management/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..03233f401 Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/10.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/11.png b/pet_shop_management/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..cf1f1ad24 Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/11.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/12.png b/pet_shop_management/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..174a03fe4 Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/12.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/13.png b/pet_shop_management/static/description/assets/screenshots/13.png new file mode 100644 index 000000000..21e522138 Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/13.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/14.png b/pet_shop_management/static/description/assets/screenshots/14.png new file mode 100644 index 000000000..09cdb84de Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/14.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/15.png b/pet_shop_management/static/description/assets/screenshots/15.png new file mode 100644 index 000000000..449012b80 Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/15.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/16.png b/pet_shop_management/static/description/assets/screenshots/16.png new file mode 100644 index 000000000..9d6544dac Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/16.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/17.png b/pet_shop_management/static/description/assets/screenshots/17.png new file mode 100644 index 000000000..5e7e00bfe Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/17.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/18.png b/pet_shop_management/static/description/assets/screenshots/18.png new file mode 100644 index 000000000..eed6ef940 Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/18.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/19.png b/pet_shop_management/static/description/assets/screenshots/19.png new file mode 100644 index 000000000..3f0f5729f Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/19.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/2.png b/pet_shop_management/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..8e16def00 Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/2.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/20.png b/pet_shop_management/static/description/assets/screenshots/20.png new file mode 100644 index 000000000..011ae43b7 Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/20.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/21.png b/pet_shop_management/static/description/assets/screenshots/21.png new file mode 100644 index 000000000..1b45f2262 Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/21.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/22.png b/pet_shop_management/static/description/assets/screenshots/22.png new file mode 100644 index 000000000..6f6a81cd7 Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/22.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/23.png b/pet_shop_management/static/description/assets/screenshots/23.png new file mode 100644 index 000000000..e856b4057 Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/23.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/24.png b/pet_shop_management/static/description/assets/screenshots/24.png new file mode 100644 index 000000000..4a90a3aeb Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/24.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/25.png b/pet_shop_management/static/description/assets/screenshots/25.png new file mode 100644 index 000000000..5bad52bd9 Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/25.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/3.png b/pet_shop_management/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..9e8275a70 Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/3.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/4.png b/pet_shop_management/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..fd03d1cbc Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/4.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/5.png b/pet_shop_management/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..ae4b0a4fb Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/5.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/6.png b/pet_shop_management/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..d6602c911 Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/6.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/7.png b/pet_shop_management/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..8a63f80ea Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/7.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/8.png b/pet_shop_management/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..79d56829c Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/8.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/9.png b/pet_shop_management/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..30b8649cc Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/9.png differ diff --git a/pet_shop_management/static/description/assets/screenshots/hero.gif b/pet_shop_management/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..602df71a9 Binary files /dev/null and b/pet_shop_management/static/description/assets/screenshots/hero.gif differ diff --git a/pet_shop_management/static/description/banner.png b/pet_shop_management/static/description/banner.png new file mode 100644 index 000000000..56193f54c Binary files /dev/null and b/pet_shop_management/static/description/banner.png differ diff --git a/pet_shop_management/static/description/icon.png b/pet_shop_management/static/description/icon.png new file mode 100644 index 000000000..3d54f22eb Binary files /dev/null and b/pet_shop_management/static/description/icon.png differ diff --git a/pet_shop_management/static/description/images/arrows-transparent.png b/pet_shop_management/static/description/images/arrows-transparent.png new file mode 100644 index 000000000..f2973bb02 Binary files /dev/null and b/pet_shop_management/static/description/images/arrows-transparent.png differ diff --git a/pet_shop_management/static/description/images/cybro_logo.png b/pet_shop_management/static/description/images/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/pet_shop_management/static/description/images/cybro_logo.png differ diff --git a/pet_shop_management/static/description/images/icons/ecom.png b/pet_shop_management/static/description/images/icons/ecom.png new file mode 100644 index 000000000..6e720d50e Binary files /dev/null and b/pet_shop_management/static/description/images/icons/ecom.png differ diff --git a/pet_shop_management/static/description/images/icons/education.png b/pet_shop_management/static/description/images/icons/education.png new file mode 100644 index 000000000..f0de98eb0 Binary files /dev/null and b/pet_shop_management/static/description/images/icons/education.png differ diff --git a/pet_shop_management/static/description/images/icons/hotel.png b/pet_shop_management/static/description/images/icons/hotel.png new file mode 100644 index 000000000..917c6a63e Binary files /dev/null and b/pet_shop_management/static/description/images/icons/hotel.png differ diff --git a/pet_shop_management/static/description/images/icons/manufacturing.png b/pet_shop_management/static/description/images/icons/manufacturing.png new file mode 100644 index 000000000..68c3722f8 Binary files /dev/null and b/pet_shop_management/static/description/images/icons/manufacturing.png differ diff --git a/pet_shop_management/static/description/images/icons/pos.png b/pet_shop_management/static/description/images/icons/pos.png new file mode 100644 index 000000000..600bfe4f9 Binary files /dev/null and b/pet_shop_management/static/description/images/icons/pos.png differ diff --git a/pet_shop_management/static/description/images/icons/restaurant.png b/pet_shop_management/static/description/images/icons/restaurant.png new file mode 100644 index 000000000..680acf29e Binary files /dev/null and b/pet_shop_management/static/description/images/icons/restaurant.png differ diff --git a/pet_shop_management/static/description/images/icons/service.png b/pet_shop_management/static/description/images/icons/service.png new file mode 100644 index 000000000..bfbe7a6d2 Binary files /dev/null and b/pet_shop_management/static/description/images/icons/service.png differ diff --git a/pet_shop_management/static/description/images/icons/trading.png b/pet_shop_management/static/description/images/icons/trading.png new file mode 100644 index 000000000..a741219b5 Binary files /dev/null and b/pet_shop_management/static/description/images/icons/trading.png differ diff --git a/pet_shop_management/static/description/index.html b/pet_shop_management/static/description/index.html new file mode 100644 index 000000000..fa8b41da8 --- /dev/null +++ b/pet_shop_management/static/description/index.html @@ -0,0 +1,733 @@ +
+ +
+ +
+
+ Community +
+
+
+ + +
+
+
+

+ Pet Shop Management

+

+ This Module Helps To Manage A Pet Shop Management.

+ + +
+
+
+
+ +
+
+ +
+

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ Pet shop management module is used to manage the pets , their selling + sitting and their sitting can be scheduled with the sitting employees, + and can be seen the pets sitting schedule and pet information through + the website also. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + + Manage pets . +
+
+ + Manage pets sittings/walking. +
+
+ + Manage pets selling in a shop. +
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+ +
+

+ Pets Information(User Can create).

+ +
+
+

+ Form view to Show Detail of Pet(Pet User can modify).

+ + +
+ +
+

+ Form view to Show Detail of Pet - Vaccine History (Pet User can + add) and also Other info.

+ +
+ +
+

+ Pet Sittings and Schedules (Only see after the + scheduling).

+ +
+ +
+

+ Your Customer List (Pet Manager can see , create and + modify).

+ +
+ +
+

+ Veterinarians of Pet (Pet Manager can see, create and + modify).

+ +
+ +
+

+ Checked "Is Veterinarian?" and "Is Walker?" For assign as + Veterinarian Or assign walker (Pet Manager can create and + modify).

+ + +
+ +
+

+ For assign as the pet service it is required to checked "Is Pet + Service" (Sales Manager can create and modify it).

+ + +
+ +
+

+ Working Times (Only Pets Manger can Create and modify it).

+ + +
+ +
+

+ Pet Types (Pet Manager can create and modify it).

+ +
+ +
+

+ Create Booking Quotation For Pet Service (Sales Sale Manager can create and modify it).

+ +
+
+

+ Create Pet Sitting Schedule Wizard on Sales Order (Sales Manager can create and modify it).

+ +
+
+

+ Created Pet Sitting Schedule (Sales Manager can create and modify it).

+ +
+
+

+ Open Pets Information By Clicking on " Pets" (Responsible person can see it).

+ +
+
+

+ Lists Of pets.

+ +
+
+

+ Show Detail Information about Pet.

+ +
+
+

+ Pet Sittings and Schedules .

+ +
+
+

+ List of Pet Sittings and Schedules.

+ +
+
+

+ Pet Information Report .

+ +
+
+
+ + + +
+
+ +
+

+ Related + Products +

+
+
+
+ +
+
+ + + + +
+
+ +
+

+ Our Services +

+
+ +
+
+
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+ +
+ + + + + +
+
+ +
+

+ Our + Industries +

+
+ +
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+
+
+ + + + +
+
+ +
+

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/pet_shop_management/views/hr_employee_views.xml b/pet_shop_management/views/hr_employee_views.xml new file mode 100644 index 000000000..3836a54b9 --- /dev/null +++ b/pet_shop_management/views/hr_employee_views.xml @@ -0,0 +1,54 @@ + + + + + Veterinarian Main Action + hr.employee + kanban,tree,form,activity + [('is_veterinarian', '=', True)] + +

+ Add a new employee +

+

+ With just a quick glance on the Odoo employee screen, you + can easily find all the information you need for each person; + contact data, job position, availability, etc. +

+
+
+ + + Walker/Sitters Main Action + hr.employee + kanban,tree,form,activity + [('is_walker_sitters', '=', True)] + +

+ Add a new employee +

+

+ With just a quick glance on the Odoo employee screen, you + can easily find all the information you need for each person; + contact data, job position, availability, etc. +

+
+
+ + + hr.employee.view.form.inherit.pet.shop.management + + hr.employee + + + + + + + + + + +
diff --git a/pet_shop_management/views/pet_shop_management_menu.xml b/pet_shop_management/views/pet_shop_management_menu.xml new file mode 100644 index 000000000..1166c27ec --- /dev/null +++ b/pet_shop_management/views/pet_shop_management_menu.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pet_shop_management/views/pet_type_views.xml b/pet_shop_management/views/pet_type_views.xml new file mode 100644 index 000000000..b51bbcfb5 --- /dev/null +++ b/pet_shop_management/views/pet_type_views.xml @@ -0,0 +1,23 @@ + + + + + Pet Type Main Action + pet.type + tree,form + +

+ Generate Pet Type +

+
+
+ + Pet Type + pet.type + + + + + + +
diff --git a/pet_shop_management/views/pets_portal_templates.xml b/pet_shop_management/views/pets_portal_templates.xml new file mode 100644 index 000000000..080c9b11f --- /dev/null +++ b/pet_shop_management/views/pets_portal_templates.xml @@ -0,0 +1,235 @@ + + + + + + + + + + diff --git a/pet_shop_management/views/product_views.xml b/pet_shop_management/views/product_views.xml new file mode 100644 index 000000000..500685320 --- /dev/null +++ b/pet_shop_management/views/product_views.xml @@ -0,0 +1,165 @@ + + + + + Pets Main Action + ir.actions.act_window + product.product + [('is_pet_service', '=', True)] + kanban,tree,form + +

+ Create a Pets +

+
+
+ + + pets.form + product.product + + +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+
+
+
+ + pets.tree + product.product + + + + + + + + + + + + Pets + ir.actions.act_window + product.product + [('is_pet', '=', True)] + kanban,tree,form + + +

+ Create a Pets +

+
+
+ + + + product.product.view.form.inherit.pet.shop.management + + product.product + + + + + + + + + + + +
diff --git a/pet_shop_management/views/res_partner_views.xml b/pet_shop_management/views/res_partner_views.xml new file mode 100644 index 000000000..ae811b952 --- /dev/null +++ b/pet_shop_management/views/res_partner_views.xml @@ -0,0 +1,23 @@ + + + + + Pet Shop Customer + ir.actions.act_window + res.partner + kanban,tree,form,activity + + {'create': True,'res_partner_search_mode': + 'customer', 'default_is_company': True} + + +

+ Create a contact in your address book +

+

+ Odoo helps you to easily track all activities related to a + customer. +

+
+
+
diff --git a/pet_shop_management/views/sale_order_views.xml b/pet_shop_management/views/sale_order_views.xml new file mode 100644 index 000000000..ed230e823 --- /dev/null +++ b/pet_shop_management/views/sale_order_views.xml @@ -0,0 +1,29 @@ + + + + + sale.order.view.form.inherit.pet.shop.management + + sale.order + + + + + + + + + + + diff --git a/pet_shop_management/views/sitting_schedule_views.xml b/pet_shop_management/views/sitting_schedule_views.xml new file mode 100644 index 000000000..5a456f6c9 --- /dev/null +++ b/pet_shop_management/views/sitting_schedule_views.xml @@ -0,0 +1,91 @@ + + + + + Pet Sitting Schedule + sitting.schedule + tree,form,calendar + +

+ Generate Sitting Schedule +

+
+
+ + Pet Sitting Schedule + sitting.schedule + + + + + + + + + + Pet Sitting Schedule + sitting.schedule + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + Sitting Schedule Calender + sitting.schedule + + + + + + + + + +
diff --git a/pet_shop_management/views/sittings_portal_templates.xml b/pet_shop_management/views/sittings_portal_templates.xml new file mode 100644 index 000000000..dc20a9d48 --- /dev/null +++ b/pet_shop_management/views/sittings_portal_templates.xml @@ -0,0 +1,77 @@ + + + + + + + diff --git a/pet_shop_management/views/working_shifts.xml b/pet_shop_management/views/working_shifts.xml new file mode 100644 index 000000000..f613ab0f2 --- /dev/null +++ b/pet_shop_management/views/working_shifts.xml @@ -0,0 +1,52 @@ + + + + + Working Shifts + working.time + tree,form + +

+ Generate Working times +

+
+
+ + Working Time + working.time + + + + + + + + + Working Time + working.time + +
+ + + + + + + + + + + + + + + + + + + + +
+
+
+
diff --git a/pet_shop_management/wizards/__init__.py b/pet_shop_management/wizards/__init__.py new file mode 100644 index 000000000..09377d65e --- /dev/null +++ b/pet_shop_management/wizards/__init__.py @@ -0,0 +1,23 @@ +"""Pet sitting scheduling""" +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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 . +# +############################################################################# +from . import pet_setting_schedule diff --git a/pet_shop_management/wizards/pet_setting_schedule.py b/pet_shop_management/wizards/pet_setting_schedule.py new file mode 100644 index 000000000..532df44f8 --- /dev/null +++ b/pet_shop_management/wizards/pet_setting_schedule.py @@ -0,0 +1,121 @@ +""""Pet Shop Management""" +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Gayathri v (odoo@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 . +# +############################################################################# +from odoo import fields, models + + +class PetSittingSchedule(models.TransientModel): + """Scheduling pet sittings""" + _name = 'pet.sitting.schedule' + _description = 'sitting_schedule' + + walker_sitting_id = fields.Many2one('hr.employee', + domain="[('is_walker_sitters', '=', True)]", + required=True, string="Walker", + help='Walker/sitter of pets') + schedule_description = fields.Char(string='Schedule Description', + help='Description for schedule') + attendees_ids = fields.One2many('attendees.pet', + 'attendee_id', string='Attendees', + help='Attendees for the pet sitting schedules') + date_start = fields.Datetime(string='Start Date', required=True, + help='Starting date of scheduling') + end_date = fields.Datetime(string='End Date', required=True, + help='Ending date of scheduling') + reference_id = fields.Many2one('sale.order', string='Reference', + help='Reference of the pet') + pet_info_ids = fields.One2many('pet.info', 'info_id', + string='Pet Information', + help='Information of the pet') + service_ids = fields.One2many('pet.service', 'pet_service_id', + string='Service', help='Service pet') + + def assign_sittings(self): + """Assigning pet sittings through wizards""" + self.env['sitting.schedule'].create({ + 'name': 'Meeting', + 'number_id': self.reference_id.id, + 'date_start': self.date_start, + 'end_date': self.end_date, + 'attendees_ids_ids': [(4, self.walker_sitting_id.id)], + + }) + + +class AttendeesPet(models.TransientModel): + """Attendees of pet sittings""" + _name = 'attendees.pet' + + attendee_id = fields.Many2one('pet.sitting.schedule', + string='Related field', + help='Related field of class PetSittingSchedule') + attendees_id = fields.Many2one('res.partner', required=True, + string='Attendees', help='Attendees') + phone = fields.Char(related='attendees_id.phone', string='Phone', + help='Phone number of attendees') + email = fields.Char(related='attendees_id.email', string='Email', + help='Email of attendees') + + +class PetInfo(models.TransientModel): + """Information of pets""" + _name = 'pet.info' + + info_pet_id = fields.Many2one('sitting.schedule', string='Sitting Schedule', + help='Sitting schedule') + num = fields.Many2one('product.product', domain="[('is_pet', '=', True)]", + string='Pet', help='Pet name') + pet_num = fields.Char(related='num.pet_seq', string='Reference', + help='Pet reference') + name = fields.Char(related='num.name', string='Name', help='Pet Name') + info_id = fields.Many2one('pet.sitting.schedule', string='Pet Sitting', + help='Scheduled pet sittings') + age = fields.Float(related='num.age', String='Age', help='Pet age') + sex = fields.Selection([ + ('male', 'Male'), + ('female', 'Female'), + ('other', 'Other') + ], string='Sex', help='Sex of the pet', related='num.sex') + pet_type_id = fields.Many2one('pet.type', related='num.pet_type_id', + string='Pet Type', help='Type of the pet') + color = fields.Char(related='num.color', string='color', help='Pets color') + stay = fields.Char(related='num.stay', string='Stay', help='Pet stay') + customer = fields.Many2one('res.partner', string='Customer', + help='Customer of pets') + + +class PetService(models.TransientModel): + """Pets as services""" + _name = 'pet.service' + _description = "Pet service" + + pet_service_id = fields.Many2one('pet.sitting.schedule', + string='Pet Schedule', help='Pet schedule') + service_pet_id = fields.Many2one('sitting.schedule', string='Service pet', + help='Pet as service') + name = fields.Many2one('product.product', + domain="[('is_pet_service', '=', True)]", + string='Name', help='Pet name') + cost = fields.Float(related='name.list_price', string='cost', + help='Cost of the service') + sale_price = fields.Float(related='name.standard_price', string='Price', + help='Price of service') diff --git a/pet_shop_management/wizards/pet_setting_schedule_views.xml b/pet_shop_management/wizards/pet_setting_schedule_views.xml new file mode 100644 index 000000000..7cbbbceae --- /dev/null +++ b/pet_shop_management/wizards/pet_setting_schedule_views.xml @@ -0,0 +1,70 @@ + + + + + Pet Sitting Main Action + ir.actions.act_window + pet.sitting.schedule + form + new + + + pet.sitting.schedule.view.form + pet.sitting.schedule + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+