Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1927 Widoki

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?

Awatar
Odrzuć

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

Powiązane posty Odpowiedzi Widoki Czynność
0
sie 16
4128
0
mar 15
4766
0
lip 24
3437
1
sie 25
1398
3
lip 25
2301