diff --git a/pos_multi_note/README.rst b/pos_multi_note/README.rst new file mode 100644 index 000000000..311bec94b --- /dev/null +++ b/pos_multi_note/README.rst @@ -0,0 +1,40 @@ +Multiple Order Notes In POS +=============================== +* Enables the option for adding multiple order notes in pos order lines + +Installation +============ +- www.odoo.com/documentation/12.0/setup/install.html +- Install our custom addon + +License +------- +GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) +(http://www.gnu.org/licenses/agpl.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: + Sayooj A O + +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: ``__ diff --git a/pos_multi_note/__init__.py b/pos_multi_note/__init__.py new file mode 100644 index 000000000..c6f49b24c --- /dev/null +++ b/pos_multi_note/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Sayooj A O() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models diff --git a/pos_multi_note/__manifest__.py b/pos_multi_note/__manifest__.py new file mode 100644 index 000000000..368ac11ff --- /dev/null +++ b/pos_multi_note/__manifest__.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Sayooj A O() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Multiple Order Notes In POS', + 'summary': """The module enables to add multiple order line from the pos interface and other than + selection of the order note text is also enabled""", + 'version': '12.0.1.0.0', + 'description': """The module enables to add multiple order line from the pos interface and other than + selection of the order note text is also enabled""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'category': 'Point of Sale', + 'depends': ['base', 'point_of_sale', 'pos_restaurant'], + 'license': 'AGPL-3', + 'data': [ + 'views/order_note_templates.xml', + 'views/order_note_backend.xml', + 'security/ir.model.access.csv', + ], + 'qweb': ['static/src/xml/pos_internal_note.xml'], + 'images': ['static/description/banner.png'], + 'installable': True, + 'auto_install': False, + +} \ No newline at end of file diff --git a/pos_multi_note/doc/RELEASE_NOTES.md b/pos_multi_note/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..e859ab1f3 --- /dev/null +++ b/pos_multi_note/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 26.08.2019 +#### Version 12.0.1.0.0 +##### ADD +- Initial commit diff --git a/pos_multi_note/models/__init__.py b/pos_multi_note/models/__init__.py new file mode 100644 index 000000000..97a996a16 --- /dev/null +++ b/pos_multi_note/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Sayooj A O() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import pos_order +from . import order_note diff --git a/pos_multi_note/models/order_note.py b/pos_multi_note/models/order_note.py new file mode 100644 index 000000000..ba4a25966 --- /dev/null +++ b/pos_multi_note/models/order_note.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Sayooj A O() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import models, fields + + +class PosOrderNote(models.Model): + """In this class a new model is created in pos to create multiple + order notes in the backend""" + + _name = 'pos.order.note' + _rec_name = 'pos_note' + + pos_note = fields.Char(string='Multiple Order Note In POS', + help='Add the description of the order note') diff --git a/pos_multi_note/models/pos_order.py b/pos_multi_note/models/pos_order.py new file mode 100644 index 000000000..2b4b660bb --- /dev/null +++ b/pos_multi_note/models/pos_order.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Sayooj A O() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from odoo import models, api, fields + + +class Configuration(models.Model): + """In this class the model pos.config is inherited + to add a new boolean field in the settings of + point of sale which is used to make enable/disable + multiple order note in pos interface""" + + _inherit = 'pos.config' + + note_config = fields.Boolean(string='Order Line Note', + help='Allow to write internal note in POS interface', + default=True) + iface_orderline_notes = fields.Boolean(string='Orderline Notes', + help='Allow custom notes on Orderlines.', + default=False, compute='_compute_iface_orderline_notes', + readonly=False) + + @api.multi + def _compute_iface_orderline_notes(self): + """This is the compute function to disable + the existing single order note facility + in the point of sale interface""" + if self.note_config: + self.iface_orderline_notes = False + + @api.onchange('note_config') + @api.depends('note_config') + def _onchange_note_config(self): + """This is the onchange function to disable/enable + the existing single order note facility + in the point of sale interface""" + if self.note_config: + self.iface_orderline_notes = False + if not self.note_config: + self.iface_orderline_notes = True diff --git a/pos_multi_note/security/ir.model.access.csv b/pos_multi_note/security/ir.model.access.csv new file mode 100644 index 000000000..702297f89 --- /dev/null +++ b/pos_multi_note/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_pos_order_note_manager_id,access_pos_order_note_manager,model_pos_order_note,point_of_sale.group_pos_manager,1,1,1,1 +access_pos_order_note_employee_id,access_pos_order_note_employee,model_pos_order_note,point_of_sale.group_pos_user,1,1,1,1 \ No newline at end of file diff --git a/pos_multi_note/static/description/banner.png b/pos_multi_note/static/description/banner.png new file mode 100644 index 000000000..e60ed3d93 Binary files /dev/null and b/pos_multi_note/static/description/banner.png differ diff --git a/pos_multi_note/static/description/book_order.png b/pos_multi_note/static/description/book_order.png new file mode 100644 index 000000000..4d3da60bb Binary files /dev/null and b/pos_multi_note/static/description/book_order.png differ diff --git a/pos_multi_note/static/description/checked.png b/pos_multi_note/static/description/checked.png new file mode 100644 index 000000000..578cedb80 Binary files /dev/null and b/pos_multi_note/static/description/checked.png differ diff --git a/pos_multi_note/static/description/cybrosys.png b/pos_multi_note/static/description/cybrosys.png new file mode 100644 index 000000000..d76b5bafb Binary files /dev/null and b/pos_multi_note/static/description/cybrosys.png differ diff --git a/pos_multi_note/static/description/icon.png b/pos_multi_note/static/description/icon.png new file mode 100644 index 000000000..0ae241c0f Binary files /dev/null and b/pos_multi_note/static/description/icon.png differ diff --git a/pos_multi_note/static/description/index.html b/pos_multi_note/static/description/index.html new file mode 100644 index 000000000..b15706626 --- /dev/null +++ b/pos_multi_note/static/description/index.html @@ -0,0 +1,393 @@ + + +
cybrosys-logo
+ +
+
+
+

Multiple Orderline Notes In POS

+

Multiple Order note selection in point of sale interface.

+
+

Key Highlights

+
    +
  • check Create Multiple Order notes in the backend.
  • +
+
    +
  • check Can select order notes created in the backend from POS interface.
  • +
+
    +
  • check Option for typing required order notes along with the selection.
  • +
+
    +
  • check The order notes defined will appear in the pos ticket.
  • +
+
+
+
+
+ + + + + + +
+
+
+ + + +
+
+ +

Overview

+
+

+ Using this application one can assign multiple order notes to an order line, add text to the order note manually and select them from a variety of selections.

+
+ +
+ +

Multiple Orderline Notes In POS

+
+
    + +
  • + checkAvailable in Odoo 12.0 community edition.
  • + +
  • + checkAllow to add multiple order notes in pos order lines.
  • +
+
+ + + +
+ +
+

Screenshots

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

Video

+
+

Multiple Order Note Selection In POS

+ + +
+ Cybrosys Cover Video +
+ +
+
+ + + +
+
    + + +
+
+
+
+
+
+ +
+

Suggested Products

+
+ +
+ + +
+

Our Service

+
+ +
+
+
+

Our Industries

+
+ +
+
+
+ +
+
+

Trading

+

Easily procure and sell your products.

+
+
+
+
+ +
+
+

Manufacturing

+

Plan, track and schedule your operations.

+
+
+
+
+ +
+
+

Restaurant

+

Run your bar or restaurant methodical.

+
+
+
+
+ +
+
+

POS

+

Easy configuring and convivial selling.

+
+
+
+
+ +
+
+

E-commerce & Website

+

Mobile friendly, awe-inspiring product pages.

+
+
+
+
+ +
+
+

Hotel Management

+

An all-inclusive hotel management application.

+
+
+
+
+ +
+
+

Education

+

A Collaborative platform for educational management.

+
+
+
+
+ +
+
+

Service Management

+

Keep track of services and invoice accordingly.

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

Need Any Help?

+
+ +

If you have anything to share with us based on your use of this module, please let us know. We are ready to offer our support.

+
+

Email us

+

odoo@cybrosys.com / info@cybrosys.com

+ +
+
+

Contact Us

+ www.cybrosys.com +
+
+ +
+
+ + +
+
+
+ + + + +
+
+ +
+ + + + + + + + +
+
+
+ + diff --git a/pos_multi_note/static/description/mrp_order.png b/pos_multi_note/static/description/mrp_order.png new file mode 100644 index 000000000..e34e0f784 Binary files /dev/null and b/pos_multi_note/static/description/mrp_order.png differ diff --git a/pos_multi_note/static/description/multi-order-note.gif b/pos_multi_note/static/description/multi-order-note.gif new file mode 100644 index 000000000..308950e3c Binary files /dev/null and b/pos_multi_note/static/description/multi-order-note.gif differ diff --git a/pos_multi_note/static/description/order_line.jpg b/pos_multi_note/static/description/order_line.jpg new file mode 100755 index 000000000..4fd40efe1 Binary files /dev/null and b/pos_multi_note/static/description/order_line.jpg differ diff --git a/pos_multi_note/static/description/pos mutiple order notes-1.png b/pos_multi_note/static/description/pos mutiple order notes-1.png new file mode 100644 index 000000000..0e1bb3aca Binary files /dev/null and b/pos_multi_note/static/description/pos mutiple order notes-1.png differ diff --git a/pos_multi_note/static/description/pos_note_01.png b/pos_multi_note/static/description/pos_note_01.png new file mode 100644 index 000000000..cd1764232 Binary files /dev/null and b/pos_multi_note/static/description/pos_note_01.png differ diff --git a/pos_multi_note/static/description/pos_note_02.png b/pos_multi_note/static/description/pos_note_02.png new file mode 100644 index 000000000..02130badc Binary files /dev/null and b/pos_multi_note/static/description/pos_note_02.png differ diff --git a/pos_multi_note/static/description/pos_note_03.png b/pos_multi_note/static/description/pos_note_03.png new file mode 100644 index 000000000..908b3da48 Binary files /dev/null and b/pos_multi_note/static/description/pos_note_03.png differ diff --git a/pos_multi_note/static/description/pos_note_04.png b/pos_multi_note/static/description/pos_note_04.png new file mode 100644 index 000000000..0c839b1dd Binary files /dev/null and b/pos_multi_note/static/description/pos_note_04.png differ diff --git a/pos_multi_note/static/description/pos_note_05.png b/pos_multi_note/static/description/pos_note_05.png new file mode 100644 index 000000000..7d986e3ee Binary files /dev/null and b/pos_multi_note/static/description/pos_note_05.png differ diff --git a/pos_multi_note/static/description/pos_note_06.png b/pos_multi_note/static/description/pos_note_06.png new file mode 100644 index 000000000..7c11f9d76 Binary files /dev/null and b/pos_multi_note/static/description/pos_note_06.png differ diff --git a/pos_multi_note/static/description/pos_note_07.png b/pos_multi_note/static/description/pos_note_07.png new file mode 100644 index 000000000..4ea3a7494 Binary files /dev/null and b/pos_multi_note/static/description/pos_note_07.png differ diff --git a/pos_multi_note/static/description/pos_note_08.png b/pos_multi_note/static/description/pos_note_08.png new file mode 100644 index 000000000..ef55dbaf7 Binary files /dev/null and b/pos_multi_note/static/description/pos_note_08.png differ diff --git a/pos_multi_note/static/description/product_creation.png b/pos_multi_note/static/description/product_creation.png new file mode 100644 index 000000000..b732ff64f Binary files /dev/null and b/pos_multi_note/static/description/product_creation.png differ diff --git a/pos_multi_note/static/description/reference_pos.jpg b/pos_multi_note/static/description/reference_pos.jpg new file mode 100644 index 000000000..ff3225832 Binary files /dev/null and b/pos_multi_note/static/description/reference_pos.jpg differ diff --git a/pos_multi_note/static/description/vouchers.jpg b/pos_multi_note/static/description/vouchers.jpg new file mode 100644 index 000000000..384d5d6c6 Binary files /dev/null and b/pos_multi_note/static/description/vouchers.jpg differ diff --git a/pos_multi_note/static/src/js/notes_pos.js b/pos_multi_note/static/src/js/notes_pos.js new file mode 100644 index 000000000..b36eca1c4 --- /dev/null +++ b/pos_multi_note/static/src/js/notes_pos.js @@ -0,0 +1,89 @@ +odoo.define('pos_multi_note.notes_pos', function (require) { + "use strict"; + var screens = require('point_of_sale.screens'); + var gui = require('point_of_sale.gui'); + var core = require('web.core'); + var rpc = require('web.rpc'); + var PopupWidget = require('point_of_sale.popups'); + var _t = core._t; + var models = require('point_of_sale.models'); + + models.load_models({ + model: 'pos.order.note', + fields: ['pos_note'], + loaded: function (self, ordernotes) { + self.order_note_by_id = {}; + for (var i = 0; i < ordernotes.length; i++) { + self.order_note_by_id[ordernotes[i].id] = ordernotes[i]; + } + } + }); + + var NotePopupWidget = PopupWidget.extend({ + count: 0, + template: 'NotePopupWidget', + events: _.extend({}, PopupWidget.prototype.events, { + 'change .note_temp': 'click_option' + }), + init: function (parent, options) { + this.options = options || {}; + this._super(parent, _.extend({}, { + size: "medium" + }, this.options)); + }, + renderElement: function () { + this._super(); + for (var note in this.pos.order_note_by_id) { + $('#note_select').append($("").attr("value", this.pos.order_note_by_id[note].pos_note) + .attr("id", this.pos.order_note_by_id[note].id) + .attr("class", "note_option")) + } + }, + show: function (options) { + options = options || {}; + this._super(options); + $('textarea').text(options.value); + }, + click_confirm: function (event) { + event.preventDefault(); + event.stopPropagation(); + var line = this.pos.get_order().get_selected_orderline(); + line.set_note($('#note_text_area').val()); + this.gui.close_popup(); + }, + click_option: function (event) { + event.preventDefault(); + event.stopPropagation(); + var old_text = $('textarea').val(); + var e = document.getElementById("note_select"); + var text = e.options[e.selectedIndex].value; + old_text += "\n"; + old_text += text; + $('textarea').text(old_text); + } + + }); + gui.define_popup({name: 'pos_no', widget: NotePopupWidget}); + + var InternalNoteButton = screens.ActionButtonWidget.extend({ + template: 'InternalNoteButton', + button_click: function () { + var line = this.pos.get_order().get_selected_orderline(); + if (line) { + this.gui.show_popup('pos_no', { + value: line.get_note(), + 'title': _t('ADD YOUR MULTIPLE ORDER NOTES') + }); + } + } + }); + + screens.define_action_button({ + 'name': 'pos_internal_note', + 'widget': InternalNoteButton, + 'condition': function () { + return this.pos.config.note_config; + } + }); +}); + diff --git a/pos_multi_note/static/src/xml/pos_internal_note.xml b/pos_multi_note/static/src/xml/pos_internal_note.xml new file mode 100644 index 000000000..d294028f9 --- /dev/null +++ b/pos_multi_note/static/src/xml/pos_internal_note.xml @@ -0,0 +1,59 @@ + + diff --git a/pos_multi_note/views/order_note_backend.xml b/pos_multi_note/views/order_note_backend.xml new file mode 100644 index 000000000..371d2a4a5 --- /dev/null +++ b/pos_multi_note/views/order_note_backend.xml @@ -0,0 +1,55 @@ + + + + + pos.order.note.tree + pos.order.note + + + + + + + + + pos.order.note.form + pos.order.note + + +
+ + + + + +
+
+
+ + Order Notes + pos.order.note + form + tree,form + [] + +

Create New Order Note +

+
+
+ + + + + pos.config.form.view.inherit + pos.config + + + + {'invisible': [('note_config', '=', True)]} + + + + +
+
\ No newline at end of file diff --git a/pos_multi_note/views/order_note_templates.xml b/pos_multi_note/views/order_note_templates.xml new file mode 100644 index 000000000..44d2449de --- /dev/null +++ b/pos_multi_note/views/order_note_templates.xml @@ -0,0 +1,31 @@ + + + +