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

i did set the thousand separator in Language Setting and it is work,

but this thousand separator in POS module is not working

please help me regarding this issue,

thank you.

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

i solved it, instead of using instance.web.insert_thousand_seps( amount ); we should use amount = instance.web.format_value(amount, {type : "float"}) put that function before the first if so it solved thank you anyway thank you very much to share with me

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

I just install odoo v8.0 but in settings I don't have Language settings....... So I have to add the following code in the widget_base.js :

amount = parseInt( amount ).toLocaleString();

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

probably, you need to activate Technical Features on user form.

thanks! I need to check that.

On Tue, Dec 30, 2014 at 5:03 PM, Yogesh <yogeshkushwaha4-gmail-com@mail.odoo.com> wrote:

probably, you need to activate Technical Features on user form.

--
Yogesh
Sent by Odoo S.A. using Odoo about Forum Post False

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

Unfortunately this is not implemented within the point of sale module.

The format_value method exists in the web\static\src\js\formats.js file, that's the one used to format values in the web client.

Searching through the POS source yields no results for usage of that method, or the usage of the other method insert_thousand_seps

You will have to extend or modify the POS module to achieve the desired result.

The solution: use instance.web.format_value

Ảnh đại diện
Huỷ bỏ
Tác giả

can you give me some example

Tác giả

actually i did see the function in the format.js but i still confusing how to call this function to the point_of_sale module in base_widget.js

Use this method instance.web.insert_thousand_seps it takes the number and returns the formatted number as a string.

Tác giả

i call that method but it is error i cannot open my POS session it is blank screen hard to solve because i cannot debug it

Where did you call it, file/line.

Tác giả

i call it in the pos module in wiwdget_base file in format_currency method

In the middle of that method, right after the first IF, put the following code: amount = instance.web.insert_thousand_seps( amount );

Tác giả

thank you it is working but the problem now is the value became 70.000..0 with double dot in decimal and it is dot instead of comma coz i put the decimal symbol is comma not dot any idea?

Tác giả

i solved it, instead of using instance.web.insert_thousand_seps( amount ); we should use amount = instance.web.format_value(amount, {type : "float"}) put that function before the first if so it solved thank you anyway thank you very much to share with me

Tác giả

sorry friend i want to but i dont have enough karma

Tác giả

lol nee 1 more karma need 20 but mine 19

Tác giả

done thank you

You're welcome :-)

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 7 25
588
2
thg 7 25
1114
1
thg 6 25
794
1
thg 4 25
972
1
thg 3 25
1175