Browse Source

[ADD] Initial Commit 'customer_product_qrcode'

pull/129/head
Ajmalcybrosys 6 years ago
parent
commit
f3b5e68371
  1. 30
      customer_product_qrcode/README.rst
  2. 12
      customer_product_qrcode/__init__.py
  3. 45
      customer_product_qrcode/__manifest__.py
  4. 6
      customer_product_qrcode/doc/RELEASE_NOTES.md
  5. 2
      customer_product_qrcode/models/__init__.py
  6. 152
      customer_product_qrcode/models/models.py
  7. 2
      customer_product_qrcode/report/__init__.py
  8. 17
      customer_product_qrcode/report/paperformat.xml
  9. 20
      customer_product_qrcode/report/parser.py
  10. 35
      customer_product_qrcode/report/report.xml
  11. 48
      customer_product_qrcode/report/template.xml
  12. BIN
      customer_product_qrcode/static/description/banner.jpg
  13. BIN
      customer_product_qrcode/static/description/customer-product-cybrosys-1.png
  14. BIN
      customer_product_qrcode/static/description/customer-product-cybrosys-2.png
  15. BIN
      customer_product_qrcode/static/description/customer-product-cybrosys-3.png
  16. BIN
      customer_product_qrcode/static/description/customer-product-cybrosys-4.png
  17. BIN
      customer_product_qrcode/static/description/cybro-service.png
  18. BIN
      customer_product_qrcode/static/description/cybro_logo.png
  19. BIN
      customer_product_qrcode/static/description/icon.png
  20. BIN
      customer_product_qrcode/static/description/image1.jpg
  21. BIN
      customer_product_qrcode/static/description/image2.jpg
  22. BIN
      customer_product_qrcode/static/description/image3.jpg
  23. BIN
      customer_product_qrcode/static/description/image4.png
  24. 362
      customer_product_qrcode/static/description/index.html
  25. 90
      customer_product_qrcode/views/view.xml

30
customer_product_qrcode/README.rst

@ -0,0 +1,30 @@
=====================================
Customer and Product QRCode Generator
=====================================
The Customer and Product QRCode Generator Helps You to Generate Unique
QR Codes to your Products or Customers
Tech
====
* [Python] - Models
* [XML] - Odoo views
Installation
============
- www.odoo.com/documentation/11.0/setup/install.html
- Install our custom addon
Bug Tracker
===========
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
Credits
=======
* Cybrosys Techno Solutions <https://www.cybrosys.com>
Maintainer
----------
This module is maintained by Cybrosys Technologies.
For support and more information, please visit https://www.cybrosys.com.

12
customer_product_qrcode/__init__.py

@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
from . import models
from . import report
from odoo import api, SUPERUSER_ID
def _set_qr(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
for record in env['product.product'].search([]):
name = record.name.replace(" ", "")
record.sequence = 'DEF' + name.upper()+str(record.id)
record.generate_qr()

45
customer_product_qrcode/__manifest__.py

@ -0,0 +1,45 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2018-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Muhammed Nishad T K
#
# This program is free software: you can modify
# it under the terms of the GNU LGPL-3 as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 for more details.
#
# You should have received a copy of the LGPL-3
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Customer and Product QR Code Generator',
'version': '12.0.1.0.0',
'summary': 'Generate Unique QR Codes for Customers and Products',
'category': 'Extra Tools',
'author': 'Cybrosys Techno solutions',
'maintainer': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': 'https://www.cybrosys.com',
'depends': ['base', 'sale', 'stock'],
'data': [
'report/paperformat.xml',
'report/report.xml',
'views/view.xml',
'report/template.xml',
],
'images': ['static/description/banner.jpg'],
'installable': True,
'application': False,
'auto_install': False,
'license': 'LGPL-3',
'post_init_hook': '_set_qr'
}

6
customer_product_qrcode/doc/RELEASE_NOTES.md

@ -0,0 +1,6 @@
## Module <customer_product_qrcode>
#### 19.10.2019
#### Version 12.0.1.0.0
##### ADD
- Initial commit for Customer and Product QR Module

2
customer_product_qrcode/models/__init__.py

