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

I am using the point_of_sale app in Odoo v8.


In the report pos.order.report, the field product_qty has a type of integer, but I need it to be float, since many of my products are sold by Kg and have three decimal places.


I attempted to change the data type in the model definition, but it tells me I have to change it in Python code by a new module. 


How do I go about this?

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

Hi, any updates?

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

The best place to start is in the Odoo Documentation:

Building a Module: http://www.odoo.com/documentation/8.0/howtos/backend.html#build-an-odoo-module

ORM: http://www.odoo.com/documentation/8.0/reference/orm.html#fields


Basically, you need to create the structure of a module, then inherit the core model and redefine the field as type of Float. You should be able to reference some of the core modules (or third party modules or tutorials) about how to create a module and field if the documentation is insufficient.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 25
991
2
thg 8 24
1553
1
thg 1 20
4905
0
thg 4 17
2696
0
thg 1 17
4239