Issue 9939

Title
Allow update asset even lines have no move yet
Priority
feature
Status
testing
Nosy list
bernatnan, ced, josesalvador, pokoli, reviewbot
Assigned to
ced
Keywords
review

Created on 2020-12-14.17:17:17 by bernatnan, last changed 1 week ago by reviewbot.

Messages

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-04-25.11:14:09

Here is review351821003 which allow reseting to draft an asset without posted move (and also recompute pending lines).

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-04-25.00:57:03

I filled issue10342 for just the date issue which is more general than the update with no posted move.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-04-24.13:40:52

I think we can do:

  • allow "Clear Lines" button on running asset
  • create missing line in create_moves
  • allow draft button if lines is empty
Author: [hidden] (josesalvador)
Date: 2021-04-24.09:08:40

So I'm wondering if It won't be better to allow a transition from running to draft when any of the asset lines have a move set.

In any case, I think we should mark this a new feature because updating the asset is not the expected to be done when there are no moves. With my proposal we should be able to hide the button to prevent clicking when the lines haven't been deprecated yet.

This is the expected behavior for me too

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-03-12.12:28:01

I do not think we need such special action as long as we have the confirmation popup about non-reversible operation.

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-03-12.11:40:01

One of our users found with the same scenario this week.
After clicking the run she realized that entered a wrong data (she did not specify) but no move have been created for the lines.

We solved by updating the state of the asset to draft in the database, who let she edit remove the lines, update the values as required and move the asset back to running.

So I'm wondering if It won't be better to allow a transition from running to draft when any of the asset lines have a move set.

In any case, I think we should mark this a new feature because updating the asset is not the expected to be done when there are no moves. With my proposal we should be able to hide the button to prevent clicking when the lines haven't been deprecated yet.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-12-22.23:40:19

I'm not sure it is a valid scenario. For me if you need to update the value of the asset for after the first line, you need first to post this line.

Author: [hidden] (bernatnan)
Date: 2020-12-14.18:13:32

For example:
- Today is 14/12/2020.
- Create an asset with value 1.000€ and start date 14/12/2020 and end date 31/11/2021, and have defined a monthly frequency
- Click "create lines", it creates 12 lines with the first date 31/12/2020.
- Click "run".
If before you click the wizard to create the move for assets need to update the amount of the asset, for any reason, how its not possible to draft the asset, need to use the "update" wizard. If you click it:
- Fill the new amount to 1.200€ and in the next step, how the date will not be in the domain you could not finish the update.
latest move date: will be 30/12/2020, because any move are created yet.
next depreciation date: will be 31/12/2020.
And the domain say that the date will be great and less, but not equal.

Author: [hidden] (bernatnan)
Date: 2020-12-14.17:17:16

If you create an asset and create it's lines, and after run it. If you have any move create yet and need to edit the asset, as is not possible to draft it, If you try the edition throw the update wizard, you can't do it because the "date" domain.

History
Date User Action Args
2021-04-25 13:48:05reviewbotsetmessages: + msg66940
2021-04-25 11:16:44reviewbotsetmessages: + msg66932
2021-04-25 11:14:09cedsetassignedto: bernatnan -> ced
messages: + msg66929
reviews: 343161002 -> 343161002,351821003
2021-04-25 00:57:03cedsetmessages: + msg66918
2021-04-24 13:40:52cedsetmessages: + msg66897
2021-04-24 09:08:40josesalvadorsetmessages: + msg66896
nosy: + josesalvador
2021-04-05 17:05:43cedsetassignedto: bernatnan
status: chatting -> testing
2021-03-12 12:28:01cedsetmessages: + msg65442
2021-03-12 11:40:01pokolisetmessages: + msg65435
nosy: + pokoli
priority: bug -> feature
type: behavior -> feature request
2020-12-22 23:40:19cedsetmessages: + msg63573
nosy: + ced

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