Merge pending order into new sale

Hello friends,

when an order in past times could not be fulfilled completely, items not delivered remain as pending. With a new supply coming in, they could be delivered. I think

  • Tryton should inform the sales department that there is a pending order which now can be serviced,
  • when the same customer places a new order, Tryton should again ask “I have a pending order for this customer, shall I merge both outgoing moves?”

Can this already be achieved, or could it be implemented?


There is a cron job to assign shipments. This will assign all moves that are ready to be shipped and will be shown on the “Assigned Partially” tab on stock move.

The idea is not to inform sales department but to inform the stock department that there is a stock to be send.

This can be achieved with the sale shipment grouping module

1 Like

Interesting. I’m running trytond-cron. Is that what you mean, or do I need another one?

Great. I could make it work, and it’s close to what I want. As so often in Tryton, I’d prefer to be asked - but allright, I can change quantities if I do want to deliver nothing or reduced amounts.


You need to create the schedule action to assign shipments so the task will be done automatically by the trytond-cron. If you do not create the schedule action nothink will be done by default.

Sorry for delayed reply, and thanks for your care. Is this the action which has to be set up? -


No, this is about “Reschedule”. You need to use one named “Assign customer shipments”:

The “Reschedule” picks shipments that are planned for the past and reschedule them to today.

Allright, think I got it.
I then triggered the action manually. What happened is that all dates of pending deliveries were set to today’s date. But this happens as well to those which can be delivered today (enough items in stock), as to those which cannot be delivered today (not enough items in stock). Is that what should happen?


This is what “Reschedule” action does.
You need to use the “Assign Customer Shipments” you get your items assigned. After executing the action you will see some shipments under the “Partially Assigned” tab. Those shipments are the ones that you have some stock items to be delievered. It is some because you may some of the items of the shipment but others not, so it is up to you to decide if you want wait the shipment or do a partial delivery.

Ah, understood. I already deleted that action, so this came from my faulty attempt before.

I do have this action set up, when I run it manually, nothing happens. All outgoing shipments remain under “assigned”, although there are some which could be fulfilled partially, some even completely.

What could be wrong?


Only shipments planned for today in waiting state are assigned. If you do not have any nothing is assigned.
Another option that may fail is that you did not add any company to the cron job. You should add there the companies you want to work on.

Ah, wait. They all were under “assigned”. So I put them back into waiting and ran the “assign customer shipment” wizard again. But none moved into “partially assigned”, although some could be fulfilled, only one moved into “assigned”, although I cannot fulfil that one.


You need to check also the planned date and the company.

None should move to assigned. The will be in waiting state but shown in the “Partially assigned” because some of its moves should be in assigned state.

This was my initial request:

So this seems not to be the same. It may be weeks ago that a customer ordered and I could not fulfil. But today there may be a supplier delivery - and now I can. Seems that there is no feature to get informed about this incident, if only pending orders of today’s day are observed.

When the order is placed is no relevenat. The relevant is when it is planned to be delivered.
By default shipments are planned for sale date but can be planned somewhere in the future.

For shipments planned in the past, we have the “Reschedule” tasks you already know which replans them to today.

Do not understand. You can not what? Receive the supplier delivery or what?

Which incident? From what you request is to get information about what can be served now. But this does not sound like and incident but something that should happen.

The behaviour can be customized, so you can try to asign the shipments of the full week ahead if you want. What I was explaining is just the default behaviour.