Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
16869 Lượt xem

Hi all,,

Point of sale printed receipt contains a Order number (most upper right corner) which is generated to be unique based on the current time, I found the responsible javaScript function (generateUniqueId) under

point_of_sale/static/src/js/models.js

The question is, how to change the order to start from 0 each session? is there any way to achieve this without changing the source code?

Thanks.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Found a solution.

I have defined a new variable at the top of the script var orderNo=0;, then changed the funcion to:

generateUniqueId: function() {
    return orderNo++;
},

Its silly, right!

Ảnh đại diện
Huỷ bỏ

"I have defined a new variable at the top of the script var orderNo=0 " ...where exactly...Got a blank screen after attempting to change this? Anyway to get this field from a sequence?

Tác giả

You should try to place the variable definition as the second line of the script..%

hi.. Thanks Anas . It works for me.

hi. Anas any idea about how to set different order number for different users of pos. For example if user1 need the order number start with 1000, user2 needs to start the order number with 2000, how can be achieve it.

Simple but useful tip. Thanks!

But the variable is set to 0 each time the POS reloads... ) : Could it be possible to import the current POS order number when pos interface is loaded in models.js to the orderNo variable so it takes off from the last order in the server??

Using something like this.... return self.fetch('pos.order', ['name']); }).then(function(pos){ OrderNo ..... .... ?? Someone?

Câu trả lời hay nhất

Hello !

We have created a separate module to generate POS Sequence.
User can generate his own sequence number as per his requirement.

Please check this blog.
Just copy this URL and paste in browser.
acespritechblog.wordpress.com/2013/01/27/user-defined-sequence-in-openerp-7-pos-point-of-sale/

Thanks,
Acespritech Solutions Pvt. Ltd.
Mail: info@acespritech.com
Skype: acespritech
Gtalk: acespritech

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

I'm don't how easy or hard it is to get that feature but I just know that IntellectSeed made this modified POS module..

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 10 17
4782
0
thg 7 17
2976
1
thg 1 16
77
0
thg 3 15
3651
1
thg 3 15
3934