@ -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: (V16) Hari Krishnan, 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) 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 controllers |
|||
from . import models |
@ -0,0 +1,87 @@ |
|||
# -*- 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/>. |
|||
# |
|||
############################################################################# |
|||
{ |
|||
'name': 'Theme Autofly', |
|||
'version': '16.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_sale', 'website_blog'], |
|||
'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', |
|||
], |
|||
'assets': { |
|||
'web.assets_frontend': [ |
|||
'/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/js/theme.js', |
|||
'theme_autofly/static/src/css/owl.theme.default.min.css', |
|||
'/theme_autofly/static/src/js/owl.carousel.js', |
|||
'/theme_autofly/static/src/xml/blog_snippet_templates.xml', |
|||
'/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/all_type.js', |
|||
'/theme_autofly/static/src/js/theme.js' |
|||
], |
|||
}, |
|||
'images': [ |
|||
'static/description/banner.png', |
|||
'static/description/theme_screenshot.png', |
|||
], |
|||
'license': 'LGPL-3', |
|||
'installable': True, |
|||
'application': False, |
|||
'auto_install': False, |
|||
} |
@ -0,0 +1,23 @@ |
|||
# -*- 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 main |
|||
from . import product_tab |
@ -0,0 +1,84 @@ |
|||
# -*- 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/>. |
|||
# |
|||
############################################################################# |
|||
import logging |
|||
from odoo import http |
|||
from odoo.http import request |
|||
|
|||
_logger = logging.getLogger(__name__) |
|||
|
|||
|
|||
class About(http.Controller): |
|||
"""Controller for about page, portfolio page, team page, service page.""" |
|||
|
|||
@http.route('/about', website=True, type='http', auth='public', |
|||
csrf=False) |
|||
def about_page(self): |
|||
"""Used for 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): |
|||
"""Used for 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): |
|||
"""Used for 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): |
|||
"""Used for the service page.""" |
|||
return request.render('theme_autofly.service_page') |
|||
|
|||
@http.route('/blog_snippet', auth="public", type='json', website=True) |
|||
def latest_blog(self): |
|||
"""Used for the dynamic blog snippet.""" |
|||
return request.env['blog.post'].sudo().search_read([], limit=3) |
|||
|
|||
@http.route('/autofly/service', website=True, auth='public', |
|||
csrf=False) |
|||
def service_booking(self, **kwargs): |
|||
"""Used for 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.""" |
|||
hot_deals = request.env['product.template'].sudo().search( |
|||
[('car_brand_id', '=', int(kwargs.get('car-selection'))), |
|||
('car_type_id', '=', |
|||
int(kwargs.get('car-type-selection'))), |
|||
('location', '=', kwargs.get('car-location')), |
|||
('list_price', '=', float(kwargs.get('car-price'))), |
|||
('car_model', '=', kwargs.get('car-model'))]) |
|||
return request.render('theme_autofly.specific_car', |
|||
qcontext={'hot_deals': hot_deals}) |
@ -0,0 +1,96 @@ |
|||
# -*- 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 odoo import http |
|||
from odoo.http import request |
|||
|
|||
|
|||
class WebsiteProduct(http.Controller): |
|||
"""Controller used to fetch product related data and others.""" |
|||
|
|||
@http.route('/get_product_tab', auth="public", type='json', |
|||
website=True) |
|||
def get_product_tab(self): |
|||
"""Controller used for 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', website=True) |
|||
def get_find_car(self): |
|||
"""Controller used for fetch car types.""" |
|||
hot_deals = request.env['car.types'].sudo().search([], |
|||
order='create_date 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', |
|||
website=True) |
|||
def get_search_car(self): |
|||
"""Controller used for fetch car brands.""" |
|||
hot_deals = request.env['car.brand'].sudo().search([]) |
|||
response = http.Response(template='theme_autofly.autofly_search_box', |
|||
qcontext={'hot_deals': hot_deals}) |
|||
return response.render() |
|||
|
|||
@http.route('/blog_snippet_autofly', auth="public", type='json', |
|||
website=True) |
|||
def blog_snippet_autofly(self): |
|||
"""It's used for the dynamic blog snippet.""" |
|||
return request.env['blog.post'].sudo().search_read([], limit=3) |
|||
|
|||
@http.route('/get_service_product', auth="public", type='json', |
|||
website=True) |
|||
def get_service_product(self): |
|||
"""Controller used for 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', |
|||
website=True) |
|||
def get_garage_car(self): |
|||
"""Controller used for 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', website=True) |
|||
def get_all_type(self): |
|||
"""Controller used for 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> |
|||
|
|||
#### 11.12.2023 |
|||
#### Version 16.0.1.0.0 |
|||
#### ADD |
|||
- Initial Commit for Theme Autofly |
@ -0,0 +1,26 @@ |
|||
# -*- 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 car_brand |
|||
from . import car_garage |
|||
from . import car_types |
|||
from . import product_template |
|||
from . import service_booking |
@ -0,0 +1,56 @@ |
|||
# -*- 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 odoo import api, 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(string="Name", help="Add your brand name.") |
|||
image = fields.Image(string="Image", help="Add your brand image.") |
|||
|
|||
@api.model |
|||
def get_brands(self): |
|||
"""Rpc function returning car details.""" |
|||
brands = self.env['car.brand'].sudo().search([]) |
|||
car_type = self.env['car.types'].sudo().search([]) |
|||
car_name = [] |
|||
car_id = [] |
|||
for rec in brands: |
|||
car_name.append(rec.name) |
|||
car_id.append(rec.id) |
|||
value = { |
|||
'car_name': car_name, |
|||
'car_id': car_id |
|||
} |
|||
type_name = [] |
|||
type_id = [] |
|||
for record in car_type: |
|||
type_name.append(record.name) |
|||
type_id.append(record.id) |
|||
value1 = { |
|||
'car_type': type_name, |
|||
'type_id': type_id |
|||
} |
|||
return value, value1 |
@ -0,0 +1,31 @@ |
|||
# -*- 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 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(string="Name", help="Add your garage name.") |
|||
image = fields.Image(string="Image", help="Add your garage image.") |
@ -0,0 +1,53 @@ |
|||
# -*- 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 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(string="Name", help="Add your car type name.") |
|||
image = fields.Image(string="Image", help="Add your car type image.") |
|||
product_count = fields.Integer('Products Count', |
|||
compute='compute_count', |
|||
help="Used to show product in smart button.") |
|||
prdt_count = fields.Integer(string="Product Count") |
|||
|
|||
def compute_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', '=', self.id)]) |
|||
record.prdt_count = record.product_count |
|||
|
|||
def action_view_products(self): |
|||
"""Product smart button.""" |
|||
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) 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 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', srtring="Car Brand", |
|||
help="Add your car brand.") |
|||
car_model = fields.Char(string="Model", help="Add your car model.") |
|||
location = fields.Char(string="Location", help="Add your car location.") |
@ -0,0 +1,46 @@ |
|||
# -*- 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 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" |
|||
|
|||
reference = fields.Char(string="Reference", readonly=True, |
|||
help="Booking sequence") |
|||
state = fields.Selection( |
|||
[('draft', 'Draft'), ('running', 'Running'), |
|||
('cancel', 'Cancel'), ('done', 'Done')], string="State") |
|||
name = fields.Char('Name', required=True, help="Name of the service") |
|||
email = fields.Char(string='Email', help="Email address") |
|||
description = fields.Char(string='Description', |
|||
help="Add if you have any description") |
|||
|
|||
@api.model_create_multi |
|||
def create(self, vals): |
|||
"""Supering create function for generating sequence.""" |
|||
if vals.get('reference', _('New')) == _('New'): |
|||
vals['reference'] = self.env['ir.sequence'].next_by_code( |
|||
'reference.sequence') or _('New') |
|||
return super(ServiceBooking, self).create(vals) |
|
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: 359 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: 19 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: 280 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 668 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 |