Tryton - Issues

 

Issue7068

Title Add quantities relate from template
Priority feature Status resolved
Superseder Nosy List albertca, ced, pokoli, reviewbot, roundup-bot
Type feature request Components stock
Assigned To ced Keywords review
Reviews 40031002, 44001002
View: 40031002, 44001002

Created on 2018-01-18.19:00:32 by ced, last changed by roundup-bot.

Files
File name Uploaded Type Edit Remove
unnamed albertca, 2018-01-23.00:21:31 text/plain
Messages
New changeset 79a7c2330d28 by Cédric Krier in branch 'default':
Do not group twice per product
http://hg.tryton.org/modules/stock_lot/rev/79a7c2330d28
New review44001002 at https://codereview.tryton.org/44001002/#ps1
New changeset 48b680368def by Cédric Krier in branch 'default':
Allow to group per product columns to compute quantity
http://hg.tryton.org/modules/stock/rev/48b680368def
msg37860 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-01-23.00:45:39
On 2018-01-23 00:21, Albert Cervera i Areny wrote:
> Given how complex stock calculation already is, I wonder if it is not
> better to simply add a "template" field to stock moves. This would allow us
> to use existing infrastructure which is already capable of grouping by a
> m2o field in stock.move.

I thought about it but decided it deserves a little extra code over the
data duplication. Also we have no constraint that prevents a product to
change of template, so keeping such data integrity will be complex and
slow without having 100% data integrity guarantee.

If we look at the review, the query part does not grow a lot. Thanks to
the abstraction of python-sql, it is just about replacing two tables.
It is about less than 40 lines of code and I'm pretty sure that a
synchronisation product-template will add at least that code (and maybe
even more for constraint etc.)
msg37859 (view) Author: [hidden] (albertca) (Tryton committer) (Tryton translator) Date: 2018-01-23.00:21:33
Given how complex stock calculation already is, I wonder if it is not
better to simply add a "template" field to stock moves. This would allow us
to use existing infrastructure which is already capable of grouping by a
m2o field in stock.move.

2018-01-18 19:00 GMT+01:00 Cédric Krier <issue_tracker@tryton.org>:

>
> New submission from Cédric Krier <cedric.krier@b2ck.com>:
>
> For now those relate are only available on the variant because
> product_by_locations is only able to group per product column.
> But there are a lot of business cases which do not use variants and indeed
> they have only one variant per template. So it is not very friendly for
> those cases to require to open the variant first.
> In order to add those relates, we need to support to group per product
> columns (and add the join to the query when needed).
>
> ----------
> assignedto: ced
> component: stock
> messages: 37682
> nosy: ced
> priority: feature
> status: in-progress
> title: Add quantities relate from template
> type: feature request
>
> _______________________________________________
> Tryton issue tracker <issue_tracker@tryton.org>
> <https://bugs.tryton.org/issue7068>
> _______________________________________________
>
review40031002 updated at https://codereview.tryton.org/40031002/#ps40001
review40031002 updated at https://codereview.tryton.org/40031002/#ps20001
review40031002 updated at https://codereview.tryton.org/40031002/#ps1
msg37682 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-01-18.19:00:31
For now those relate are only available on the variant because product_by_locations is only able to group per product column.
But there are a lot of business cases which do not use variants and indeed they have only one variant per template. So it is not very friendly for those cases to require to open the variant first.
In order to add those relates, we need to support to group per product columns (and add the join to the query when needed).
History
Date User Action Args
2018-02-21 13:10:07roundup-botsetstatus: chatting -> resolved
messages: + msg38535
2018-02-16 11:16:13reviewbotsetstatus: resolved -> chatting
messages: + msg38402
2018-02-16 11:16:12reviewbotsetreviews: 40031002 -> 40031002, 44001002
2018-02-11 14:38:39roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg38300
2018-01-23 00:45:39cedsetmessages: + msg37860
2018-01-23 00:21:33albertcasetfiles: + unnamed
nosy: + albertca
messages: + msg37859
2018-01-22 12:13:33reviewbotsetmessages: + msg37837
2018-01-22 11:14:33reviewbotsetmessages: + msg37836
2018-01-22 10:57:42pokolisetnosy: + pokoli
2018-01-18 19:09:33reviewbotsetnosy: + reviewbot
messages: + msg37686

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