コンテンツへスキップ
メニュー
この質問にフラグが付けられました
5 返信
13000 ビュー

example is
i want to generator product bar code according to my wish just like 0147
but odoo put 00000 as prefix and generot ean-13 mechanism...
i want only 0147 barcode into my product not any extra ...
im using #Odoo v10c

アバター
破棄
最善の回答

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

アバター
破棄
最善の回答

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

アバター
破棄
著作者

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):

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

著作者

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

関連投稿 返信 ビュー 活動
2
6月 25
1914
0
12月 19
2325
0
5月 17
2988
0
4月 17
2388
0
10月 20
1135