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

I want to override the picking_type_id value in purchase.order to be not required & not default value ,i tried doing this but it's not working :

_columns = {
'picking_type_id': fields.many2one(
'stock.picking.type',
'Deliver To',
help="This will determine picking type of incoming shipment",
required=False,
states={'confirmed': [('readonly', False)], 'approved': [('readonly', False)], 'done': [('readonly', True)]}),

then i tried to  add      {'required': '0'}    to xml vue but i got a js bug 

Edit : 

I did the non required part ,it was simple  just adding required = "0" 

Now i'm stuck with the default part

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

i tried using : 

_columns = {
'picking_type_id': fields.many2one(
'stock.picking.type',
'Deliver To',
help="This waat",
required=False,
states={'confirmed': [('readonly', True)], 'approved': [('readonly', True)], 'done': [('readonly', True)]}),
}

_defaults = {
'picking_type_id': False
}

still no changes

and i'm actually using odoo12

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

Hi,

 I guess your using odoo 8,

Try this, after your _columns = {}

_defaults = {
'picking_type_id': False
}

Hope it helps,

Thanks



Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 12 23
1515
2
thg 1 23
2550
1
thg 8 22
5537
3
thg 9 19
4750
1
thg 9 19
6774