@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
from . import models

152
customer_product_qrcode/models/models.py

@ -0,0 +1,152 @@
# -*- coding: utf-8 -*-
try:
import qrcode
except ImportError:
qrcode = None
try:
import base64
except ImportError:
base64 = None
from io import BytesIO
from odoo import models, fields, api, _, SUPERUSER_ID
from odoo.exceptions import UserError
class Partners(models.Model):
_inherit = 'res.partner'
sequence = fields.Char(string="QR Sequence", readonly=True)
qr = fields.Binary(string="QR Code")
def init(self):
for record in self.env['res.partner'].search([('customer', '=', True)]):
name = record.name.replace(" ", "")
record.sequence = 'DEF' + name.upper()+str(record.id)
@api.model
def create(self, vals):
prefix = str(self.env['ir.config_parameter'].sudo().get_param('customer_product_qr.config.customer_prefix'))
if not prefix:
raise UserError(_('Set A Customer Prefix In General Settings'))
seq = prefix + self.env['ir.sequence'].next_by_code('res.partner') or '/'
vals['sequence'] = seq
return super(Partners, self).create(vals)
@api.depends('sequence')
def generate_qr(self):
if qrcode and base64:
if not self.sequence:
prefix = str(self.env['ir.config_parameter'].sudo().get_param('customer_product_qr.config.customer_prefix'))
if not prefix:
raise UserError(_('Set A Customer Prefix In General Settings'))
self.sequence = prefix + self.env['ir.sequence'].next_by_code('res.partner') or '/'
qr = qrcode.QRCode(
version=1,
error_correction=qrcode.constants.ERROR_CORRECT_L,
box_size=10,
border=4,
)
qr.add_data(self.sequence)
qr.make(fit=True)
img = qr.make_image()
temp = BytesIO()
img.save(temp, format="PNG")
qr_image = base64.b64encode(temp.getvalue())
self.write({'qr': qr_image})
return self.env.ref('customer_product_qrcode.print_qr').report_action(self, data={'data': self.id, 'type': 'cust'})
else:
raise UserError(_('Necessary Requirements To Run This Operation Is Not Satisfied'))
@api.multi
def get_partner_by_qr(self, **args):
return self.env['res.partner'].search([('sequence', '=', self.id), ], limit=1).id
class Products(models.Model):
_inherit = 'product.product'
sequence = fields.Char(string="QR Sequence", readonly=True)
qr = fields.Binary(string="QR Code")
@api.model
def create(self, vals):
prefix = str(self.env['ir.config_parameter'].sudo().get_param('customer_product_qr.config.product_prefix'))
if not prefix:
raise UserError(_('Set A Product Prefix In General Settings'))
seq = prefix + self.env['ir.sequence'].next_by_code('product.product') or '/'
vals['sequence'] = seq
qr = qrcode.QRCode(
version=1,
error_correction=qrcode.constants.ERROR_CORRECT_L,
box_size=10,
border=4,
)
qr.add_data(vals['sequence'])
qr.make(fit=True)
img = qr.make_image()
temp = BytesIO()
img.save(temp, format="PNG")
qr_image = base64.b64encode(temp.getvalue())
vals.update({'qr': qr_image})
return super(Products, self).create(vals)
@api.depends('sequence')
def generate_qr(self):
if not self.sequence:
prefix = str(self.env['ir.config_parameter'].sudo().get_param('customer_product_qr.config.product_prefix'))
if not prefix:
raise UserError(_('Set A Product Prefix In General Settings'))
self.sequence = prefix + self.env['ir.sequence'].next_by_code('product.product') or '/'
qr = qrcode.QRCode(
version=1,
error_correction=qrcode.constants.ERROR_CORRECT_L,
box_size=10,
border=4,
)
qr.add_data(self.sequence)
qr.make(fit=True)
img = qr.make_image()
temp = BytesIO()
img.save(temp, format="PNG")
qr_image = base64.b64encode(temp.getvalue())
self.write({'qr': qr_image})
return self.env.ref('customer_product_qrcode.print_qr1').report_action(self, data={'data': self.id, 'type': 'prod'})
@api.multi
def get_product_by_qr(self, **args):
return self.env['product.product'].search([('sequence', '=', self.id), ], limit=1).id
class ProductTemplate(models.Model):
_inherit = 'product.template'
def generate_qr(self):
return self.env.ref('customer_product_qrcode.print_qr1').report_action(self, data={'data': self.id, 'type': 'all'})
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
customer_prefix = fields.Char(string="Customer QR Prefix")
product_prefix = fields.Char(string="Product QR Prefix")
def get_values(self):
res = super(ResConfigSettings, self).get_values()
customer_prefix = self.env["ir.config_parameter"].get_param("customer_product_qr.config.customer_prefix")
product_prefix = self.env["ir.config_parameter"].get_param("customer_product_qr.config.product_prefix")
res.update({
'customer_prefix': customer_prefix if type(customer_prefix) else False,
'product_prefix': product_prefix if type(product_prefix) else False
}
)
return res
def set_values(self):
self.env['ir.config_parameter'].sudo().set_param('customer_product_qr.config.customer_prefix', self.customer_prefix)
self.env['ir.config_parameter'].sudo().set_param('customer_product_qr.config.product_prefix', self.product_prefix)

2
customer_product_qrcode/report/__init__.py

@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
from . import parser

17
customer_product_qrcode/report/paperformat.xml

@ -0,0 +1,17 @@
<odoo>
<record id="customer_product_qrcode.customer_badge_paperformat" model="report.paperformat">
<field name="name">PDF Report</field>
<field name="default" eval="False" />
<field name="format">custom</field>
<field name="page_height">100</field>
<field name="page_width">100</field>
<field name="orientation">Portrait</field>
<field name="margin_top">10</field>
<field name="margin_bottom">0</field>
<field name="margin_left">10</field>
<field name="margin_right">10</field>
<field name="header_line" eval="False" />
<field name="header_spacing">80</field>
<field name="dpi">90</field>
</record>
</odoo>

20
customer_product_qrcode/report/parser.py

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from odoo import models, api
from odoo.http import request
class CustomerBadge(models.AbstractModel):
_name = 'report.customer_product_qrcode.customer_qr_template'
@api.model
def _get_report_values(self, docids, data=None):
if data['type'] == 'cust':
dat = [request.env['res.partner'].browse(data['data'])]
print(dat)
elif data['type'] == 'all':
dat = [request.env['product.product'].search([('product_tmpl_id', '=', data['data'])])]
else:
dat = request.env['product.product'].browse(data['data'])
return {
'data': dat,
}

35
customer_product_qrcode/report/report.xml

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<report id="customer_product_qrcode.print_qr"
model="res.partner"
name="customer_product_qrcode.customer_qr_template"
file="customer_product_qrcode.customer_qr_template"
string="Product Badge"
report_type="qweb-pdf"
menu="False"
/>
<report id="customer_product_qrcode.print_qr1"
model="product.product"
name="customer_product_qrcode.customer_qr_template"
file="customer_product_qrcode.customer_qr_template"
string="Customer Badge"
report_type="qweb-pdf"
menu="False"
/>
<report id="customer_product_qrcode.print_qr2"
model="product.template"
name="customer_product_qrcode.customer_qr_template"
file="customer_product_qrcode.customer_qr_template"
string="Product Badge"
report_type="qweb-pdf"
menu="False"
/>
<record id="customer_product_qrcode.print_qr" model="ir.actions.report">
<field name="paperformat_id" ref="customer_product_qrcode.customer_badge_paperformat"/>
</record>
<record id="customer_product_qrcode.print_qr1" model="ir.actions.report">
<field name="paperformat_id" ref="customer_product_qrcode.customer_badge_paperformat"/>
</record>
</data>
</odoo>

