@ -0,0 +1,48 @@ |
|||||
|
.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg |
||||
|
:target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html |
||||
|
:alt: License: LGPL-3 |
||||
|
|
||||
|
Theme Autofly |
||||
|
============= |
||||
|
* Theme Autofly module provide attractive and unique front end theme mainly suitable for eCommerce website. |
||||
|
|
||||
|
Installation |
||||
|
============ |
||||
|
- www.odoo.com/documentation/16.0/setup/install.html |
||||
|
- Install our Theme |
||||
|
|
||||
|
License |
||||
|
------- |
||||
|
General Public License, Version 3 (LGPL v3). |
||||
|
(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) |
||||
|
|
||||
|
Company |
||||
|
------- |
||||
|
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
||||
|
|
||||
|
|
||||
|
Credits |
||||
|
------- |
||||
|
* Developer: (V17) Fouzan M, 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. |
||||
|
|
||||
|
For support and more information, please visit https://www.cybrosys.com. |
||||
|
|
||||
|
Further information |
||||
|
=================== |
||||
|
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,23 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-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 controllers |
||||
|
from . import models |
@ -0,0 +1,88 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
{ |
||||
|
'name': 'Theme Autofly', |
||||
|
'version': '17.0.1.0.0', |
||||
|
'category': 'Theme/Corporate', |
||||
|
'summary': 'Design eCommerce Website with Theme AutoFly', |
||||
|
'description': 'Theme Autofly module provide attractive and unique ' |
||||
|
'front end theme mainly suitable for eCommerce website', |
||||
|
'author': 'Cybrosys Techno Solutions', |
||||
|
'company': 'Cybrosys Techno Solutions', |
||||
|
'maintainer': 'Cybrosys Techno Solutions', |
||||
|
'website': "https://www.cybrosys.com", |
||||
|
'depends': ['website', 'website_blog', 'website_sale_wishlist'], |
||||
|
'data': [ |
||||
|
'security/ir.model.access.csv', |
||||
|
'data/theme_autofly_sequence.xml', |
||||
|
'views/car_type_views.xml', |
||||
|
'views/car_brand_views.xml', |
||||
|
'views/car_garage_views.xml', |
||||
|
'views/blog_page_templates.xml', |
||||
|
'views/portfolio_templates.xml', |
||||
|
'views/about_us_templates.xml', |
||||
|
'views/footer_templates.xml', |
||||
|
'views/header_templates.xml', |
||||
|
'views/contact_us_templates.xml', |
||||
|
'views/team_templates.xml', |
||||
|
'views/service_templates.xml', |
||||
|
'views/snippets/snippet_templates.xml', |
||||
|
'views/snippets/popular_model_templates.xml', |
||||
|
'views/snippets/blog_templates.xml', |
||||
|
'views/snippets/find_car_templates.xml', |
||||
|
'views/snippets/partners_templates.xml', |
||||
|
'views/snippets/testimonial_templates.xml', |
||||
|
'views/snippets/choose_us_templates.xml', |
||||
|
'views/snippets/banner_templates.xml', |
||||
|
'views/snippets/search_templates.xml', |
||||
|
'views/service_booking_views.xml', |
||||
|
'views/product_template_views.xml', |
||||
|
'views/testimonial_views.xml', |
||||
|
], |
||||
|
'assets': { |
||||
|
'web.assets_frontend': [ |
||||
|
'/theme_autofly/static/src/xml/blog_snippet_templates.xml', |
||||
|
'/theme_autofly/static/src/xml/testimonial_snippet_templates.xml', |
||||
|
'/theme_autofly/static/src/js/service_products.js', |
||||
|
'/theme_autofly/static/src/js/car_garage.js', |
||||
|
'theme_autofly/static/src/css/style.css', |
||||
|
'/theme_autofly/static/src/js/owl.carousel.js', |
||||
|
'/theme_autofly/static/src/js/owl.carousel.min.js', |
||||
|
'theme_autofly/static/src/css/owl.theme.default.min.css', |
||||
|
'/theme_autofly/static/src/js/owl.carousel.js', |
||||
|
'/theme_autofly/static/src/js/product_tab.js', |
||||
|
'/theme_autofly/static/src/js/find_car.js', |
||||
|
'/theme_autofly/static/src/js/search.js', |
||||
|
'/theme_autofly/static/src/js/blog.js', |
||||
|
'/theme_autofly/static/src/js/testimonial.js', |
||||
|
'/theme_autofly/static/src/js/all_type.js', |
||||
|
], |
||||
|
}, |
||||
|
'images': [ |
||||
|
'static/description/banner.jpg', |
||||
|
'static/description/theme_screenshot.jpg', |
||||
|
], |
||||
|
'license': 'LGPL-3', |
||||
|
'installable': True, |
||||
|
'application': False, |
||||
|
'auto_install': False, |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-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 website_autofly |
@ -0,0 +1,165 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import http |
||||
|
from odoo.http import request |
||||
|
|
||||
|
|
||||
|
class WebsiteAutoFly(http.Controller): |
||||
|
"""Controller used to fetch product related data and also for about page, |
||||
|
portfolio page, team page, service page.""" |
||||
|
|
||||
|
@http.route('/about', website=True, type='http', auth='public', |
||||
|
csrf=False) |
||||
|
def about_page(self): |
||||
|
"""Render the about page.""" |
||||
|
return request.render('theme_autofly.about_page') |
||||
|
|
||||
|
@http.route('/portfolio', website=True, type='http', auth='public', |
||||
|
csrf=False) |
||||
|
def portfolio_page(self): |
||||
|
"""Render the portfolio page.""" |
||||
|
return request.render('theme_autofly.portfolio_page') |
||||
|
|
||||
|
@http.route('/team', website=True, type='http', auth='public', |
||||
|
csrf=False) |
||||
|
def team_page(self): |
||||
|
"""Render the team page.""" |
||||
|
return request.render('theme_autofly.team_page') |
||||
|
|
||||
|
@http.route('/service', website=True, type='http', auth='public', |
||||
|
csrf=False) |
||||
|
def service_page(self): |
||||
|
"""Render the service page.""" |
||||
|
return request.render('theme_autofly.service_page') |
||||
|
|
||||
|
@http.route('/blog_snippet', auth="public", type='json') |
||||
|
def latest_blog(self): |
||||
|
"""Return the data for dynamic blog snippet.""" |
||||
|
return request.env['blog.post'].sudo().search_read( |
||||
|
[], ['name', 'blog_id', 'subtitle', 'published_date'], |
||||
|
order='id desc', limit=3) |
||||
|
|
||||
|
@http.route('/get_testimonial', auth="public", type='json') |
||||
|
def get_testimonial(self): |
||||
|
"""Return the data for testimonial snippet.""" |
||||
|
testimonial = request.env['autofly.testimonial'].sudo().search( |
||||
|
[], order='id desc', limit=12) |
||||
|
values = { |
||||
|
f'slide{i + 1}': [{'id': record.id, |
||||
|
'name': record.display_name, |
||||
|
'partner_id': record.partner_id.id, |
||||
|
'rating': record.rating, |
||||
|
'review': record.review, |
||||
|
} for record in testimonial[i * 3:(i + 1) * 3]] |
||||
|
for i in range((len(testimonial) + 2) // 3) |
||||
|
} |
||||
|
return values |
||||
|
|
||||
|
@http.route('/autofly/service', type='http', website=True, auth='public', |
||||
|
csrf=False) |
||||
|
def service_booking(self, **kwargs): |
||||
|
"""Render the service page.""" |
||||
|
request.env['service.booking'].sudo().create({ |
||||
|
'name': kwargs.get('usr1'), |
||||
|
'email': kwargs.get('email'), |
||||
|
'description': kwargs.get('text') |
||||
|
}) |
||||
|
return request.render('theme_autofly.service_page') |
||||
|
|
||||
|
@http.route('/cars-search', website=True, type='http', auth='public', |
||||
|
csrf=False) |
||||
|
def car_search(self, **kwargs): |
||||
|
"""Used for searching particular cars.""" |
||||
|
domain = [] |
||||
|
if kwargs.get('car-selection'): |
||||
|
domain.append( |
||||
|
('car_brand_id', '=', int(kwargs.get('car-selection')))) |
||||
|
if kwargs.get('car-type-selection'): |
||||
|
domain.append(('car_type_id', '=', int(kwargs.get( |
||||
|
'car-type-selection')))) |
||||
|
if kwargs.get('car-price'): |
||||
|
domain.append(('list_price', '=', float(kwargs.get('car-price')))) |
||||
|
if kwargs.get('car-model'): |
||||
|
domain.append( |
||||
|
('car_model', '=', int(float(kwargs.get('car-model'))))) |
||||
|
if kwargs.get('car-location'): |
||||
|
domain.append(('location', 'ilike', kwargs.get('car-location'))) |
||||
|
result = request.env['product.template'].sudo().search(domain) |
||||
|
return request.render('theme_autofly.specific_car', |
||||
|
qcontext={'hot_deals': result}) |
||||
|
|
||||
|
@http.route('/get_product_tab', auth="public", type='json') |
||||
|
def get_product_tab(self): |
||||
|
"""Controller used to Fetch popular products.""" |
||||
|
hot_deals = request.env['product.template'].sudo().search([ |
||||
|
('website_published', '=', True), |
||||
|
('popular_product', '=', True)]) |
||||
|
response = http.Response(template='theme_autofly.popular_modal', |
||||
|
qcontext={'hot_deals': hot_deals}) |
||||
|
return response.render() |
||||
|
|
||||
|
@http.route('/find_car', auth="public", type='json') |
||||
|
def get_find_car(self): |
||||
|
"""Controller used to fetch car types.""" |
||||
|
hot_deals = request.env['car.types'].sudo().search([], |
||||
|
order='id desc', |
||||
|
limit=6) |
||||
|
response = http.Response(template='theme_autofly.autofly_find_car', |
||||
|
qcontext={'hot_deals': hot_deals}) |
||||
|
return response.render() |
||||
|
|
||||
|
@http.route('/get_searched_car', auth="public", type='json') |
||||
|
def get_search_car(self): |
||||
|
"""Controller used to fetch car brands.""" |
||||
|
brands = request.env['car.brand'].sudo().search([]) |
||||
|
types = request.env['car.types'].sudo().search([]) |
||||
|
brand = [{'id': record.id, 'name': record.name} for record in brands] |
||||
|
car_type = [{'id': record.id, 'name': record.name} for record in types] |
||||
|
return {'type': car_type, 'brand': brand} |
||||
|
|
||||
|
@http.route('/get_service_product', auth="public", type='json') |
||||
|
def get_service_product(self): |
||||
|
"""Controller used to fetch service products.""" |
||||
|
hot_deals = request.env['product.template'].sudo().search([ |
||||
|
('website_published', '=', True), |
||||
|
('detailed_type', '=', 'service')]) |
||||
|
response = http.Response(template='theme_autofly.service_products', |
||||
|
qcontext={'hot_deals': hot_deals}) |
||||
|
return response.render() |
||||
|
|
||||
|
@http.route('/get_garage_car', auth="public", type='json') |
||||
|
def get_garage_car(self): |
||||
|
"""Controller used to fetch garages.""" |
||||
|
hot_deals = request.env['car.garage'].sudo().search([]) |
||||
|
car_types = request.env['car.types'].sudo().search([]) |
||||
|
values = {'hot_deals': hot_deals, 'car_types': car_types} |
||||
|
response = http.Response(template='theme_autofly.portfolio_garage_page', |
||||
|
qcontext=values) |
||||
|
return response.render() |
||||
|
|
||||
|
@http.route('/get_all_type', auth="public", type='json') |
||||
|
def get_all_type(self): |
||||
|
"""Controller used to fetch car types.""" |
||||
|
hot_deals = request.env['car.types'].sudo().search([]) |
||||
|
response = http.Response(template='theme_autofly.portfolio_type_page', |
||||
|
qcontext={'hot_deals': hot_deals}) |
||||
|
return response.render() |
@ -0,0 +1,13 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<data noupdate="1"> |
||||
|
<!-- Sequences for booking --> |
||||
|
<record id="seq_booking" model="ir.sequence"> |
||||
|
<field name="name">Service Booking</field> |
||||
|
<field name="code">reference.sequence</field> |
||||
|
<field name="prefix">SB</field> |
||||
|
<field name="padding">3</field> |
||||
|
<field name="company_id" eval="False"/> |
||||
|
</record> |
||||
|
</data> |
||||
|
</odoo> |
@ -0,0 +1,6 @@ |
|||||
|
## Module <theme_autofly> |
||||
|
|
||||
|
#### 20.06.2024 |
||||
|
#### Version 17.0.1.0.0 |
||||
|
#### ADD |
||||
|
- Initial Commit for Theme Autofly |
@ -0,0 +1,27 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-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 car_brand |
||||
|
from . import car_garage |
||||
|
from . import car_types |
||||
|
from . import product_template |
||||
|
from . import service_booking |
||||
|
from . import testimonial |
@ -0,0 +1,31 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class CarBrand(models.Model): |
||||
|
"""This model is used define Brand Model fields and functionalities.""" |
||||
|
_name = "car.brand" |
||||
|
_description = "Website Car Brand" |
||||
|
|
||||
|
name = fields.Char(help="Add your brand name.") |
||||
|
image = fields.Image(help="Add your brand image.") |
@ -0,0 +1,31 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class CarGarage(models.Model): |
||||
|
"""This model is used define car garage details.""" |
||||
|
_name = "car.garage" |
||||
|
_description = "Website Car Garage" |
||||
|
|
||||
|
name = fields.Char(help="Add your garage name.") |
||||
|
image = fields.Image(help="Add your garage image.") |
@ -0,0 +1,51 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class CarTypes(models.Model): |
||||
|
"""This model is used define car type fields and it's functionalities.""" |
||||
|
_name = "car.types" |
||||
|
_description = "Website Car Type" |
||||
|
|
||||
|
name = fields.Char(help="Add your car type name.") |
||||
|
image = fields.Image(help="Add your car type image.") |
||||
|
product_count = fields.Integer(string='Products Count', |
||||
|
compute='_compute_product_count', |
||||
|
help="Used to show product in smart button.") |
||||
|
|
||||
|
def _compute_product_count(self): |
||||
|
"""Product count fetching based on car type.""" |
||||
|
for record in self: |
||||
|
record.product_count = self.env['product.template'].search_count( |
||||
|
[('car_type_id', '=', record.id)]) |
||||
|
|
||||
|
def action_view_products(self): |
||||
|
"""Action to view corresponding products""" |
||||
|
return { |
||||
|
'type': 'ir.actions.act_window', |
||||
|
'name': 'Products', |
||||
|
'view_mode': 'tree', |
||||
|
'res_model': 'product.template', |
||||
|
'domain': [('car_type_id', '=', self.id)], |
||||
|
'context': "{'create': False}" |
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class ProductTemplate(models.Model): |
||||
|
"""Inheriting product_product model to add new fields.""" |
||||
|
_inherit = "product.template" |
||||
|
|
||||
|
popular_product = fields.Boolean(string="Popular Product", |
||||
|
help="Please enable this field to make the" |
||||
|
"product as popular product.") |
||||
|
car_type_id = fields.Many2one('car.types', string="Car Type", |
||||
|
help="Add your car type.") |
||||
|
car_brand_id = fields.Many2one('car.brand', string="Car Brand", |
||||
|
help="Add your car brand.") |
||||
|
car_model = fields.Integer(string="Model", help="Add your car model.") |
||||
|
location = fields.Char(help="Add your car location.") |
@ -0,0 +1,44 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import _, api, fields, models |
||||
|
|
||||
|
|
||||
|
class ServiceBooking(models.Model): |
||||
|
"""This model is used managing service booking details.""" |
||||
|
_name = "service.booking" |
||||
|
_description = "Website Car Service Booking" |
||||
|
|
||||
|
name = fields.Char(required=True, help="Name of the service") |
||||
|
reference = fields.Char(readonly=True, help="Booking sequence") |
||||
|
state = fields.Selection([('draft', 'Draft'), ('running', 'Running'), |
||||
|
('cancel', 'Cancel'), ('done', 'Done')]) |
||||
|
email = fields.Char(help="Email address") |
||||
|
description = fields.Char(help="Add if you have any description") |
||||
|
|
||||
|
@api.model_create_multi |
||||
|
def create(self, vals_list): |
||||
|
"""Supering create function for generating sequence.""" |
||||
|
for vals in vals_list: |
||||
|
if vals.get('reference', _('New')) == _('New'): |
||||
|
vals['reference'] = self.env['ir.sequence'].next_by_code( |
||||
|
'reference.sequence') or _('New') |
||||
|
return super().create(vals) |
@ -0,0 +1,35 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class Testimonial(models.Model): |
||||
|
"""model to manage testimonials""" |
||||
|
_name = 'autofly.testimonial' |
||||
|
_description = 'Testimonials' |
||||
|
_rec_name = 'partner_id' |
||||
|
|
||||
|
partner_id = fields.Many2one('res.partner', string='Customer', |
||||
|
required=True) |
||||
|
rating = fields.Selection(selection=[('1', '1'), ('2', '2'), ('3', '3'), |
||||
|
('4', '4'), ('5', '5')]) |
||||
|
review = fields.Text(help='Add your review here') |
|
After Width: | Height: | Size: 833 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 312 KiB |
After Width: | Height: | Size: 490 KiB |
After Width: | Height: | Size: 135 KiB |
After Width: | Height: | Size: 653 KiB |
After Width: | Height: | Size: 272 KiB |
After Width: | Height: | Size: 126 KiB |
After Width: | Height: | Size: 765 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 374 KiB |
After Width: | Height: | Size: 1.0 MiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 9.2 KiB |
After Width: | Height: | Size: 490 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 843 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 899 B |
After Width: | Height: | Size: 848 B |
After Width: | Height: | Size: 936 B |
After Width: | Height: | Size: 1001 B |
After Width: | Height: | Size: 690 B |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 9.5 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 343 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 1010 KiB |
After Width: | Height: | Size: 2.3 MiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 470 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 389 KiB |
After Width: | Height: | Size: 722 KiB |
After Width: | Height: | Size: 525 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 825 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 175 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 419 KiB |
After Width: | Height: | Size: 706 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 520 KiB |
After Width: | Height: | Size: 1.4 MiB |
After Width: | Height: | Size: 602 KiB |
After Width: | Height: | Size: 183 KiB |
After Width: | Height: | Size: 2.0 MiB |
After Width: | Height: | Size: 312 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 593 KiB |
After Width: | Height: | Size: 9.7 MiB |
After Width: | Height: | Size: 7.7 MiB |
After Width: | Height: | Size: 849 KiB |
After Width: | Height: | Size: 821 KiB |
After Width: | Height: | Size: 558 KiB |
After Width: | Height: | Size: 3.3 MiB |
After Width: | Height: | Size: 194 KiB |
After Width: | Height: | Size: 199 KiB |
After Width: | Height: | Size: 245 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 574 B |
After Width: | Height: | Size: 463 B |
After Width: | Height: | Size: 624 B |