Odoo Help

1

0
5 Answers
0

Dear Raaj Mishra, Your above answer has already helped me alot. Can you please help me what terminology is used to print 2D DataMarix?

0
Raaj Mishra
14-04-17 05:38

Hi Usman, there are many types other than EAN13 which we can use to print product barcode.

Some of them are : 'Codabar', 'Code11', 'Code128', 'EAN13', 'EAN8', 'Extended39',

        'Extended93', 'FIM', 'I2of5', 'MSI', 'POSTNET', 'QR', 'Standard39', 'Standard93',

        'UPCA', 'USPS_4State'

Just we need to change the params at url which is defined for products report view,by default it is EAN13.

For more informations you can browse the code at report module : addons/report/controllers/main.py

3 Comments
Usman Farzand
14-04-17 06:28

Thanks Raaj Mishra for reply,

point of sale --------> Configuration --------> Bar code Nomenclatures and then

click on product bar codes (where type is unit product and Encoding method is any)

i changed it from EAN13 to Any but it's can't work for me.

i read code according to your instruction

method is (if I'm not wrong)

def report_barcode(self, type, value, width=600, height=100, humanreadable=0):

if i will change it like this, is it work?

def report_barcode(self, type='EAN8', value, width=600, height=100, humanreadable=0):

Raaj Mishra
14-04-17 07:35

Hi Usman,Yes that's right method you picked, but I am not sure about type='EAN8', need to give a try for that.

Usman Farzand
15-04-17 01:32

Thanks Raaj Mishra again reply...

i changed it but can't work...

now i change in xml file where pass parameter... From this code to

<tr style="width: 1in;">

<td style="border: 2px solid black;text-align: center; vertical-align: middle;" class="col-xs-5">

<img t-if="product.barcode" t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('EAN13', product.barcode, 600, 150)" style="width:100%;height:20%;"/>

<span t-field="product.barcode"/>

</td>

To this code

<tr style="width: 1in;">

<td style="border: 2px solid black;text-align: center; vertical-align: middle;" class="col-xs-5">

<img t-if="product.barcode" t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('EAN8', product.barcode, 600, 150)" style="width:100%;height:20%;"/>

<span t-field="product.barcode"/>

</td>

but still generating EAN13 code as too

Stel een vraag
Writer
Keep Informed
1 volger(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register