48
customer_product_qrcode/report/template.xml

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<template id="customer_qr_template">
<t t-foreach="data" t-as="records">
<t t-foreach="records" t-as="record">
<t t-call="web.html_container">
<t t-call="web.internal_layout">
<style>
table{
border:1px solid black !important;
height:370px;
width:370px;
}
tr{
border:1px solid black !important;
}
td{
border:1px solid black !important;
font-size:30px;
}
</style>
<div class="page">
<center>
<table>
<tr>
<td style="text-align:center;">
<span t-esc="record.name" style="float:center;"/>
</td>
</tr>
<tr>
<td>
<center><img t-att-src="'data:image/png;base64,%s' % to_text(record.qr)"
style="height:280px;width:280px;float:center;"/><br/>
<span t-esc="record.sequence" style="float:center;"/>
</center>
</td>
</tr>
</table>
</center>
</div>
</t>
</t>
</t>
</t>
</template>
</data>
</odoo>

BIN
customer_product_qrcode/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 KiB

BIN
customer_product_qrcode/static/description/customer-product-cybrosys-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 KiB

BIN
customer_product_qrcode/static/description/customer-product-cybrosys-2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 KiB

BIN
customer_product_qrcode/static/description/customer-product-cybrosys-3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 KiB

BIN
customer_product_qrcode/static/description/customer-product-cybrosys-4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

BIN
customer_product_qrcode/static/description/cybro-service.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

BIN
customer_product_qrcode/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
customer_product_qrcode/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
customer_product_qrcode/static/description/image1.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
customer_product_qrcode/static/description/image2.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
customer_product_qrcode/static/description/image3.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
customer_product_qrcode/static/description/image4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

362
customer_product_qrcode/static/description/index.html

