Created on 2020-10-16.13:23:02 by ced, last changed 4 days ago by roundup-bot.
New changeset 7b3249155383 by Cédric Krier in branch 'default': Set default value for missing depends field https://hg.tryton.org/tryton-env/rev/7b3249155383
New changeset 65b6783a3b63 by Cédric Krier in branch 'default': Set default value for missing depends field https://hg.tryton.org/trytond/rev/65b6783a3b63 New changeset ad25105834ed by Cédric Krier in branch 'default': Test default value for missing depends field https://hg.tryton.org/trytond/rev/ad25105834ed
fields.depends set None for missing values. But when we instantiate a record and call a method decorated with depends, some field may be set to None which will be used when saved. This happens for example with ShipmentOut._sync_outgoing_move a Move is instantiated and on_change_with_unit_price_required is called. But if the stock_consignment is activated, it adds a depend to the field state. So the state is set to None which makes the save failing because the state value must be draft or staging on creation (and it is required). So for me the depends decorator should use the default value of the field if there is one (which mimic the ModelSQL.create behavior).
|2020-10-21 23:24:37||roundup-bot||set||messages: + msg61133|
nosy: + roundup-bot
status: testing -> resolved
messages: + msg60993
|2020-10-16 15:20:10||ced||set||status: in-progress -> testing|
keyword: + backport, review
Showing 10 items. Show all history (warning: this could be VERY long)