@ -1,44 +0,0 @@ |
|||
.. image:: https://img.shields.io/badge/license-OPL--1-red.svg |
|||
:target: https://www.odoo.com/documentation/17.0/legal/licenses.html |
|||
:alt: License: OPL-1" |
|||
|
|||
POS Order Types |
|||
=============== |
|||
Helps the salesman to specify the type of order like parcel, delivery etc. |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
License |
|||
------- |
|||
Odoo Proprietary License v1.0 (OPL-1) |
|||
(https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html) |
|||
|
|||
Credits |
|||
------- |
|||
* Developer: |
|||
* Version 13: Nimisha Murali |
|||
* Version 14: Jibin James |
|||
* Version 15: Sachin T |
|||
* Version 16: Neenu Merlin Jose |
|||
* Version 17: Anjana P V, |
|||
Contact : odoo@cybrosys.com |
|||
|
|||
Contacts |
|||
-------- |
|||
* Mail Contact : odoo@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 |
|||
========== |
|||
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>`__ |
@ -1,23 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Anjana P V (Contact : odoo@cybrosys.com) |
|||
# |
|||
# This program is under the terms of the Odoo Proprietary License v1.0 |
|||
# (OPL-1) |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies of the |
|||
# Software or modified copies of the Software. |
|||
# |
|||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
|||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM |
|||
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
|||
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
|||
# USE OR OTHER DEALINGS IN THE SOFTWARE. |
|||
# |
|||
############################################################################## |
|||
from . import models |
@ -1,59 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Anjana P V (Contact : odoo@cybrosys.com) |
|||
# |
|||
# This program is under the terms of the Odoo Proprietary License v1.0 |
|||
# (OPL-1) |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies of the |
|||
# Software or modified copies of the Software. |
|||
# |
|||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
|||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM |
|||
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
|||
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
|||
# USE OR OTHER DEALINGS IN THE SOFTWARE. |
|||
# |
|||
############################################################################## |
|||
{ |
|||
'name': "POS Order Types", |
|||
'version': '17.0.1.0.0', |
|||
'category': 'Point of Sale', |
|||
'summary': """ Helps the salesman to specify the type of order like parcel |
|||
delivery etc.""", |
|||
'description': """This module helps to choose the order types in POS |
|||
screen. You have the option to choose different order types for multiple |
|||
Point of Sale.""", |
|||
'author': "Cybrosys Techno Solutions", |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': 'http://www.cybrosys.com', |
|||
'depends': ['pos_restaurant', 'point_of_sale'], |
|||
'data': [ |
|||
'security/ir.model.access.csv', |
|||
'views/delivery_type_views.xml', |
|||
'views/pos_order_views.xml', |
|||
'views/res_config_settings_views.xml', |
|||
], |
|||
'assets': { |
|||
'point_of_sale._assets_pos': [ |
|||
'pos_order_types/static/src/js/models.js', |
|||
'pos_order_types/static/src/js/deliverymethod_button.js', |
|||
'pos_order_types/static/src/js/pos_store.js', |
|||
'pos_order_types/static/src/xml/pos_delivery_method.xml', |
|||
'pos_order_types/static/src/xml/**/*', |
|||
], |
|||
}, |
|||
'images': ['static/description/banner.png'], |
|||
'license': 'OPL-1', |
|||
'price': 9.99, |
|||
'currency': 'EUR', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': False, |
|||
} |
@ -1,7 +0,0 @@ |
|||
## Module <pos_order_types> |
|||
|
|||
#### 03.07.2024 |
|||
#### Version 17.0.1.0.0 |
|||
##### ADD |
|||
|
|||
- Initial commit for POS Order Types |
@ -1,26 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Anjana P V (Contact : odoo@cybrosys.com) |
|||
# |
|||
# This program is under the terms of the Odoo Proprietary License v1.0 |
|||
# (OPL-1) |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies of the |
|||
# Software or modified copies of the Software. |
|||
# |
|||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
|||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM |
|||
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
|||
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
|||
# USE OR OTHER DEALINGS IN THE SOFTWARE. |
|||
# |
|||
############################################################################## |
|||
from . import delivery_types |
|||
from . import pos_session |
|||
from . import pos_order |
|||
from . import res_config_settings |
@ -1,30 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Anjana P V (Contact : odoo@cybrosys.com) |
|||
# |
|||
# This program is under the terms of the Odoo Proprietary License v1.0 |
|||
# (OPL-1) |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies of the |
|||
# Software or modified copies of the Software. |
|||
# |
|||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
|||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM |
|||
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
|||
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
|||
# USE OR OTHER DEALINGS IN THE SOFTWARE. |
|||
# |
|||
############################################################################## |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class DeliveryTypes(models.Model): |
|||
"""Creating delivery type.""" |
|||
_name = 'delivery.type' |
|||
|
|||
name = fields.Char(string='Order Type', help='Name of the delivery type') |
@ -1,41 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Anjana P V (Contact : odoo@cybrosys.com) |
|||
# |
|||
# This program is under the terms of the Odoo Proprietary License v1.0 |
|||
# (OPL-1) |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies of the |
|||
# Software or modified copies of the Software. |
|||
# |
|||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
|||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM |
|||
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
|||
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
|||
# USE OR OTHER DEALINGS IN THE SOFTWARE. |
|||
# |
|||
############################################################################## |
|||
from odoo import api, fields, models |
|||
|
|||
|
|||
class PosOrder(models.Model): |
|||
"""Extends the POS Order model to include custom delivery type.""" |
|||
_inherit = 'pos.order' |
|||
|
|||
delivery_type = fields.Many2one('delivery.type', |
|||
string='Order Type', |
|||
help='Selected order type', readonly=True) |
|||
|
|||
@api.model |
|||
def _order_fields(self, ui_order): |
|||
"""Extends the base method to include the delivery type field in |
|||
the order creation process.""" |
|||
order_fields = super(PosOrder, self)._order_fields(ui_order) |
|||
if ui_order['delivery_method']: |
|||
order_fields['delivery_type'] = ui_order['delivery_method']['id'] |
|||
return order_fields |
@ -1,56 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Anjana P V (Contact : odoo@cybrosys.com) |
|||
# |
|||
# This program is under the terms of the Odoo Proprietary License v1.0 |
|||
# (OPL-1) |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies of the |
|||
# Software or modified copies of the Software. |
|||
# |
|||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
|||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM |
|||
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
|||
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
|||
# USE OR OTHER DEALINGS IN THE SOFTWARE. |
|||
# |
|||
############################################################################## |
|||
from odoo import models |
|||
|
|||
|
|||
class pos_session(models.Model): |
|||
"""Extends the 'pos.session' model to customize data processing |
|||
and UI models for point of sale sessions.""" |
|||
_inherit = 'pos.session' |
|||
|
|||
def _pos_data_process(self, loaded_data): |
|||
"""Process loaded data for the point of sale session, extending the |
|||
base class method.""" |
|||
super()._pos_data_process(loaded_data) |
|||
if self.config_id: |
|||
loaded_data['type_by_id'] = {order_type['id']: order_type for |
|||
order_type in |
|||
loaded_data['delivery.type']} |
|||
|
|||
def _pos_ui_models_to_load(self): |
|||
"""Get the list of UI models to load for the point of sale session.""" |
|||
result = super()._pos_ui_models_to_load() |
|||
result += ['delivery.type'] |
|||
return result |
|||
|
|||
def _loader_params_delivery_type(self): |
|||
"""Get the loader parameters for the 'delivery.type' model.""" |
|||
return { |
|||
'search_params': { |
|||
'domain': [('id', '=', self.env['res.config.settings'].search( |
|||
[]).delivery_methods.ids)], |
|||
'fields': ['name']}, } |
|||
|
|||
def _get_pos_ui_delivery_type(self, params): |
|||
"""Retrieve UI data for 'delivery.type' based on provided parameters.""" |
|||
return self.env['delivery.type'].search_read(**params['search_params']) |
@ -1,61 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Anjana P V (Contact : odoo@cybrosys.com) |
|||
# |
|||
# This program is under the terms of the Odoo Proprietary License v1.0 |
|||
# (OPL-1) |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies of the |
|||
# Software or modified copies of the Software. |
|||
# |
|||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
|||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM |
|||
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
|||
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
|||
# USE OR OTHER DEALINGS IN THE SOFTWARE. |
|||
# |
|||
############################################################################## |
|||
from ast import literal_eval |
|||
from odoo import api, fields, models |
|||
|
|||
|
|||
class ResConfigSettings(models.TransientModel): |
|||
"""Extension of 'res.config.settings' for configuring delivery settings.""" |
|||
_inherit = 'res.config.settings' |
|||
|
|||
enable_delivery = fields.Boolean(string='Enable Order Types', |
|||
help='This field is used to enable to set' |
|||
'the order types in settings') |
|||
delivery_methods = fields.Many2many('delivery.type', |
|||
string='Order Types', |
|||
help='Set the delivery methods') |
|||
|
|||
@api.model |
|||
def get_values(self): |
|||
"""Get the values from settings.""" |
|||
res = super(ResConfigSettings, self).get_values() |
|||
icp_sudo = self.env['ir.config_parameter'].sudo() |
|||
partner_parameter = icp_sudo.get_param( |
|||
'res.config.settings.enable_delivery') |
|||
partner_parameters = icp_sudo.get_param( |
|||
'res.config.settings.delivery_methods') |
|||
res.update(enable_delivery=partner_parameter, |
|||
delivery_methods=[(6, 0, literal_eval(partner_parameters)) |
|||
] if partner_parameters else False, ) |
|||
return res |
|||
|
|||
def set_values(self): |
|||
"""Set the values.The new values are stored in the configuration |
|||
parameters.""" |
|||
res = super(ResConfigSettings, self).set_values() |
|||
self.env['ir.config_parameter'].sudo().set_param( |
|||
'res.config.settings.enable_delivery', self.enable_delivery) |
|||
self.env['ir.config_parameter'].sudo().set_param( |
|||
'res.config.settings.delivery_methods', |
|||
self.delivery_methods.ids) |
|||
return res |
|
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 310 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 576 B |
Before Width: | Height: | Size: 733 B |
Before Width: | Height: | Size: 911 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 673 B |
Before Width: | Height: | Size: 878 B |
Before Width: | Height: | Size: 653 B |
Before Width: | Height: | Size: 905 B |
Before Width: | Height: | Size: 839 B |
Before Width: | Height: | Size: 427 B |
Before Width: | Height: | Size: 627 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 988 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 589 B |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 967 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 310 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 576 B |
Before Width: | Height: | Size: 733 B |
Before Width: | Height: | Size: 911 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 673 B |
Before Width: | Height: | Size: 878 B |
Before Width: | Height: | Size: 653 B |
Before Width: | Height: | Size: 905 B |
Before Width: | Height: | Size: 839 B |
Before Width: | Height: | Size: 427 B |
Before Width: | Height: | Size: 627 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 988 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 589 B |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 967 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 158 KiB |
Before Width: | Height: | Size: 241 KiB |
Before Width: | Height: | Size: 224 KiB |
Before Width: | Height: | Size: 294 KiB |
Before Width: | Height: | Size: 163 KiB |
Before Width: | Height: | Size: 352 KiB |
Before Width: | Height: | Size: 326 KiB |
Before Width: | Height: | Size: 378 KiB |
Before Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 24 KiB |