Issue 10238

Title
Shipments costs are duplicated when doing partial delivery
Priority
bug
Status
resolved
Nosy list
ced, pokoli, reviewbot, roundup-bot
Assigned to
pokoli
Keywords
review

Created on 2021-03-31.10:18:19 by pokoli, last changed 11 hours ago by roundup-bot.

Messages

New changeset e72740b49c79 by Sergi Almacellas Abellana in branch '5.8':
Store in a list the shipments to be saved
https://hg.tryton.org/modules/sale_shipment_cost/rev/e72740b49c79
New changeset 562c0817115a by Sergi Almacellas Abellana in branch 'default':
Store in a list the shipments to be saved
https://hg.tryton.org/tryton-env/rev/562c0817115a
New changeset ad1e21a249c6 by Sergi Almacellas Abellana in branch 'default':
Store in a list the shipments to be saved
https://hg.tryton.org/modules/sale_shipment_cost/rev/ad1e21a249c6
Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-03-31.12:26:49

El 31/3/21 a les 12:15, C├ędric Krier ha escrit:

After some debuging I found that the problem is cost_invoice_line is not correctly save on shipment, so on each invoice a line is created for each shipment sent.
This is expected when the cost method is 'shipment'.

One line per shipment is expected. But current behaviour is:

  1. For first shipment one line is created
  2. For second shipment two lines are created (which results in three lines because we already have one for the first shipment)

Each time a new invoice is created, the number of lines created is equal to the number of existing shipments.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-03-31.12:15:25

After some debuging I found that the problem is cost_invoice_line is not correctly save on shipment, so on each invoice a line is created for each shipment sent.

This is expected when the cost method is 'shipment'.

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-03-31.10:22:26

The problem was introduced by changeset 551652b0f693

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-03-31.10:18:19

I found this on 5.8 series, when using the sale_shipment_cost in case of partial delivery, the invoice of the second shipment is created with two shipment_cost_lines.

After some debuging I found that the problem is cost_invoice_line is not correctly save on shipment, so on each invoice a line is created for each shipment sent.

History
Date User Action Args
2021-04-10 01:44:11roundup-botsetkeyword: - backport
messages: + msg66262
2021-04-08 15:51:37roundup-botsetmessages: + msg66183
2021-04-08 15:51:29roundup-botsetmessages: + msg66182
nosy: + roundup-bot
status: testing -> resolved
2021-04-04 08:53:17reviewbotsetmessages: + msg66062
2021-03-31 13:51:14reviewbotsetmessages: + msg65949
2021-03-31 12:26:49pokolisetmessages: + msg65948
2021-03-31 12:15:25cedsetmessages: + msg65946
nosy: + ced
2021-03-31 10:42:59reviewbotsetmessages: + msg65943
nosy: + reviewbot
2021-03-31 10:22:26pokolisetmessages: + msg65942
2021-03-31 10:19:57pokolisetkeyword: + review
reviews: 320781002
status: in-progress -> testing

Showing 10 items. Show all history (warning: this could be VERY long)