@ -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 <https://cybrosys.com/>`__ |
|||
|
|||
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 <https://cybrosys.com/>`__ |
|||
|
|||
Further information |
|||
=================== |
|||
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,25 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from . import controllers |
|||
from . import models |
|||
from . import reports |
|||
from . import wizards |
@ -0,0 +1,61 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
{ |
|||
'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, |
|||
} |
@ -0,0 +1,24 @@ |
|||
"""Pet shop management""" |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from . import pet_shop_management |
|||
from . import portal |
@ -0,0 +1,112 @@ |
|||
"""Pet shop management""" |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
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/<int: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/<int:pets_id>'], 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) |
@ -0,0 +1,94 @@ |
|||
"""Pet sittings""" |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
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/<int: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) |
@ -0,0 +1,14 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data noupdate="1"> |
|||
<!--This is used to create the sequence for pet shop--> |
|||
<record id="pet_shop_pet_seq" model="ir.sequence"> |
|||
<field name="name">Pet Sequence</field> |
|||
<field name="code">pet.sequence</field> |
|||
<field name="prefix">PS/PT/</field> |
|||
<field name="padding">3</field> |
|||
<field name="number_next">1</field> |
|||
<field name="number_increment">1</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,6 @@ |
|||
## Module <pet_shop_management> |
|||
|
|||
#### 14.12.2023 |
|||
#### Version 16.0.1.0.0 |
|||
##### ADD |
|||
- Initial commit for Pet Shop Management |
@ -0,0 +1,29 @@ |
|||
"""Pet shop management""" |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
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 |
@ -0,0 +1,32 @@ |
|||
"""Veterinarian""" |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
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') |
@ -0,0 +1,31 @@ |
|||
"""Pet type""" |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
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") |
@ -0,0 +1,42 @@ |
|||
"""Pets""" |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
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)]") |
@ -0,0 +1,144 @@ |
|||
"""Pets""" |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
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 |
@ -0,0 +1,64 @@ |
|||
"""Pet sittings""" |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
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') |
@ -0,0 +1,50 @@ |
|||
"""Pet sitting schedule""" |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
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') |
@ -0,0 +1,57 @@ |
|||
"""Working shifts""" |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
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') |
@ -0,0 +1,23 @@ |
|||
"""Report pet Information""" |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-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 report_pet_shop_management_report_pet_information |
@ -0,0 +1,205 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<template id="report_pet_information"> |
|||
<t t-call="web.html_container"> |
|||
<t t-call="web.external_layout"> |
|||
<div class="page"> |
|||
<div class="oe_structure"/> |
|||
<div class="text-center"> |
|||
<h2> |
|||
<t t-esc="docs.name"/> |
|||
<t t-esc="docs.pet_seq"/> |
|||
</h2> |
|||
</div> |
|||
<div class="text-right"> |
|||
<span t-field="docs.image_1920" |
|||
t-options='{"widget": "image"}'/> |
|||
</div> |
|||
<table class="table table-sm"> |
|||
<tr> |
|||
<td>Birth Date</td> |
|||
<td>:</td> |
|||
<td> |
|||
<t t-if="docs.dob"> |
|||
<t t-esc="docs.dob"/> |
|||
</t> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>Age</td> |
|||
<td>:</td> |
|||
<td> |
|||
<t t-if="docs.age"> |
|||
<t t-esc="docs.age"/> |
|||
</t> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>Customer</td> |
|||
<td>:</td> |
|||
<td> |
|||
<t t-if="docs.customer_id"> |
|||
<t t-esc="docs.customer_id.name"/> |
|||
</t> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>Sex</td> |
|||
<td>:</td> |
|||
<td> |
|||
<t t-if="docs.sex"> |
|||
<t t-esc="docs.sex"/> |
|||
</t> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>Pet Type</td> |
|||
<td>:</td> |
|||
<td> |
|||
<t t-if="docs.pet_type_id"> |
|||
<t t-esc="docs.pet_type_id.name"/> |
|||
</t> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>Stay</td> |
|||
<td>:</td> |
|||
<td> |
|||
<t t-if="docs.stay"> |
|||
<t t-esc="docs.stay"/> |
|||
</t> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<div class="text-center"> |
|||
<h2> |
|||
Medical History |
|||
</h2> |
|||
</div> |
|||
<table class="table table-sm"> |
|||
<tr> |
|||
<td>Has your pet ever had any allergic reaction to a |
|||
medicine? |
|||
</td> |
|||
<td>:</td> |
|||
<td> |
|||
<t t-if="docs.is_allergy"> |
|||
<t t-esc="docs.is_allergy"/> |
|||
</t> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>Has your pet ever had a reaction to a vaccine? |
|||
</td> |
|||
<td>:</td> |
|||
<td> |
|||
<t t-if="docs.is_reaction"> |
|||
<t t-esc="docs.is_reaction"/> |
|||
</t> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>Has Your pet had any previous medical or |
|||
surgical problems? |
|||
</td> |
|||
<td>:</td> |
|||
<td> |
|||
<t t-if="docs.previous_reactions"> |
|||
<t t-esc="docs.previous_reactions"/> |
|||
</t> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>Contact if your pet has any hesitation</td> |
|||
<td>:</td> |
|||
<td> |
|||
<t t-if="docs.is_contact"> |
|||
<t t-esc="docs.contact"/> |
|||
</t> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<div class="text-center"> |
|||
<h2> |
|||
Pet Vaccines |
|||
</h2> |
|||
</div> |
|||
<table class="table table-sm"> |
|||
<thead> |
|||
<tr> |
|||
Description |
|||
</tr> |
|||
<tr> |
|||
Date |
|||
</tr> |
|||
<tr> |
|||
Expiration Date |
|||
</tr> |
|||
<tr> |
|||
Veterinarian |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr foreach="docs.pet_vaccines_ids" t-as="pet"> |
|||
<td> |
|||
<t t-if="pet.vaccine_name"> |
|||
<t t-esc="pet.vaccine_name"/> |
|||
</t> |
|||
</td> |
|||
<td> |
|||
<t t-if="pet.date"> |
|||
<t t-esc="pet.date"/> |
|||
</t> |
|||
</td> |
|||
<td> |
|||
<t t-if="pet.date_exp"> |
|||
<t t-esc="pet.date_exp"/> |
|||
</t> |
|||
</td> |
|||
<td> |
|||
<t t-if="pet.veterinarian_id"> |
|||
<t t-esc="pet.veterinarian_id"/> |
|||
</t> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
<div class="text-center"> |
|||
<h2> |
|||
Other Information |
|||
</h2> |
|||
</div> |
|||
<table class="table table-sm"> |
|||
<tr> |
|||
<td>Veterinarian</td> |
|||
<td>:</td> |
|||
<td> |
|||
<t t-if="docs.veterinarian_id"> |
|||
<t t-esc="docs.veterinarian_id.name"/> |
|||
</t> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>Where did your pet come from?</td> |
|||
<td>:</td> |
|||
<td> |
|||
<t t-if="docs.pet_place"> |
|||
<t t-esc="docs.pet_place"/> |
|||
</t> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>What do you feed your pet?</td> |
|||
<td>:</td> |
|||
<td> |
|||
<t t-if="docs.pet_food"> |
|||
<t t-esc="docs.pet_food"/> |
|||
</t> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
</odoo> |
@ -0,0 +1,17 @@ |
|||
<?xml version="1.0"?> |
|||
<odoo> |
|||
<!-- Action for report--> |
|||
<record id="action_pet_report" model="ir.actions.report"> |
|||
<field name="name">Pet Information Report Main Action</field> |
|||
<field name="model">product.product</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">pet_shop_management.report_pet_information |
|||
</field> |
|||
<field name="report_file">pet_shop_management.report_pet_information |
|||
</field> |
|||
<field name="print_report_name">'Pet Information - %s' % (object.name) |
|||
</field> |
|||
<field name="binding_model_id" ref="model_product_product"/> |
|||
<field name="binding_type">report</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,38 @@ |
|||
"""Pets""" |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
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, |
|||
} |
@ -0,0 +1,11 @@ |
|||
<?xml version="1.0"?> |
|||
<odoo> |
|||
<!-- Access rights For company of employee model--> |
|||
<record id="hr_employee_rule_company" model="ir.rule"> |
|||
<field name="name">PetShop: multi-company</field> |
|||
<field name="model_id" ref="model_hr_employee"/> |
|||
<field name="domain_force"> |
|||
['|',('company_id','=',False),('company_id', 'in', company_ids)] |
|||
</field> |
|||
</record> |
|||
</odoo> |
|
@ -0,0 +1,24 @@ |
|||
<?xml version="1.0"?> |
|||
<odoo> |
|||
<!--This is used for User security--> |
|||
<record model="ir.module.category" id="module_pet_shop_management"> |
|||
<field name="name">Pet User</field> |
|||
<field name="description">User Can Manage Pet Information</field> |
|||
</record> |
|||
<record id="pet_shop_management_group_pet_user" model="res.groups"> |
|||
<field name="name">Pet User</field> |
|||
<field name="category_id" ref="module_pet_shop_management"/> |
|||
</record> |
|||
<record id="pet_shop_management_group_pet_manager" model="res.groups"> |
|||
<field name="name">Pet Manager</field> |
|||
<field name="category_id" ref="module_pet_shop_management"/> |
|||
<field name="implied_ids" |
|||
eval="[(4, ref('pet_shop_management_group_pet_user'))]"/> |
|||
</record> |
|||
<record id="pet_shop_management_group_pet_sale_manager" model="res.groups"> |
|||
<field name="name">Pet Sales Manager</field> |
|||
<field name="category_id" ref="module_pet_shop_management"/> |
|||
<field name="implied_ids" |
|||
eval="[(4, ref('pet_shop_management_group_pet_manager'))]"/> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,11 @@ |
|||
<?xml version="1.0"?> |
|||
<odoo> |
|||
<!-- Access rights For company of pet model--> |
|||
<record id="product_rule_company" model="ir.rule"> |
|||
<field name="name">PetShop: multi-company</field> |
|||
<field name="model_id" ref="model_product_product"/> |
|||
<field name="domain_force"> |
|||
['|',('company_id','=',False),('company_id', 'in', company_ids)] |
|||
</field> |
|||
</record> |
|||
</odoo> |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 589 B |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 967 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 79 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 669 KiB |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 674 KiB |
After Width: | Height: | Size: 68 KiB |
After Width: | Height: | Size: 145 KiB |
After Width: | Height: | Size: 122 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 116 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 126 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 119 KiB |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 126 KiB |
After Width: | Height: | Size: 93 KiB |
After Width: | Height: | Size: 117 KiB |
After Width: | Height: | Size: 120 KiB |
After Width: | Height: | Size: 103 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 168 KiB |
After Width: | Height: | Size: 618 KiB |
After Width: | Height: | Size: 79 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.4 KiB |