@ -0,0 +1,53 @@ |
|||||
|
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg |
||||
|
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html |
||||
|
:alt: License: AGPL-3 |
||||
|
|
||||
|
Customized Barcode Generator |
||||
|
============================ |
||||
|
This module enables the user to print customized product labels. |
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
* No additional Configuration is needed. |
||||
|
|
||||
|
Company |
||||
|
------- |
||||
|
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
||||
|
|
||||
|
License |
||||
|
------- |
||||
|
Affero General Public License, v3.0 (AGPL v3). |
||||
|
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) |
||||
|
|
||||
|
Credits |
||||
|
------- |
||||
|
* Developers: Atul Ramesh Varma, |
||||
|
(V13) Sreenath, |
||||
|
(V14) Minhaj T, |
||||
|
(V15) Mekha K, |
||||
|
(V16) Sumith Sivan, |
||||
|
(V17) Jumana Haseen, |
||||
|
(V18) Aysha Shalin, |
||||
|
Contact : odoo@cybrosys.com |
||||
|
|
||||
|
Contacts |
||||
|
-------- |
||||
|
* Mail Contact : odoo@cybrosys.com |
||||
|
* Website : https://cybrosys.com |
||||
|
|
||||
|
Bug Tracker |
||||
|
----------- |
||||
|
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
||||
|
|
||||
|
Maintainer |
||||
|
========== |
||||
|
.. image:: https://cybrosys.com/images/logo.png |
||||
|
:target: https://cybrosys.com |
||||
|
|
||||
|
This module is maintained by Cybrosys Technologies. |
||||
|
|
||||
|
For support and more information, please visit `Our Website <https://cybrosys.com/>`__ |
||||
|
|
||||
|
Further information |
||||
|
=================== |
||||
|
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,22 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################### |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Aysha Shalin (odoo@cybrosys.com) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################### |
||||
|
from . import models |
@ -0,0 +1,47 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################### |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Aysha Shalin (odoo@cybrosys.com) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################### |
||||
|
{ |
||||
|
'name': 'Customized Barcode Generator', |
||||
|
'version': '18.0.1.0.0', |
||||
|
'category': 'Extra Tools', |
||||
|
'summary': """Print user defined product labels.""", |
||||
|
'description': """This module enables user to print customized product |
||||
|
labels, Barcode, Barcode Generator, Barcode Label, Product Label, |
||||
|
Product Barcode Generator, Product Barcode, Label Print and Product |
||||
|
Label Print.""", |
||||
|
'author': 'Cybrosys Techno Solutions', |
||||
|
'company': 'Cybrosys Techno Solutions', |
||||
|
'maintainer': 'Cybrosys Techno Solutions', |
||||
|
'website': 'https://www.cybrosys.com', |
||||
|
'depends': ['web', 'product', 'account'], |
||||
|
'data': [ |
||||
|
'report/product_report_templates.xml', |
||||
|
'security/ir.model.access.csv', |
||||
|
'views/barcode_code_views.xml', |
||||
|
'views/res_config_settings_views.xml', |
||||
|
], |
||||
|
'images': ['static/description/banner.jpg'], |
||||
|
'license': 'AGPL-3', |
||||
|
'installable': True, |
||||
|
'auto_install': False, |
||||
|
'application': False, |
||||
|
} |
@ -0,0 +1,6 @@ |
|||||
|
## Module <customized_barcode_generator> |
||||
|
|
||||
|
#### 23.10.2024 |
||||
|
#### Version 18.0.1.0.0 |
||||
|
##### ADD |
||||
|
- Initial commit for Customized Barcode Generator |
@ -0,0 +1,24 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################### |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Aysha Shalin (odoo@cybrosys.com) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################### |
||||
|
from . import barcode_code |
||||
|
from . import product_template |
||||
|
from . import res_config_settings |
@ -0,0 +1,65 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################### |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Aysha Shalin (odoo@cybrosys.com) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################### |
||||
|
from odoo import api, fields, models, _ |
||||
|
import datetime |
||||
|
from odoo.exceptions import UserError |
||||
|
|
||||
|
|
||||
|
class BarcodeCode(models.Model): |
||||
|
""" This class creates a model with needed fields """ |
||||
|
_name = 'barcode.code' |
||||
|
_description = 'Barcode Code' |
||||
|
|
||||
|
name = fields.Char(default='Numeric Code', help="Name of code.") |
||||
|
code_for_zero = fields.Char(string=' 0 ', required=True, size=1, |
||||
|
default='a', help="insert substitute code. ") |
||||
|
code_for_one = fields.Char(string='1 ', required=True, size=1, |
||||
|
default='b', help="insert substitute code. ") |
||||
|
code_for_two = fields.Char(string='2 ', required=True,size=1, |
||||
|
default='c', help="insert substitute code.") |
||||
|
code_for_three = fields.Char(string='3 ', required=True,size=1, |
||||
|
default='d', help="insert substitute code. ") |
||||
|
code_for_four = fields.Char(string='4 ', required=True, size=1, |
||||
|
default='e', help="insert substitute code. ") |
||||
|
code_for_five = fields.Char(string='5 ', required=True, size=1, |
||||
|
default='f', help="insert substitute code. ") |
||||
|
code_for_six = fields.Char(string='6 ', required=True, size=1, |
||||
|
default='g', help="insert substitute code. ") |
||||
|
code_for_seven = fields.Char(string='7 ', required=True, size=1, |
||||
|
default='h', help="insert substitute code. ") |
||||
|
code_for_eight = fields.Char(string='8 ', required=True, size=1, |
||||
|
default='i', help="insert substitute code. ") |
||||
|
code_for_nine = fields.Char(string='9 ', required=True, size=1, |
||||
|
default='j', help="insert substitute code. ") |
||||
|
active_check = fields.Boolean(string="Active", default=False, |
||||
|
help="Enable to make code active.") |
||||
|
date_check = fields.Datetime(default=datetime.datetime.today(), |
||||
|
string="Date", help="Specify the date.") |
||||
|
|
||||
|
@api.onchange('active_check') |
||||
|
def onchange_active_check(self): |
||||
|
""" Function to work on changing active_check boolean field """ |
||||
|
for i in self.search([]): |
||||
|
if i.active_check == self.active_check and self.active_check: |
||||
|
self.active_check = False |
||||
|
raise UserError(_("Only one rule for code can be" |
||||
|
" active at a time")) |
@ -0,0 +1,68 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################### |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Aysha Shalin (odoo@cybrosys.com) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################### |
||||
|
from odoo import api, fields, models |
||||
|
|
||||
|
|
||||
|
class ProductTemplate(models.Model): |
||||
|
""" This class inherits model product.template and adds field for code """ |
||||
|
_inherit = 'product.template' |
||||
|
cost_in_code = fields.Char(string='Cost in code', |
||||
|
compute='get_cost_in_code', |
||||
|
help="Get the cost in code.") |
||||
|
|
||||
|
@api.depends('standard_price') |
||||
|
def get_cost_in_code(self): |
||||
|
""" This function computes the cost in code based on the cost of |
||||
|
product """ |
||||
|
code = self.env['barcode.code'].sudo().search( |
||||
|
[('active_check', '=', True)]) |
||||
|
active_check = self.env['ir.config_parameter'].sudo().get_param( |
||||
|
'customized_barcode_generator.require_standard_price') |
||||
|
if active_check: |
||||
|
if code: |
||||
|
real = str(self.standard_price).split('.')[0] |
||||
|
for i in real: |
||||
|
if i == '0': |
||||
|
real = real.replace('0', code.code_for_zero) |
||||
|
elif i == '1': |
||||
|
real = real.replace('1', code.code_for_one) |
||||
|
elif i == '2': |
||||
|
real = real.replace('2', code.code_for_two) |
||||
|
elif i == '3': |
||||
|
real = real.replace('3', code.code_for_three) |
||||
|
elif i == '4': |
||||
|
real = real.replace('4', code.code_for_four) |
||||
|
elif i == '5': |
||||
|
real = real.replace('5', code.code_for_five) |
||||
|
elif i == '6': |
||||
|
real = real.replace('6', code.code_for_six) |
||||
|
elif i == '7': |
||||
|
real = real.replace('7', code.code_for_seven) |
||||
|
elif i == '8': |
||||
|
real = real.replace('8', code.code_for_eight) |
||||
|
else: |
||||
|
real = real.replace('9', code.code_for_nine) |
||||
|
return real |
||||
|
else: |
||||
|
return " " |
||||
|
else: |
||||
|
return " " |
@ -0,0 +1,36 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################### |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Aysha Shalin (odoo@cybrosys.com) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################### |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class ResConfigSettings(models.TransientModel): |
||||
|
""" This class inherits 'res.config.settings' and adds fields """ |
||||
|
_inherit = 'res.config.settings' |
||||
|
|
||||
|
require_standard_price = fields.Boolean( |
||||
|
string='Standard price as a code', |
||||
|
config_parameter='customized_barcode_generator.require_standard_price', |
||||
|
help="check this box to show cost on the product labels as code.") |
||||
|
require_ref = fields.Boolean( |
||||
|
string='Show product reference ', |
||||
|
config_parameter='customized_barcode_generator.require_ref', |
||||
|
help="check this box to show product reference as in product labels.") |
@ -0,0 +1,156 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<data> |
||||
|
<!-- Inherited template of product print labels 2x7 --> |
||||
|
<template id="report_template_inherit" inherit_id="product.report_simple_label2x7"> |
||||
|
<xpath expr="//div" position="replace"> |
||||
|
<t t-set="barcode_size" t-value="'width:33mm;height:14mm'"/> |
||||
|
<t t-set="table_style" t-value="'width:97mm;height:37.1mm;' + table_style"/> |
||||
|
<td t-att-style="make_invisible and 'visibility:hidden;'" > |
||||
|
<div class="o_label_full" t-att-style="table_style"> |
||||
|
<div class="o_label_name"> |
||||
|
<strong t-field="product.display_name"/> |
||||
|
</div> |
||||
|
<div class="o_label_data"> |
||||
|
<div class="text-center o_label_left_column"> |
||||
|
<span class="text-nowrap" t-field="product.default_code"/> |
||||
|
<t> | </t> |
||||
|
<t t-esc="product.get_cost_in_code()"/> |
||||
|
<t t-if="barcode"> |
||||
|
<div t-out="barcode" |
||||
|
t-options="{'widget': 'barcode', 'symbology': 'auto', 'img_style': barcode_size}"/> |
||||
|
<span class="text-center" t-out="barcode"/> |
||||
|
</t> |
||||
|
</div> |
||||
|
|
||||
|
<div class="text-right" style="line-height:normal"> |
||||
|
<div class="o_label_extra_data"> |
||||
|
<t t-out="extra_html"/> |
||||
|
</div> |
||||
|
<t t-if="product.is_product_variant"> |
||||
|
<strong class="o_label_price" t-field="product.lst_price" t-options="{'widget': 'monetary', 'label_price': True}"/> |
||||
|
</t> |
||||
|
<t t-else=""> |
||||
|
<strong class="o_label_price" t-field="product.list_price" t-options="{'widget': 'monetary', 'label_price': True}"/> |
||||
|
</t> |
||||
|
</div> |
||||
|
<div class="o_label_clear"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</td> |
||||
|
</xpath> |
||||
|
</template> |
||||
|
<!-- Inherited template for Product print labels 4x7 --> |
||||
|
<template id="report_template_inherit1" inherit_id="product.report_simple_label4x7"> |
||||
|
<xpath expr="//div" position="replace"> |
||||
|
<t t-set="barcode_size" t-value="'width:33mm;height:8mm'"/> |
||||
|
<t t-set="table_style" t-value="'width:47mm;height:37.1mm;' + table_style"/> |
||||
|
<td t-att-style="make_invisible and 'visibility:hidden;'" > |
||||
|
<div class="o_label_full" t-att-style="table_style"> |
||||
|
<div class="o_label_name"> |
||||
|
<strong t-field="product.display_name"/> |
||||
|
</div> |
||||
|
<div class="text-right" style="padding-top:0;padding-bottom:0"> |
||||
|
<t t-if="product.is_product_variant"> |
||||
|
<strong class="o_label_price_medium" t-field="product.lst_price" t-options="{'widget': 'monetary', 'label_price': True}"/> |
||||
|
</t> |
||||
|
<t t-else=""> |
||||
|
<strong class="o_label_price_medium" t-field="product.list_price" t-options="{'widget': 'monetary', 'label_price': True}"/> |
||||
|
</t> |
||||
|
</div> |
||||
|
<div class= "text-center o_label_small_barcode">03/Oct/2022 |
||||
|
<span class="text-nowrap" t-field="product.default_code"/> |
||||
|
<t> | </t> |
||||
|
<t t-esc="product.get_cost_in_code()"/> |
||||
|
<t t-if="barcode"> |
||||
|
<div t-out="barcode" style="padding:0" t-options="{'widget': 'barcode', 'symbology': 'auto', 'img_style': barcode_size}"/> |
||||
|
<span class="text-center" t-out="barcode"/> |
||||
|
<span t-field="product.barcode"/> |
||||
|
</t> |
||||
|
</div> |
||||
|
</div> |
||||
|
</td> |
||||
|
</xpath> |
||||
|
</template> |
||||
|
<!-- Inherited template for Product print labels 4x12 --> |
||||
|
<template id="report_template_inherit3" inherit_id="product.report_simple_label4x12"> |
||||
|
<xpath expr="//div" position="replace"> |
||||
|
<t t-set="barcode_size" t-value="'width:33mm;height:4mm'"/> |
||||
|
<t t-set="table_style" t-value="'width:43mm;height:19mm;' + table_style"/> |
||||
|
<td t-att-style="make_invisible and 'visibility:hidden;'" > |
||||
|
<div class="o_label_full o_label_small_text" t-att-style="table_style"> |
||||
|
<div class="o_label_name"> |
||||
|
<strong t-field="product.display_name"/> |
||||
|
</div> |
||||
|
<t t-if="price_included"> |
||||
|
<div class="o_label_left_column"> |
||||
|
<span class="text-nowrap" t-field="product.default_code"/> |
||||
|
<t> | </t> |
||||
|
<t t-esc="product.get_cost_in_code()"/> |
||||
|
</div> |
||||
|
<div class="o_label_price_medium text-right"> |
||||
|
<t t-if="product.is_product_variant"> |
||||
|
<strong t-field="product.lst_price" t-options="{'widget': 'monetary', 'label_price': True}"/> |
||||
|
</t> |
||||
|
<t t-else=""> |
||||
|
<strong t-field="product.list_price" t-options="{'widget': 'monetary', 'label_price': True}"/> |
||||
|
</t> |
||||
|
</div> |
||||
|
</t> |
||||
|
<t t-else=""> |
||||
|
<div class="o_label_left_column o_label_full_with"> |
||||
|
<span class="text-nowrap" t-field="product.default_code"/> |
||||
|
<t> ---- </t> |
||||
|
<t t-esc="product.get_cost_in_code()"/> |
||||
|
</div> |
||||
|
</t> |
||||
|
<div class= "text-center o_label_small_barcode"> |
||||
|
<t t-if="barcode"> |
||||
|
<div t-out="barcode" style="padding:0" t-options="{'widget': 'barcode', 'symbology': 'auto', 'img_style': barcode_size}"/> |
||||
|
<span class="text-center" t-out="barcode"/> |
||||
|
</t> |
||||
|
<t t-else=""><span class="text-muted">No barcode available</span></t> |
||||
|
</div> |
||||
|
</div> |
||||
|
</td> |
||||
|
</xpath> |
||||
|
</template> |
||||
|
<!-- Inherited template for Product print labels dymo --> |
||||
|
<template id="report_template_inherit2" inherit_id="product.report_simple_label_dymo"> |
||||
|
<xpath expr="//div" position="replace"> |
||||
|
<div class="o_label_sheet o_label_dymo" t-att-style="padding_page"> |
||||
|
<div class="o_label_full" t-att-style="table_style"> |
||||
|
<div class= "text-left o_label_small_barcode"> |
||||
|
<t t-if="barcode"> |
||||
|
<!-- `quiet=0` to remove the left and right margins on the barcode --> |
||||
|
<div t-out="barcode" style="padding:0" t-options="{'widget': 'barcode', 'quiet': 0, 'symbology': 'auto', 'img_style': barcode_size}"/> |
||||
|
<div class="o_label_name" style="line-height: 130%;height:2.7em;background-color: transparent;"> |
||||
|
<span t-out="barcode"/> |
||||
|
</div> |
||||
|
</t> |
||||
|
</div> |
||||
|
<div class="o_label_name" style="line-height: 130%;height:2.7em;background-color: transparent;"> |
||||
|
<span t-field="product.display_name"/> |
||||
|
</div> |
||||
|
<div class="o_label_left_column" style="padding-left: 10px"> |
||||
|
<small class="text-nowrap" t-field="product.default_code"/> |
||||
|
<t> | </t> |
||||
|
<t t-esc="product.get_cost_in_code()"/> |
||||
|
</div> |
||||
|
<div class="text-right" style="padding: 0 4px;"> |
||||
|
<t t-if="product.is_product_variant"> |
||||
|
<strong class="o_label_price_small" t-field="product.lst_price" t-options="{'widget': 'monetary', 'label_price': True}"/> |
||||
|
</t> |
||||
|
<t t-else=""> |
||||
|
<strong class="o_label_price_small" t-field="product.list_price" t-options="{'widget': 'monetary', 'label_price': True}"/> |
||||
|
</t> |
||||
|
<div class="o_label_extra_data"> |
||||
|
<t t-out="extra_html"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</xpath> |
||||
|
</template> |
||||
|
</data> |
||||
|
</odoo> |
|
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 628 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 738 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 757 KiB |
After Width: | Height: | Size: 95 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 126 KiB |
After Width: | Height: | Size: 146 KiB |
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 87 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 137 KiB |
After Width: | Height: | Size: 880 KiB |
After Width: | Height: | Size: 757 KiB |
After Width: | Height: | Size: 85 KiB |
@ -0,0 +1,54 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<!-- Form view of barcode code --> |
||||
|
<record model="ir.ui.view" id="barcode_code_view_form"> |
||||
|
<field name="name">barcode.code.view.form</field> |
||||
|
<field name="model">barcode.code</field> |
||||
|
<field name="type">form</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<form string="Barcode code" create="false" delete="false"> |
||||
|
<sheet> |
||||
|
<label for="active_check"/> |
||||
|
<field name="active_check"/> |
||||
|
<group> |
||||
|
<group> |
||||
|
<field name="code_for_zero"/> |
||||
|
<field name="code_for_one"/> |
||||
|
<field name="code_for_two"/> |
||||
|
<field name="code_for_three"/> |
||||
|
<field name="code_for_four"/> |
||||
|
<field name="code_for_five"/> |
||||
|
<field name="code_for_six"/> |
||||
|
<field name="code_for_seven"/> |
||||
|
<field name="code_for_eight"/> |
||||
|
<field name="code_for_nine"/> |
||||
|
</group> |
||||
|
</group> |
||||
|
</sheet> |
||||
|
</form> |
||||
|
</field> |
||||
|
</record> |
||||
|
<!-- List view of barcode code --> |
||||
|
<record model="ir.ui.view" id="barcode_code_view_list"> |
||||
|
<field name="name">barcode.code.view.list</field> |
||||
|
<field name="model">barcode.code</field> |
||||
|
<field name="type">list</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<list string="Barcode code"> |
||||
|
<field name="name"/> |
||||
|
<field name="date_check"/> |
||||
|
<field name="active_check"/> |
||||
|
</list> |
||||
|
</field> |
||||
|
</record> |
||||
|
<!-- Action for barcode code --> |
||||
|
<record model="ir.actions.act_window" id="barcode_code_action"> |
||||
|
<field name="name">Barcode Code</field> |
||||
|
<field name="res_model">barcode.code</field> |
||||
|
<field name="view_mode">list,form</field> |
||||
|
<field name="help" type="html"> |
||||
|
<p class="oe_view_nocontent_create">Create new code |
||||
|
</p> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |
@ -0,0 +1,52 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<!-- Action for barcode code --> |
||||
|
<record model="ir.actions.act_window" id="barcode_code_action"> |
||||
|
<field name="name">Barcode Code</field> |
||||
|
<field name="res_model">barcode.code</field> |
||||
|
<field name="view_mode">list,form</field> |
||||
|
<field name="help" type="html"> |
||||
|
<p class="oe_view_nocontent_create">Create new code |
||||
|
</p> |
||||
|
</field> |
||||
|
</record> |
||||
|
<!-- Inherited view form of res.config.settings --> |
||||
|
<record id="res_config_settings_view_form" model="ir.ui.view"> |
||||
|
<field name="name">res.config.settings.view.form.inherit.customize.barcode_generator |
||||
|
</field> |
||||
|
<field name="model">res.config.settings</field> |
||||
|
<field name="priority" eval="100"/> |
||||
|
<field name="inherit_id" ref="account.res_config_settings_view_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='has_chart_of_accounts']" |
||||
|
position="before"> |
||||
|
<h2>Product Labels</h2> |
||||
|
<div class="row mt16 o_settings_container"> |
||||
|
<div class="col-xs-12 col-md-6 o_setting_box"> |
||||
|
<div class="o_setting_left_pane"> |
||||
|
<field name="require_standard_price"/> |
||||
|
</div> |
||||
|
<div class="o_setting_right_pane"> |
||||
|
<label for="require_standard_price"/> |
||||
|
<div> |
||||
|
<button name="%(customized_barcode_generator.barcode_code_action)d" |
||||
|
icon="fa-arrow-right" |
||||
|
type="action" string="Barcode code " |
||||
|
class="btn-link" |
||||
|
invisible="require_standard_price==False"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-md-6 o_setting_box"> |
||||
|
<div class="o_setting_left_pane"> |
||||
|
<field name="require_ref"/> |
||||
|
</div> |
||||
|
<div class="o_setting_right_pane"> |
||||
|
<label for="require_ref"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |