Tryton - Issues

 

Issue7668

Title Not able to update product default cost price method from configuration
Priority bug Status resolved
Superseder Nosy List ced, prakashpp, reviewbot, roundup-bot
Type feature request Components trytond
Assigned To ced Keywords review
Reviews 50671002
View: 50671002

Created on 2018-08-31.23:10:52 by prakashpp, last changed by roundup-bot.

Messages
New changeset 45b4f90d9308 by Cédric Krier in branch 'default':
Allow to delete record from XML with noupdate
https://hg.tryton.org/tryton-env/rev/45b4f90d9308
New changeset 04c50d261209 by Cédric Krier in branch 'default':
Allow to delete record from XML with noupdate
https://hg.tryton.org/trytond/rev/04c50d261209
review50671002 updated at https://codereview.tryton.org/50671002/#ps30001
review50671002 updated at https://codereview.tryton.org/50671002/#ps20001
review50671002 updated at https://codereview.tryton.org/50671002/#ps1
msg45478 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-12-22.19:51:27
Here is review50671002
msg43239 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-09-01.00:56:05
On 2018-09-01 00:33, Prakash Pandey wrote:
> I am not sure. If we delete xml record, model data db_id is null? Will it not be a problem?

I do not see where the db_id will be updated to null.
It will not be a problem as long as the id is not reused. For PostgreSQL
it is sure because we use sequence but for SQLite it is not sure because
if I remember correctly it take the max(id) + 1.
So maybe the id should be set to null to avoid to update the wrong
record later.
msg43236 (view) Author: [hidden] (prakashpp) Date: 2018-09-01.00:33:54
I am not sure. If we delete xml record, model data db_id is null? Will it not be a problem?
msg43232 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-08-31.23:54:04
I would say that we should be allowed to delete noupdate XML record as far as they are not recreated on the next update (it seems to be the case).
msg43231 (view) Author: [hidden] (prakashpp) Date: 2018-08-31.23:10:52
While updating default cost price method from product configuration, I am getting error of "You are not allowed to delete this record. This record is part of the base configuration.". I read the explanation given on https://bugs.tryton.org/issue5957 but looks like you cannot delete xml record even if you have noupdate enabled as https://github.com/tryton/trytond/blob/2da13829c34af77ab4a76b33372010b80788475e/trytond/model/modelstorage.py#L812 is always None in case of delete. Is it right behaviour of noupdate?
History
Date User Action Args
2019-01-07 22:09:11roundup-botsetmessages: + msg45872
2019-01-07 22:09:08roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg45871
2018-12-29 15:08:13reviewbotsetmessages: + msg45595
2018-12-23 15:42:58reviewbotsetmessages: + msg45484
2018-12-22 20:15:52reviewbotsetnosy: + reviewbot
messages: + msg45479
2018-12-22 19:51:27cedsetstatus: chatting -> testing
keyword: + review
messages: + msg45478
component: + trytond
reviews: 50671002
assignedto: ced
type: feature request
2018-09-01 00:56:06cedsetmessages: + msg43239
2018-09-01 00:33:54prakashppsetmessages: + msg43236
2018-08-31 23:54:04cedsetstatus: unread -> chatting
nosy: + ced
messages: + msg43232
2018-08-31 23:10:52prakashppcreate

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