Se rendre au contenu
Menu
Cette question a été signalée
1780 Vues

I have a block of code that updates the partner_shipping_id based on a value that is input from an api.  Since upgrading to v16 this is no longer working.

        for order in orders:
_logger.warning("delivery: %s", delivery_partner\.id\)
\ \ \ \ \ \ \ \ \ \ \ \ _logger\.warning\("buyer:\ %s",\ user\.partner_id\.id\)
\ \ ​\ \ _logger\.warning\("order\ %s",\ order\)
\ \ ​\ \ _logger\.warning\("pre\ %s",\ order\.partner_shipping_id\)
\ \ ​\ \ order\.update\(\{
\ \ \ ​'partner_shipping_id'\ :\ delivery_partner\.id,
\ \ \ ​'partner_id'\ :\ user.partner_id.id,
'client_order_ref' : cid
})
_logger.warning("post %s", order.partner_shipping_id)

The log output:

delivery: 32551
buyer: 29618
order sale.order(66452,)
pre res.partner(29618,)
post res.partner(29618,)

I would have expected the post to be the same as the delivery id.  Any suggestions on what is preventing the update from occurring?

Avatar
Ignorer

You can trial print('Test') under 'order.update({...})' to check whether the command is executed or not.
Hope it help!

Publications associées Réponses Vues Activité
0
août 16
3981
0
mars 15
4644
0
juil. 24
3437
1
août 25
1195
3
juil. 25
1847