İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
2759 Görünümler

Hi,

I have created one One2many field shipping.order.line in sale same as sale.order.line. and I have one shipping fee field and want to add that value into shipping.order.line. shipping line is created in database but not display in view.

could anyone help me achieve this.

Thanks in advance!

Avatar
Vazgeç
En İyi Yanıt

Hi,

Did you correctly given the relation between the models, like, in the sale.order.line model we have field order_id which is of type many2one of co-model sale.order , if there is no value in the field order_id this order.line wont show inside any sale order form. So in your  case check whether that relation is correctly done.

In your new model, there will be a many2one field with co-model as sale.order, check whether there is value in it.


And if you need to pass default value from model sale.order to field in your new model(ie, one2many field) you can do it by passing default value in the context.

See:-

<field name="one2many_field_name" context="{'default_cost': cost}">
<tree string="string" editable="bottom">
<field name="cost"/>
</tree>
</field>

Thanks

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Ağu 20
3318
1
Kas 19
4891
2
Ara 23
14634
0
Eki 23
33
3
Eki 23
788