diff --git a/pos_receipt_design/LICENSE b/pos_receipt_design/LICENSE new file mode 100644 index 0000000..b534039 --- /dev/null +++ b/pos_receipt_design/LICENSE @@ -0,0 +1,398 @@ +SOFTWARE LICENCE AGREEMENT +========================== + +This AGREEMENT is made effective on the date of the purchase of the software +between Webkul Software Pvt. Ltd.,Company incorporated under the Companies +Act, 1956 (hereinafter referred to as “Licensor"), and the purchaser of the +software/ product (hereinafter referred to as "Licensee"). + + +Preamble +-------- + +Licensor is a web and mobile product based organization engaged in the +business of developing and marketing software for enterprise level e-commerce +businesses. It is an ISO and NSR (NASSCOM) certified organization having a +team of more than 150 creative engineers which come from different +backgrounds. It has developed more than 700 web extensions and apps in the +past few years for open source platforms which are used and trusted globally. +Licensee now wishes to obtain license, and Licensor wishes to grant a license, +to allow use of the software so purchased in developing the e-commerce +business website/ mobile app of the Licensee, subject to the terms and +conditions set forth herein. + +THEREFORE, with the intent to be legally bound, the parties hereby agree as +follows: + + +Agreement +--------- + +1.DEFINITIONS. +As used in this Agreement, the following capitalized terms +shall have the definitions set forth below: + +"Derivative Works" are works developed by Licensee, its officers, agents, +contractors or employees, which are based upon, in whole or in part, the +Source Code and/or the Documentation and may also be based upon and/or +incorporate one or more other preexisting works of the Licensor. Derivative +Works may be any improvement, revision, modification, translation (including +compilation or recapitulation by computer), abridgment, condensation, +expansion, or any other form in which such a preexisting work may be recast, +transformed, or adapted. For purposes hereof, a Derivative Work shall also +include any compilation that incorporates such a preexisting work. + +"Documentation" is written, printed or otherwise recorded or stored (digital +or paper) material relating to the Software and/or Source Code, including +technical specifications and instructions for its use including Software/ +Source Code annotations and other descriptions of the principles of its +operation and instructions for its use. + +"Improvements" shall mean, with respect to the Software, all modifications and +changes made, developed, acquired or conceived after the date hereof and +during the entire term of this Agreement. + +"Source Code" is the computer programming source code form of the Software in +the form maintained by the Licensor, and includes all non-third-party +executables, libraries, components, and Documentation created or used in the +creation, development, maintenance, and support of the Software as well as all +updates, error corrections and revisions thereto provided by Licensor, in +whole or in part. + + +2.SOFTWARE LICENSE. + +(a)Grant of License. For the consideration set forth below, Licensor hereby +grants to Licensee, and Licensee hereby accepts the worldwide, non-exclusive, +perpetual, royalty-free rights and licenses set forth below: + +(i)The right and license to use and incorporate the software, in whole or in +part, to develop its website/ mobile app (including the integration of all or +part of the Licensor’s software into Licensee's own software) on one domain ( +Except Joomla modules , listed on store are entitled to be used on unlimited +domain as per the standard guidelines ) only, solely for the own personal or +business use of the Licensee. However, the License does not authorize the +Licensee to compile, copy or distribute the said Software or its Derivative +Works. + +(ii)The right and license does not authorize the Licensee to share any backup +or archival copies of the Software and / or the Source Code and Documentation +on any public internet space including github , stackoverflow etc . The +Licensee must ensure that the backup are not accessible to any other person +and the Licensee must prevent copying / use of source code by any unauthorized +persons. + +(iii)The right and license does not authorize the Licensee to migrate the +domain license to another domain. + +(iv)Our Joomla extensions are published under the GNU/GPL. + + +(b)Scope; Rights and Responsibilities. + +(i)Licensor shall enable the Licensee to download one complete copy of the +Software. + +(ii)The Software is intended for the sole use of the Licensee in development +of its own website/ mobile app. + +(iii)Licensee does not have the right to hand over, sell, distribute, +sub-license, rent, lease or lend any portion of the Software or Documentation, +whether modified or unmodified, to anyone. Licensee should not place the +Software on a server so that it becomes accessible via a public network such +as the Internet for distribution purposes. In case the Licensee is using any +source code management system like github, it can use the code there only when +it has paid subscription from such management system. + +(iv) In case the Licensee purchases the module and allow the third party +development agency to customize as per its need, it is at liberty to do so +subject to the condition that the Licensee as well as the Agency are not +authorized to sell the modified version of the extension. Except for the +required customization purposes, Licensee is not authorized to release the +Source Code, Derivative Work source code and/or Documentation to any third +party, which shall be considered as violation of the Agreement, inter-alia +entailing forthwith termination and legal action. + + +(c)Ownership. + +(i)Software and Source Code. All right, title, copyright, and interest in the +Software, Source Code, Software Modifications and Error corrections will be +and remain the property of Licensor. + +(ii)Derivative Works. As creation of Derivative Works by the Licensee is +prohibited, thus, all right, title, copyright, and interest in any and/or all +Derivative Works and Improvements created by, or on behalf of, Licensee will +also be deemed to the property of Licensor. Licensor shall be entitled to +protect copyright / intellectual property in all such Derivative Works and +Improvements also in any country as it may deem fit including without +limitation seeking copyright and/or patent protection. + + +3.CONSIDERATION. + +(a)Licensee shall pay to Licensor the amount as mentioned on the website from +where the order is placed, as one-time, upfront fees in consideration for the +licenses and rights granted hereunder (hereinafter referred to as the "License +Fee"). The License Fee to be paid by Licensee shall be paid upfront at the +time of placing the order, and no credit will be allowed under any +circumstances. + +(b)Once paid, the License Fees shall be non-refundable. The Licensee has fully +satisfied itself about the Software and has seen the demonstration, and only +thereafter has placed the order. Thus, the License Fees or any part thereof is +non-refundable. No claim for refund of the Licence Fees shall be entertained +under any circumstances. + + +4.REPRESENTATIONS AND WARRANTIES. + +(a)Mutual. Each of the parties represents and warrants to the other as +follows. + +(i)such party is a legal entity duly organized, validly existing and in good +standing; + +(ii)such party has the power and authority to conduct its business as +presently conducted and to enter into, execute, deliver and perform this +Agreement. + +(iii)This Agreement has been duly and validly accepted by such party and +constitutes the legal, valid and binding obligations of such party +respectively, enforceable against such party in accordance with their +respective terms; + +(iv)the acceptance, execution, delivery and performance of this Agreement does +not and will not violate such party's charter or by-laws; nor require any +consent, authorization, approval, exemption or other action by any third party +or governmental entity. + + +(b)Licensor warrants that, at the time of purchase of the Software: + +the Software will function materially as set forth in the website or published +functionality provided by Licensor to customers and potential customers +describing the Software; and + +Software add-ons, if purchased by the Licensee from the Licensor, will not +materially diminish the features or functions of or the specifications of the +Software as they existed as of the execution of this Agreement. + + +(c)Title. Licensor represents and warrants that it is the exclusive owner of +all copyright/ intellectual property in the Software (including the Source +Code) and has good and marketable title to the Software (including the Source +Code) free and clear of all liens, claims and encumbrances of any nature +whatsoever (collectively, "Liens"). Licensor's grant of license and rights to +Licensee hereunder does not, and will not infringe any third party's property, +intellectual property or personal rights. + + +5.TERM. + +(a)Subject to Licensee's payment obligations, this Agreement shall commence as +on the date of making payment of the Software by the Licensee to the Licensor, +and shall continue until terminated by either party. + +(b)The Licensor retains the right to terminate the license at any time, if the +Licensee is not abiding by any of the terms of the Agreement. The Licensee may +terminate the Agreement at any time at its own discretion by uninstalling the +Software and /or by destroying the said Software (or any copies thereof). +However, the Licensee shall not be entitled to seek any refund of the amount +paid by it to the Licensor, under any circumstances. + +(c)Survival. In the event this Agreement is terminated for any reason, the +provisions set forth in Sections 2(a), 2(b), and 2(c) shall survive. + + +6.INDEMNIFICATION. + +The Licensee release the Licensor from, and agree to indemnify, defend and +hold harmless the Licensor (and its officers, directors, employees, agents and +Affiliates) against, any claim, loss, damage, settlement, cost, taxes, expense +or other liability (including, without limitation, attorneys' fees) (each, a +"Claim") arising from or related to: (a) any actual or alleged breach of any +obligations in this Agreement; (b) any refund, adjustment, or return of +Software,(c) any claim for actual or alleged infringement of any Intellectual +Property Rights made by any third party or damages related thereto; or (d) +Taxes. + + +7.LIMITATION OF LIABILITY. + +The Licensor will not be liable for any direct, indirect, incidental, special, +consequential or exemplary damages, including but not limited to, damages for +loss of profits, goodwill, use, data or other intangible losses arising out of +or in connection with the Software, whether in contract, warranty, tort etc. ( +including negligence, software liability, any type of civil responsibility or +other theory or otherwise) to the Licensee or any other person for cost of +software, cover, recovery or recoupment of any investment made by the Licensee +or its affiliates in connection with this Agreement, or for any other loss of +profit, revenue, business, or data or punitive or consequential damages +arising out of or relating to this Agreement. Further, the aggregate liability +of the Licensor, arising out of or in connection with this Agreement or the +transactions contemplated hereby will not exceed at any time, or under any +circumstances, the total amounts received by the Licensor from the Licensee in +connection with the particular software giving rise to the claim. + + +8.FORCE MAJEURE. + +The Licensor will not be liable for any delay or failure to perform any of its +obligations under this Agreement by reasons, events or other matters beyond +its reasonable control. + + +9.RELATIONSHIP OF PARTIES. + +The Licensor and Licensee are independent legal entities, and nothing in this +Agreement will be construed to create a partnership, joint venture, +association of persons, agency, franchise, sales representative, or employment +relationship between the parties. The Licensee will have no authority to make +or accept any offers or representations on behalf of the Licensor. The +relationship between the parties is that of Licensor and Licensee only, and +the rights, duties, liabilities of each party shall be governed by this +Agreement. + + +10.MODIFICATION. + +The Licensor may amend any of the terms and conditions contained in this +Agreement at any time and solely at its discretion. Any changes will be +effective upon the posting of such changes on the Portal/ website, and the +Licensee is responsible for reviewing these changes and informing itself of +all applicable changes or notices. The continued use of a software by the +Licensee after posting of any changes by the Licensor, will constitute the +acceptance of such changes or modifications by the Licensee. + + +11.MISCELLANEOUS. + +(a)General Provisions. This Agreement: (i) may be amended only by a writing +signed by each of the parties; (ii) may be executed in several counterparts, +each of which shall be deemed an original but all of which shall constitute +one and the same instrument; (iii) contains the entire agreement of the +parties with respect to the transactions contemplated hereby and supersedes +all prior written and oral agreements, and all contemporaneous oral +agreements, relating to such transactions; (iv) shall be governed by, and +construed and enforced in accordance with, the laws of India; and (v) shall be +binding upon, and inure to the benefit of, the parties and their respective +successors and permitted assigns. Each of the parties hereby irrevocably +submits to the jurisdiction of the Courts at Delhi, India, for the purposes of +any action or proceeding arising out of or relating to this Agreement or the +subject matter hereof and brought by any other party. + +(b)Assignment. Except for the purpose of customization as mentioned in clause +2(b)(iv) above, Licensee cannot assign, pledge or otherwise transfer, whether +by operation of law or otherwise, this Agreement, or any of its obligations +hereunder, without the prior written consent of Licensor, which consent shall +not be unreasonably withheld. + +(c)Notices. Unless otherwise specifically provided herein, all notices, +consents, requests, demands and other communications required or permitted +hereunder: + +(i)shall be in writing; + +(ii)shall be sent by messenger, certified or registered mail/email, or +reliable express delivery service, to the appropriate address(es) set forth +below; and + +(iii)shall be deemed to have been given on the date of receipt by the +addressee, as evidenced by a receipt executed by the addressee (or a +responsible person in his or her office), the records of the Party delivering +such communication or a notice to the effect that such addressee refused to +claim or accept such communication, if sent by messenger, mail or express +delivery service. + +All such communications shall be sent to the following addresses or numbers, +or to such other addresses or numbers as any party may inform the others by +giving five days' prior notice: + +If to Webkul Software Pvt. Ltd.: + +Webkul Software Pvt. Ltd. +A-67, Sector 63, NOIDA – 201301, +Uttar Pradesh, India + +If to Licensee: +At the address mentioned by the Licensee +(at the time of placing order of generating Invoice) + +(d)Severability. It is the intent of the parties that the provisions of this +Agreement be enforced to the fullest extent permissible under the laws and +public policies of India in which enforcement hereof is sought. In +furtherance of the foregoing, each provision hereof shall be severable from +each other provision, and any provision hereof which is/ becomes unenforceable +shall be subject to the following: (i) if such provision is contrary to or +conflicts with any requirement of any statute, rule or regulation in effect, +then such requirement shall be incorporated into, or substituted for, such +unenforceable provision to the minimum extent necessary to make such provision +enforceable; (ii) the court, agency or arbitrator considering the matter is +hereby authorized to (or, if such court, agency or arbitrator is unwilling or +fails to do so, then the parties shall) amend such provision to the minimum +extent necessary to make such provision enforceable, and the parties hereby +consent to the entry of an order so amending such provision; and (iii) if +any such provision cannot be or is not reformed and made enforceable pursuant +to clause (i) or (ii) above, then such provision shall be ineffective to the +minimum extent necessary to make the remainder of this Agreement enforceable. +Any application of the foregoing provisions to any provision hereof shall not +effect the validity or enforceability of any other provision hereof. + +(e)By purchasing the Software, the Licensee acknowledge that it has read this +Agreement, and that it agrees to the content of the Agreement, its terms and +agree to use the Software in compliance with this Agreement. + +(f)The Licensor holds the sole copyright of the Software. The Software or any +portion thereof is a copyrightable matter and is liable to be protected by the +applicable laws. Copyright infringement in any manner can lead to prosecution +according to the current law. The Licensor reserves the right to revoke the +license of any user who is not holding any license or is holding an invalid +license. + +(g)This Agreement gives the right to use only one copy of the Software on one +domain solely for the own personal or business use of the Licensee, subject to +all the terms and conditions of this Agreement. A separate License has to be +purchased for each new Software installation. Any distribution of the Software +without the written consent of the Licensor (including non-commercial +distribution) is regarded as violation of this Agreement, and will entail +immediate termination of the Agreement and may invite liability, both civil +and criminal, as per applicable laws. + +(h)The Licensor reserves the rights to publish a selected list of users/ +Licensees of its Software, and no permission of any Licensee is needed in this +regard. The Licensee agrees that the Licensor may, in its sole discretion, +disclose or make available any information provided or submitted by the +Licensee or related to it under this Agreement to any judicial, +quasi-judicial, governmental, regulatory or any other authority as may be +required by the Licensor to co-operate and / or comply with any of their +orders, instructions or directions or to fulfill any requirements under +applicable Laws. + +(i)If the Licensee continues to use the Software even after the sending of the +notice by the Licensor for termination, the Licensee agree to accept an +injunction to restrain itself from its further use, and to pay all costs ( +including but not limited to reasonable attorney fees) to enforce injunction +or to revoke the License, and any damages suffered by the Licensor because of +the misuse of the Software by the Licensee. + + +12.ARBITRATION. + +If any dispute arises between the Licensor and the Licensee at any time, in +connection with the validity, interpretation, implementation or alleged breach +of any provision of this Agreement, the same shall be referred to a sole +Arbitrator who shall be an independent and neutral third party appointed +exclusively by the Licensor. The Licensee shall not object to the appointment +of the Arbitrator so appointed by the Licensor. The place of arbitration shall +be Delhi, India. The Arbitration & Conciliation Act, 1996 as amended by The +Arbitration & Conciliation (Amendment) Act, 2015, shall govern the +arbitration proceedings. The arbitration proceedings shall be held in the +English language. + + +This document is an electronic record in terms of Information Technology Act, +2000 and the amended provisions pertaining to electronic records in various +statutes as amended by the Information Technology Act, 2000. This electronic +record is generated by a computer system and does not require any physical or +digital signatures. \ No newline at end of file diff --git a/pos_receipt_design/__init__.py b/pos_receipt_design/__init__.py new file mode 100644 index 0000000..196c950 --- /dev/null +++ b/pos_receipt_design/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +################################################################################# +# +# Copyright (c) 2016-Present Webkul Software Pvt. Ltd. () +# See LICENSE file for full copyright and licensing details. +# License URL : +# +################################################################################# +from . import models + +def pre_init_check(cr): + from odoo.service import common + from odoo.exceptions import Warning + version_info = common.exp_version() + server_serie =version_info.get('server_serie') + if server_serie!='15.0': + raise Warning('Module support Odoo series 15.0 found {}.'.format(server_serie)) + return True diff --git a/pos_receipt_design/__manifest__.py b/pos_receipt_design/__manifest__.py new file mode 100644 index 0000000..ffd143e --- /dev/null +++ b/pos_receipt_design/__manifest__.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +################################################################################# +# Author : Webkul Software Pvt. Ltd. () +# Copyright(c): 2015-Present Webkul Software Pvt. Ltd. +# All Rights Reserved. +# +# +# +# This program is copyright property of the author mentioned above. +# You can`t redistribute it and/or modify it. +# +# +# You should have received a copy of the License along with this program. +# If not, see +################################################################################# +{ + "name" : "POS Receipt Design", + "summary" : """This module allows to make custom POS Receipt.""", + "category" : "Point Of Sale", + "version" : "1.0.2", + "author" : "Webkul Software Pvt. Ltd.", + "license" : "Other proprietary", + "website" : "https://store.webkul.com", + "description" : """Odoo POS Receipt Design + Custom Receipt + Design Receipt + Custom XML Receipt + POS Receipt + POS Ticket""", + "live_test_url" : "http://odoodemo.webkul.com/?module=pos_receipt_design&custom_url=/pos/auto", + "depends" : ['point_of_sale'], + "data" : [ + 'security/ir.model.access.csv', + 'demo/demo.xml', + 'views/pos_config_view.xml', + 'views/receipt_design_view.xml', + ], + "assets" : { + 'point_of_sale.assets': [ + "/pos_receipt_design/static/src/js/models.js", + ], + }, + "qweb" : ['static/src/xml/pos.xml'], + "images" : ['static/description/Odoo_POS-Receipt-Design_POS-Receipt-Design-Banner.png'], + "application" : True, + "installable" : True, + "auto_install" : False, + "price" : 79, + "currency" : "USD", + "pre_init_hook" : "pre_init_check", +} \ No newline at end of file diff --git a/pos_receipt_design/demo/demo.xml b/pos_receipt_design/demo/demo.xml new file mode 100644 index 0000000..3e76260 --- /dev/null +++ b/pos_receipt_design/demo/demo.xml @@ -0,0 +1,18 @@ + + + + + + + + + + \ No newline at end of file diff --git a/pos_receipt_design/models/__init__.py b/pos_receipt_design/models/__init__.py new file mode 100644 index 0000000..801d354 --- /dev/null +++ b/pos_receipt_design/models/__init__.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +################################################################################# +# +# Copyright (c) 2016-Present Webkul Software Pvt. Ltd. () +# See LICENSE file for full copyright and licensing details. +# License URL : +# +################################################################################# +from . import pos_config +from . import receipt_design diff --git a/pos_receipt_design/models/pos_config.py b/pos_receipt_design/models/pos_config.py new file mode 100644 index 0000000..8b4b26a --- /dev/null +++ b/pos_receipt_design/models/pos_config.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +################################################################################# +# +# Copyright (c) 2016-Present Webkul Software Pvt. Ltd. () +# See LICENSE file for full copyright and licensing details. +# License URL : +# +################################################################################# +from odoo import api, fields, models, _ +import logging +_logger = logging.getLogger(__name__) + +class PosConfig(models.Model): + _inherit = 'pos.config' + + use_custom_receipt = fields.Boolean(string="Use Custom Receipt") + receipt_design_id = fields.Many2one('receipt.design', string="Receipt Design") \ No newline at end of file diff --git a/pos_receipt_design/models/receipt_design.py b/pos_receipt_design/models/receipt_design.py new file mode 100644 index 0000000..66b6729 --- /dev/null +++ b/pos_receipt_design/models/receipt_design.py @@ -0,0 +1,606 @@ +# -*- coding: utf-8 -*- +################################################################################# +# +# Copyright (c) 2016-Present Webkul Software Pvt. Ltd. () +# See LICENSE file for full copyright and licensing details. +# License URL : +# +################################################################################# +from odoo import api, fields, models, _ + +class ReceiptDesign(models.Model): + _name = "receipt.design" + _rec_name = "name" + + name = fields.Char(string="Name") + receipt_design = fields.Text(string='Description', required=True) + + @api.model + def _create_receipt_design_1(self): + record_data = {} + record_data['name'] = "Receipt Design 1" + record_data['receipt_design'] = """ +
+
+
+
+
+ + Logo +
+
+
+ +

+ +

+
+ +
+
+ +
Tel:
+
+ +
+
+ + + + +
+
+
+
+
+ +
+
+
Receipt :
+
+
Date : + + + + + + +
+
+ +
Client :
+
+
+ +
+
Served by
+
+
+ +
+
+
+ + + + + + + + + + + + + +
ProductQtyUnit PriceAmount
+ + +
+ % Discount +
+
+
+
+
+
+ + + +
+
Subtotal :
+ +
+ + +
+
+
+ +
+
+ TOTAL : + +
+
+ + +
+ Discounts + +
+
+
+ + +
+ + +
+
+
+ Total Taxes : + +
+
+
+
+
+
+ + +
+ + +
+
+
+
+ CHANGE + +
+
+
+ """ + record_id = self.create(record_data) + pos_config_id = self.env.ref('point_of_sale.pos_config_main') + if record_id and pos_config_id: + pos_config_id.use_custom_receipt = True + pos_config_id.receipt_design_id = record_id.id + + @api.model + def _create_receipt_design_2(self): + record_data = {} + record_data['name'] = "Receipt Design 2" + record_data['receipt_design'] = """ +
+
+ + + + + + +
+
+
+
+ Phone:
+
+
+ User:
+
+
+ +
+ +
+
+
+ + + + + + + + + + + +
+ + +
+ % discount +
+
+
+
+
+ +
+
+
+ +
+
+
+ + + +
+
Subtotal
+ +
+ + +
+
+
+ +
+
+ TOTAL + +
+

+ + +
+ + +
+
+
+
+ CHANGE + +
+
+ + +
+ Discounts + +
+
+ + +
+ + +
+
+
+ Total Taxes + +
+
+ """ + self.create(record_data) + + @api.model + def _create_receipt_design_3(self): + record_data = {} + record_data['name'] = "Receipt Design 3" + record_data['receipt_design'] = """ +
+
+
+ Phone:
+
+
+ User :
+
+
+
+ Date : + + + + + + +
+
+
+ Order :
+
+
+
+ Cashier :
+
+
+ +
+ +
+
+
+
+ + + + + + + + + + + + + + + + +
ProductQtyAmount
+ + +
+ % discount +
+
+
+ + + +
+
+
+
+ + + +
+
Subtotal :
+ +
+ + +
+
+
+ +
+
+ TOTAL : + +
+

+
+ + +
+ + +
+
+
+
+ CHANGE : + +
+
+ + +
+ Discounts : + +
+
+ + +
+ + +
+
+
+ Total Taxes : + +
+
+ """ + self.create(record_data) + + @api.model + def _create_receipt_design_4(self): + record_data = {} + record_data['name'] = "Receipt Design 4" + record_data['receipt_design'] = """ +
+
+ + + + + + +
+
+
+
+
+
+
+ Phone:
+
+
+ User:
+
+
+ +
+ +
+
+
+
+ + + + + + + + + + + +
+ + +
+ % discount +
+
+
+
+
+ +
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + +
Subtotal: + +
+ +
Discount: + +
Total: + +
+
+ + + + + + + +
+ + + +
+
+ + +
Change: + +
+ +
+
+ +
+
+
""" + self.create(record_data) \ No newline at end of file diff --git a/pos_receipt_design/security/ir.model.access.csv b/pos_receipt_design/security/ir.model.access.csv new file mode 100644 index 0000000..dbbefcf --- /dev/null +++ b/pos_receipt_design/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_receipt_design_user,receipt.design,model_receipt_design,point_of_sale.group_pos_user,1,0,0,0 +access_receipt_design_manager,receipt.design,model_receipt_design,point_of_sale.group_pos_manager,1,1,1,1 diff --git a/pos_receipt_design/static/description/Buttons.png b/pos_receipt_design/static/description/Buttons.png new file mode 100644 index 0000000..8749b54 Binary files /dev/null and b/pos_receipt_design/static/description/Buttons.png differ diff --git a/pos_receipt_design/static/description/Icon-2.png b/pos_receipt_design/static/description/Icon-2.png new file mode 100644 index 0000000..43c3345 Binary files /dev/null and b/pos_receipt_design/static/description/Icon-2.png differ diff --git a/pos_receipt_design/static/description/Icon-3 (1).png b/pos_receipt_design/static/description/Icon-3 (1).png new file mode 100644 index 0000000..9271cc6 Binary files /dev/null and b/pos_receipt_design/static/description/Icon-3 (1).png differ diff --git a/pos_receipt_design/static/description/Illustration-2.png b/pos_receipt_design/static/description/Illustration-2.png new file mode 100644 index 0000000..9fc70cf Binary files /dev/null and b/pos_receipt_design/static/description/Illustration-2.png differ diff --git a/pos_receipt_design/static/description/Odoo_POS-Receipt-Design_POS-Receipt-Design-Banner.png b/pos_receipt_design/static/description/Odoo_POS-Receipt-Design_POS-Receipt-Design-Banner.png new file mode 100644 index 0000000..c983629 Binary files /dev/null and b/pos_receipt_design/static/description/Odoo_POS-Receipt-Design_POS-Receipt-Design-Banner.png differ diff --git a/pos_receipt_design/static/description/Odoo_POS-Receipt-Design_POS-Receipt-Design.png b/pos_receipt_design/static/description/Odoo_POS-Receipt-Design_POS-Receipt-Design.png new file mode 100644 index 0000000..9f814f9 Binary files /dev/null and b/pos_receipt_design/static/description/Odoo_POS-Receipt-Design_POS-Receipt-Design.png differ diff --git a/pos_receipt_design/static/description/booking-commerce.svg b/pos_receipt_design/static/description/booking-commerce.svg new file mode 100644 index 0000000..c4ce0da --- /dev/null +++ b/pos_receipt_design/static/description/booking-commerce.svg @@ -0,0 +1,24 @@ + + + + support/booking-commerce + Created with Sketch. + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pos_receipt_design/static/description/button.png b/pos_receipt_design/static/description/button.png new file mode 100644 index 0000000..43cf10b Binary files /dev/null and b/pos_receipt_design/static/description/button.png differ diff --git a/pos_receipt_design/static/description/icon-1 (1).png b/pos_receipt_design/static/description/icon-1 (1).png new file mode 100644 index 0000000..d39430b Binary files /dev/null and b/pos_receipt_design/static/description/icon-1 (1).png differ diff --git a/pos_receipt_design/static/description/icon-user-guide.png b/pos_receipt_design/static/description/icon-user-guide.png new file mode 100644 index 0000000..6f27c93 Binary files /dev/null and b/pos_receipt_design/static/description/icon-user-guide.png differ diff --git a/pos_receipt_design/static/description/icon-youtube.png b/pos_receipt_design/static/description/icon-youtube.png new file mode 100644 index 0000000..cae988a Binary files /dev/null and b/pos_receipt_design/static/description/icon-youtube.png differ diff --git a/pos_receipt_design/static/description/icon.png b/pos_receipt_design/static/description/icon.png new file mode 100644 index 0000000..d573646 Binary files /dev/null and b/pos_receipt_design/static/description/icon.png differ diff --git a/pos_receipt_design/static/description/illustration-1.png b/pos_receipt_design/static/description/illustration-1.png new file mode 100644 index 0000000..cc7c396 Binary files /dev/null and b/pos_receipt_design/static/description/illustration-1.png differ diff --git a/pos_receipt_design/static/description/index.html b/pos_receipt_design/static/description/index.html new file mode 100644 index 0000000..f7dae9e --- /dev/null +++ b/pos_receipt_design/static/description/index.html @@ -0,0 +1,333 @@ + + + +
+
+
+

+ Odoo POS Receipt Design +

+
+ Design The POS Receipt as You Want! +
+
+
+
+

+ Odoo POS Receipt Design allows you to design the reciepts for your Odoo POS as you want to make it more informative as well as enticing. You can easily simply go to your Odoo backend and add easy XML code to make the receipt design more presentable. +

+
+
+

Information

+
+ user-guide +
+ User Guide +
+
+
+ https://webkul.com/blog/odoo-pos-receipt-design/ +
+
+
+
+

+ Do you want to enhance the monotonous receipt design?

+

+ Now, do it with some quick and easy steps. It's completely your call to design the receipt of your Odoo POS as you want.

+
+
+ +
+
+
+
+

+ Customize the design of Receipt as You want

+

+
+

+ Receipt is not just a document acknowledging that a person has received money or goods. +

+

+ However, you can design your receipt for promotions of your store as well as. +

+

+ Apart from promotions, it also helps you to build an impression in front of your customers. +

+
+

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

+ Easy Way to Enhance Receipt Design

+

+
+

+ You need to simply navigate in your Odoo backend and add easy XML code to make the receipt design more presentable. +

+
+

+ Hence, choose your colors or style it's all up to you. Moreover, you can select unique design for each POS shop. +

+
+

+
+
+
+
+ +
+ +
+

What do you get with Odoo POS Receipt Design? +

+
+
+
+
+
+ +
+
+ Design POS receipt as you want +
+
+
+
+
+
+ +
+
+ Add the XML code for the design +
+
+
+
+
+
+ +
+
+ Set Unique Receipt design for each POS Shop +
+
+
+
+
+
+ +
+
+
+
+
+
+
+

Design Receipt with XML Code in Odoo Backend

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

Select Receipt design for Odoo POS

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

Freshly Designed Odoo POS Receipt

+
+
+
+
+ + receipt 1 + +
+
+ + receipt 2 + +
+
+ + receipt 3 + +
+
+ + receipt 4 + +
+
+
+
+
+
+
+
+
+ +
+
+
+

Help and Support

+

Get Immediate support for any of your query

+
+
+

You will get 90 days free support for any doubt, queries, and bug fixing (excluding data recovery) or any type of issue related to this module.

+
+
+
+
+ mail +
+
+

Write a mail to us:

+ support@webkul.com +

Any queries or want any extra features? Just drop a mail to our support.

+
+ +
+
+
+
+
+ support-icon +
+
+

Get in touch with our Expert:

+ https://webkul.uvdesk.com/en/customer/create-ticket/ +

Have any technical queries, want extra features, or anything else? Our team is here to answer all your questions. Just Raise A Support Ticket.

+
+
+
+
+
+
+
+
+ + + +
+
+
diff --git a/pos_receipt_design/static/description/mail.png b/pos_receipt_design/static/description/mail.png new file mode 100644 index 0000000..8f5913e Binary files /dev/null and b/pos_receipt_design/static/description/mail.png differ diff --git a/pos_receipt_design/static/description/receipt_1.jpg b/pos_receipt_design/static/description/receipt_1.jpg new file mode 100644 index 0000000..63f20a0 Binary files /dev/null and b/pos_receipt_design/static/description/receipt_1.jpg differ diff --git a/pos_receipt_design/static/description/receipt_2.jpg b/pos_receipt_design/static/description/receipt_2.jpg new file mode 100644 index 0000000..b65e531 Binary files /dev/null and b/pos_receipt_design/static/description/receipt_2.jpg differ diff --git a/pos_receipt_design/static/description/receipt_3.jpg b/pos_receipt_design/static/description/receipt_3.jpg new file mode 100644 index 0000000..ff230bf Binary files /dev/null and b/pos_receipt_design/static/description/receipt_3.jpg differ diff --git a/pos_receipt_design/static/description/receipt_4.jpg b/pos_receipt_design/static/description/receipt_4.jpg new file mode 100644 index 0000000..3aea460 Binary files /dev/null and b/pos_receipt_design/static/description/receipt_4.jpg differ diff --git a/pos_receipt_design/static/description/receipt_screen1.png b/pos_receipt_design/static/description/receipt_screen1.png new file mode 100644 index 0000000..aade7b0 Binary files /dev/null and b/pos_receipt_design/static/description/receipt_screen1.png differ diff --git a/pos_receipt_design/static/description/receipt_screen2.png b/pos_receipt_design/static/description/receipt_screen2.png new file mode 100644 index 0000000..be7b3ed Binary files /dev/null and b/pos_receipt_design/static/description/receipt_screen2.png differ diff --git a/pos_receipt_design/static/description/support-icon.png b/pos_receipt_design/static/description/support-icon.png new file mode 100644 index 0000000..9c1f7e4 Binary files /dev/null and b/pos_receipt_design/static/description/support-icon.png differ diff --git a/pos_receipt_design/static/description/uvdesk.svg b/pos_receipt_design/static/description/uvdesk.svg new file mode 100644 index 0000000..ecfb0a0 --- /dev/null +++ b/pos_receipt_design/static/description/uvdesk.svg @@ -0,0 +1,23 @@ + + + + support/uvdesk + Created with Sketch. + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pos_receipt_design/static/src/js/models.js b/pos_receipt_design/static/src/js/models.js new file mode 100644 index 0000000..78e33a5 --- /dev/null +++ b/pos_receipt_design/static/src/js/models.js @@ -0,0 +1,122 @@ +/* Copyright (c) 2016-Present Webkul Software Pvt. Ltd. () */ +/* See LICENSE file for full copyright and licensing details. */ +/* License URL : */ + +odoo.define('wk_pos_invoice_offline.models', function (require) { + "use strict" + var models = require('point_of_sale.models'); + var PosDB = require("point_of_sale.DB"); + const Registries = require('point_of_sale.Registries'); + const OrderReceipt = require('point_of_sale.OrderReceipt'); + const AbstractReceiptScreen = require('point_of_sale.AbstractReceiptScreen'); + const { nextFrame } = require('point_of_sale.utils'); + + models.load_models([{ + model: 'receipt.design', + loaded: function(self, designs) { + self.db.all_designs = designs; + self.db.receipt_by_id = {}; + designs.forEach(function(design){ + self.db.receipt_by_id[design.id] = design; + }); + }, + }]) + + PosDB.include({ + init: function(options){ + var self = this; + this._super(options); + this.receipt_design = null; + }, + }) + + // Inherit AbstractReceiptScreen + const PosResAbstractReceiptScreen = (AbstractReceiptScreen) => + class extends AbstractReceiptScreen{ + async _printReceipt() { + var self = this; + if(!self.env.pos.config.use_custom_receipt){ + var data = super._printReceipt(); + return data + } else { + if (self.env.pos.proxy.printer) { + var receipt_design_id = self.env.pos.config.receipt_design_id[0] + var receipt_design = self.env.pos.db.receipt_by_id[receipt_design_id].receipt_design + var order = self.env.pos.get_order(); + + var data = { widget: self.env, + pos: order.pos, + order: order, + receipt: order.export_for_printing(), + orderlines: order.get_orderlines(), + paymentlines: order.get_paymentlines(), }; + + var parser = new DOMParser(); + var xmlDoc = parser.parseFromString(receipt_design,"text/xml"); + + var s = new XMLSerializer(); + var newXmlStr = s.serializeToString(xmlDoc); + + //Works using the DOMParser + var qweb = new QWeb2.Engine(); + qweb.add_template(''+newXmlStr+''); + + var receipt = qweb.render('receipt_design',data); + + const printResult = await self.env.pos.proxy.printer.print_receipt(receipt); + if (printResult.successful) { + return true; + } else { + const { confirmed } = await self.showPopup('ConfirmPopup', { + title: printResult.message.title, + body: 'Do you want to print using the web printer?', + }); + if (confirmed) { + await nextFrame(); + return await self._printWeb(); + } + return false; + } + } else { + return await self._printWeb(); + } + } + } + } + Registries.Component.extend(AbstractReceiptScreen, PosResAbstractReceiptScreen); + + // Inherit OrderReceipt + const PosResOrderReceipt = (OrderReceipt) => + class extends OrderReceipt{ + mounted(){ + var self = this; + super.mounted(); + if(self.env.pos.config.use_custom_receipt){ + var receipt_design_id = self.env.pos.config.receipt_design_id[0] + var receipt_design = self.env.pos.db.receipt_by_id[receipt_design_id].receipt_design + var order = self._receiptEnv.order; + + var data = { widget: self.env, + pos: order.pos, + order: order, + receipt: order.export_for_printing(), + orderlines: order.get_orderlines(), + paymentlines: order.get_paymentlines(), }; + + var parser = new DOMParser(); + var xmlDoc = parser.parseFromString(receipt_design,"text/xml"); + + var s = new XMLSerializer(); + var newXmlStr = s.serializeToString(xmlDoc); + + //Works using the DOMParser + var qweb = new QWeb2.Engine(); + qweb.add_template(''+newXmlStr+''); + + var receipt = qweb.render('receipt_design',data) ; + $('div.pos-receipt').replaceWith(receipt); + } + } + } + Registries.Component.extend(OrderReceipt, PosResOrderReceipt); +}); \ No newline at end of file diff --git a/pos_receipt_design/views/pos_config_view.xml b/pos_receipt_design/views/pos_config_view.xml new file mode 100644 index 0000000..6fad7ed --- /dev/null +++ b/pos_receipt_design/views/pos_config_view.xml @@ -0,0 +1,31 @@ + + + + + + + + pos.config.form + pos.config + + + +
+
+ +
+
+
+
+
+
+
+
+
diff --git a/pos_receipt_design/views/receipt_design_view.xml b/pos_receipt_design/views/receipt_design_view.xml new file mode 100644 index 0000000..971fac7 --- /dev/null +++ b/pos_receipt_design/views/receipt_design_view.xml @@ -0,0 +1,43 @@ + + + + + + + + Receipt Design + receipt.design + form + +
+ + + + + + +
+
+
+ + + Receipt Design + receipt.design + tree + + + + + + + + + Receipt Designs + receipt.design + tree,form + + + + +
+
\ No newline at end of file