콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
5 답글
13244 화면

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
2192
0
12월 19
2457
0
5월 17
3143
0
4월 17
2530
0
10월 20
1135