Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
2744 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
aug. 20
3315
1
nov. 19
4879
2
dec. 23
14619
0
okt. 23
33
3
okt. 23
788