Tryton - Issues

 

Issue7249

Title Missing parent relation when _parent_ is used in depends
Priority bug Status resolved
Superseder Nosy List ced, reviewbot, roundup-bot
Type behavior Components account_invoice, purchase, purchase_requisition, sale, trytond
Assigned To ced Keywords review
Reviews 45291002, 39241002, 36051002, 44201002, 39251002
View: 45291002, 39241002, 36051002, 44201002, 39251002

Created on 2018-03-22.15:53:52 by ced, last changed by roundup-bot.

Messages
New changeset 5947b6205999 by Cédric Krier in branch '4.6':
Add missing sale in depends
http://hg.tryton.org/modules/sale/rev/5947b6205999

New changeset eba0f3f0d3a0 by Cédric Krier in branch '4.4':
Add missing sale in depends
http://hg.tryton.org/modules/sale/rev/eba0f3f0d3a0

New changeset 714b96cc65a0 by Cédric Krier in branch '4.2':
Add missing sale in depends
http://hg.tryton.org/modules/sale/rev/714b96cc65a0

New changeset 55d6538a52b8 by Cédric Krier in branch '4.0':
Add missing sale in depends
http://hg.tryton.org/modules/sale/rev/55d6538a52b8

New changeset 09fcbd46e8b8 by Cédric Krier in branch '3.8':
Add missing sale in depends
http://hg.tryton.org/modules/sale/rev/09fcbd46e8b8
New changeset bd00e641fa44 by Cédric Krier in branch '4.6':
Add missing requisition in depends
http://hg.tryton.org/modules/purchase_requisition/rev/bd00e641fa44

New changeset 92b4276edde9 by Cédric Krier in branch '4.4':
Add missing requisition in depends
http://hg.tryton.org/modules/purchase_requisition/rev/92b4276edde9

New changeset d35dc69386d7 by Cédric Krier in branch '4.2':
Add missing requisition in depends
http://hg.tryton.org/modules/purchase_requisition/rev/d35dc69386d7
New changeset feccb29fac6f by Cédric Krier in branch '4.6':
Add missing purchase in depends
http://hg.tryton.org/modules/purchase/rev/feccb29fac6f

New changeset 4dda8fc1cbae by Cédric Krier in branch '4.4':
Add missing purchase in depends
http://hg.tryton.org/modules/purchase/rev/4dda8fc1cbae

New changeset f8ebf8c47502 by Cédric Krier in branch '4.2':
Add missing purchase in depends
http://hg.tryton.org/modules/purchase/rev/f8ebf8c47502

New changeset 7af5346a9832 by Cédric Krier in branch '4.0':
Add missing purchase in depends
http://hg.tryton.org/modules/purchase/rev/7af5346a9832

New changeset 57a54c06b871 by Cédric Krier in branch '3.8':
Add missing purchase in depends
http://hg.tryton.org/modules/purchase/rev/57a54c06b871
New changeset 7f0679e72d72 by Cédric Krier in branch '4.6':
Add missing invoice in depends
http://hg.tryton.org/modules/account_invoice/rev/7f0679e72d72

New changeset c70dcd8e8b05 by Cédric Krier in branch '4.4':
Add missing invoice in depends
http://hg.tryton.org/modules/account_invoice/rev/c70dcd8e8b05

New changeset e37cd4e53b00 by Cédric Krier in branch '4.2':
Add missing invoice in depends
http://hg.tryton.org/modules/account_invoice/rev/e37cd4e53b00

New changeset fe8aeb2c67b8 by Cédric Krier in branch '4.0':
Add missing invoice in depends
http://hg.tryton.org/modules/account_invoice/rev/fe8aeb2c67b8

New changeset fb70f9a86fd2 by Cédric Krier in branch '3.8':
Add missing invoice in depends
http://hg.tryton.org/modules/account_invoice/rev/fb70f9a86fd2
New changeset 94ae5c8e86ca by Cédric Krier in branch 'default':
Add test to check that depends on _parent_ contains also the relation
http://hg.tryton.org/trytond/rev/94ae5c8e86ca
New changeset b1335bb90e5f by Cédric Krier in branch 'default':
Add missing sale in depends
http://hg.tryton.org/modules/sale/rev/b1335bb90e5f
New changeset 5c8f68c73ab9 by Cédric Krier in branch 'default':
Add missing requisition in depends
http://hg.tryton.org/modules/purchase_requisition/rev/5c8f68c73ab9
New changeset e46d4f96598b by Cédric Krier in branch 'default':
Add missing purchase in depends
http://hg.tryton.org/modules/purchase/rev/e46d4f96598b
New changeset 978eb133eb6f by Cédric Krier in branch 'default':
Add missing invoice in depends
http://hg.tryton.org/modules/account_invoice/rev/978eb133eb6f
New review39251002 at https://codereview.tryton.org/39251002/#ps1
New review44201002 at https://codereview.tryton.org/44201002/#ps1
New review36051002 at https://codereview.tryton.org/36051002/#ps1
New review39241002 at https://codereview.tryton.org/39241002/#ps1
review45291002 updated at https://codereview.tryton.org/45291002/#ps1
msg39219 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-03-22.15:59:02
Here is review45291002 which adds the test. I'm going to fix all the failing modules.
msg39218 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-03-22.15:53:51
I found this buggy behavior on a proteus script that create sale line and set the sale field on it.
After the call to on_change_quantity, the sale field has been changed to None.

This is because the on_change_quantity depends on '_parent_*' fields but not on 'sale'. So proteus does not sent the sale (nor the parent because it is not in a One2Many).

I think the behavior of proteus is correct. It is the on_change that should always depends on the relation field if it depends on the _parent_.
I propose to add a generic test for that.
History
Date User Action Args
2018-04-04 22:56:53roundup-botsetmessages: + msg39721
2018-04-04 22:48:19roundup-botsetmessages: + msg39720
2018-04-04 22:46:18roundup-botsetmessages: + msg39719
2018-04-04 22:42:38roundup-botsetmessages: + msg39718
2018-03-24 13:50:50roundup-botsetmessages: + msg39323
2018-03-24 13:49:24roundup-botsetmessages: + msg39322
2018-03-24 13:48:41roundup-botsetmessages: + msg39321
2018-03-24 13:47:47roundup-botsetmessages: + msg39320
2018-03-24 13:46:13roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg39319
2018-03-22 18:51:47reviewbotsetmessages: + msg39229

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