@ -0,0 +1,362 @@
<section class="oe_container" style="background-image:url(https://www.cybrosys.com/images/odoo-index-header-banner.png);background-repeat:no-repeat;background-size:100%;padding: 4% 0% 2% 15%;background-position-y: -107px;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="font-size: 35px;color: #fff;font-weight: 900;text-transform: uppercase;text-align: left;margin: 0;margin-bottom: 16px;">
Customer and Product QR Code Generator
</h2>
<h3 class="oe_slogan" style="font-size: 25px;color: #fff;font-weight: 600;text-align: left;opacity: 1;margin: 0 !important;">
Generate Unique QR Codes for Customers and Products
</h3>
<h5 class="oe_slogan" style="text-align: left;background: #fff;width: 293px;padding: 10px;color: #080808 !important;opacity: 1 !important;font-weight: 600;font-size: 20px;">
<a style="color: #080808 !important;" href="https://www.cybrosys.com" target="_blank">Cybrosys Technologies</a>
</h5>
<a style="color: #080808 !important;" href="https://www.cybrosys.com" target="_blank">
<div style="width: 215px;margin-left: 57%;text-align: center;background: #ffffff;height: 215px;border-radius: 100%;display: flex;justify-content: center;align-items: center;box-shadow: 0 0 12px 4px #00000059;">
<img src="https://www.cybrosys.com/images/cybro-logo-oca.png" alt="cybrosys technologies" style="width: 180px;"/>
</div>
</a>
</div>
</section>
<section class="oe_container" style="padding: 1% 0% 3% 15%;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
Overview
</h2>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
If QR codes aren't the part of your current marketing strategy, you might be missing the large chunks of benefits. Use QR codes to generate customer interest, drive traffic, and increase sales via print, online, or email. The Customer and Product QR Code Generator allows the users to scan QR codes simply and easily from within your browser.
This module helps to set up a unique QR code to both your products and customers.
</h3>
</div>
</section>
<section class="oe_container" style="background-image:url(https://www.cybrosys.com/images/odoo-index-banner1.png); background-repeat:no-repeat; background-size:cover;padding: 10% 0% 25% 15%;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
Features
</h2>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
Unique QR code for products and customers.
</h3>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
Enables to configure a word prefix to QR code for unique identification.
</h3>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
QR code for individual product variants.
</h3>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
QR code for whole product template variants.
</h3>
</div>
</section>
<section class="oe_container" style="padding: 3% 0% 0% 15%;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
Screenshots
</h2>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
Set the product and customer prefixes from General Settings Menu.
Set a Unique and Denotable Prefix to Your Customers.
</h3>
<div class="oe_row oe_spaced">
<img src="customer-product-cybrosys-1.png" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
Goto The Customer or Product Form.Click the Generate QR Button.
The QR Sequence will be generated and the QR Code will be printed as a PDF.
</h3>
<div class="oe_row oe_spaced">
<img src="customer-product-cybrosys-2.png" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
Set the product and customer prefixes from General Settings Menu.
Set a Unique and Denotable Prefix to Your Customers.
</h3>
<div class="oe_row oe_spaced">
<img src="customer-product-cybrosys-3.png" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
Each Customer or Product will have a unique qr sequence. Simply go to scan from menu bar and grant access to your device camera,
you’re ready to scan a QR code using your laptop or mobile devices
</h3>
<div class="oe_row oe_spaced">
<img src="customer-product-cybrosys-4.png" alt="" style="width: 95%;"/>
</div>
</div>
</section>
<section class="oe_container" style="padding: 7px 0% 0% 3%;">
<div class="oe_row oe_spaced">
<a style="color: #080808 !important;" href="https://apps.odoo.com/apps/modules/browse?search=cybrosys" target="_blank"><img src="https://www.cybrosys.com/images/view-more-apps.jpg" alt="cybrosys technologies" style="width: 100%;margin-bottom: 50px;"/></a>
</div>
</section>
<section class="oe_container" style="padding: 1% 0% 0% 3%;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
Our Services
</h2>
<div style="display:flex;padding-top: 20px;justify-content: space-between;">
<div style="flex-basis: 18%;">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;">
<a href="https://www.cybrosys.com/odoo-customization-and-installation/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-customization.png" style="width: 100%;border-radius: 100%;"/>
</a>
</div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/odoo-customization-and-installation/" target="_blank">
Odoo Customization
</a>
</h3>
</div>
<div style="flex-basis: 18%;">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;">
<a href="https://www.cybrosys.com/odoo-erp-implementation/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-erp-implementation.png" style="width: 100%;border-radius: 100%;"/>
</a>
</div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/odoo-erp-implementation/" target="_blank">
Odoo Implementation </a>
</h3>
</div>
<div style="flex-basis: 18%;">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;">
<a href="https://www.cybrosys.com/odoo-erp-integration/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-erp-integration.png" style="width: 100%;border-radius: 100%;"/>
</a>
</div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/odoo-erp-integration/" target="_blank">
Odoo Integration
</a>
</h3>
</div>
<div style="flex-basis: 18%;">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;">
<a href="https://www.cybrosys.com/odoo-erp-support/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-erp-support.png" style="width: 100%;border-radius: 100%;"/>
</a>
</div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/odoo-erp-support/" target="_blank">
Odoo Support</a>
</h3>
</div>
<div style="flex-basis: 18%;">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;">
<a href="https://www.cybrosys.com/hire-odoo-developer/" target="_blank">
<img src="https://www.cybrosys.com/images/hire-odoo-developer.png" style="width: 100%;border-radius: 100%;"/>
</a>
</div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/hire-odoo-developer/" target="_blank">
Hire Odoo Developers</a>
</h3>
</a>
</div>
</div>
</div>
</section>
<section class="oe_container" style="padding: 1% 0% 0% 3%;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
Our Industries
</h2>
<div style="display:flex;justify-content: space-between;flex-wrap:wrap;">
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/best-trading-erp/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-1.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/best-trading-erp/" target="_blank">
Trading
</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Easily procure and sell your products.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/manufacturing-erp-software/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-2.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/manufacturing-erp-software/" target="_blank">
Manufacturing</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Plan, track and schedule your operations.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/restaurant-management/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-3.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/restaurant-management/" target="_blank">
Restaurant</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Run your bar or restaurant methodical.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/pos/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-4.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/pos/" target="_blank">
POS</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Easy configuring and convivial selling.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/ecommerce-website/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-5.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 0px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/ecommerce-website/" target="_blank">
E-commerce & Website</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Mobile friendly, awe-inspiring product pages.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/hotel-management-erp/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-6.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/hotel-management-erp/" target="_blank">
Hotel Management</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
An all-inclusive hotel management application.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/education-erp-software/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-7.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/education-erp-software/" target="_blank">
Education</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
A Collaborative platform for educational management.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/service-management/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-8.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/service-management/" target="_blank">
Service Management</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Keep track of services and invoice accordingly.
</h3>
</div>
</div>
</div>
</div>
</section>
<section class="oe_container" style="background-image:url(https://www.cybrosys.com/images/odoo-index-footer-bg.png); background-repeat:no-repeat; background-size:100%;padding: 13% 0% 6% 0%;">
<div class="oe_slogan" style="margin-top:10px !important;margin-bottom: 0px;">
<div>
<a style="color: #5c5c5c !important;border-radius: 0;background: none;border: none;background: #fff;box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62, 57, 107, 0.05);border-radius: 30px;font-size: 12px;padding: 9px 26px;margin-right: 9px;width: 200px;text-transform: capitalize;" class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" href="mailto:odoo@cybrosys.com"><i class="fa fa-envelope"></i> Email us </a>
<a style="color: #5c5c5c !important;border-radius: 0;background: none;border: none;background: #fff;box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62, 57, 107, 0.05);border-radius: 30px;font-size: 12px;padding: 9px 26px;margin-right: 9px;width: 200px;text-transform: capitalize;" class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com/contact/"><i class="fa fa-phone"></i> Contact Us </a>
<a style="color: #5c5c5c !important;border-radius: 0;background: none;border: none;background: #fff;box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62, 57, 107, 0.05);border-radius: 30px;font-size: 12px;padding: 9px 26px;margin-right: 9px;width: 200px;text-transform: capitalize;" class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com/contact/"><i class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="https://www.cybrosys.com/images/logo.png" style="width: 190px; margin-bottom: 25px;margin-top: 30px;" class="center-block">
<div>
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px; ;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td>
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td>
</div>
</div>
</section>

90
customer_product_qrcode/views/view.xml

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<record id="partner_form_inherit" model="ir.ui.view">
<field name="name">res.partner.form.qr.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='toggle_active']" position="before">
<button name="generate_qr" type="object" class="btn-box" icon="fa-qrcode"><field name="sequence" invisible="1"/> Generate QR</button>
</xpath>
<field name="category_id" position="after">
<field name="sequence"/>
</field>
</field>
</record>
<record id="product_form_inherit" model="ir.ui.view">
<field name="name">product.product.form.qr.inherit</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='toggle_active']" position="before">
<button name="generate_qr" type="object" class="btn-box" icon="fa-qrcode"><field name="sequence" invisible="1"/> Generate QR</button>
</xpath>
<field name="categ_id" position="after">
<field name="sequence"/>
</field>
</field>
</record>
<record id="product_template_form_inherit" model="ir.ui.view">
<field name="name">product.template.form.qr.inherit</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='toggle_active']" position="before">
<button name="generate_qr" type="object" class="btn-box" icon="fa-qrcode">Generate QR</button>
</xpath>
</field>
</record>
<record id="settings_form_inherit_for_qr" model="ir.ui.view">
<field name="name">res.config.inherit.qr</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[hasclass('settings')]" position="inside">
<div class="app_settings_block" data-string="General Settings" string="General Settings" data-key="general_settings">
<div id="setup_qrcode">
<h2>Setup QRCode</h2>
<div class="row mt16 o_settings_container">
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_right_pane">
<label string="Prefixes" for="Prefixes"/>
<span class="fa fa-lg"/>
<div class="text-muted">
Set your unique prefix.
</div>
<div class="content-group">
<div class="mt16 row">
<label for="customer_prefix" class="col-xs-3 col-md-6 o_light_label"/>
<field name="customer_prefix" class="oe_inline"/>
<label for="product_prefix" class="col-xs-3 col-md-6 o_light_label"/>
<field name="product_prefix" class="oe_inline"/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</data>
<data noupdate="1">
<record id="customer_sequence_id" model="ir.sequence">
<field name="name">customer_sequence</field>
<field name="code">res.partner</field>
<field name="prefix"></field>
<field name="padding">5</field>
</record>
</data>
<data noupdate="1">
<record id="product_sequence_id" model="ir.sequence">
<field name="name">product_sequence</field>
<field name="code">product.product</field>
<field name="prefix"></field>
<field name="padding">5</field>
</record>
</data>
</odoo>
Loading…
Cancel
Save