Search() returns inactive records too
(empty description)
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- priyanka rani assigned to @ced
assigned to @ced
- priyanka rani added project + 1 deleted label
added project + 1 deleted label
- Author
Patch : review1741002
- priyanka rani added 1 deleted label and removed 1 deleted label
added 1 deleted label and removed 1 deleted label
- Owner
Please don't assign issue!
- Cédric Krier unassigned @ced
unassigned @ced
How to reproduce:
1) Install the timesheet module
2) Open "Works" view available with menu "Timesheet -> Configuration -> Works ->
Works"
3) Create two records (fill only name & company, active is enabled by defaut)
4) Using tree view, check there are two records
5) set the first record inactive: edit the first created record, unckeck the
'active' checkbox, save the modification
6) Using tree view, check there is one record -> NOK no one is displayed
Bugs identified by review1741002, work in progress patch in review2251002.
It seems the problem come from that there are two records with identical left
and right values (see Many2One doc:
http://doc.tryton.org/3.0/trytond/doc/ref/models/fields.html?highlight=many2one#trytond.model.fields.Many2One),
so the query with "child_of" operator used in Work.write
(http://hg.tryton.org/modules/timesheet/file/843beb67b34b/work.py#l167) returns
incorrect value.
Left and right values are identical because _rebuild_tree
(http://hg.tryton.org/trytond/file/5832eee069fe/trytond/model/modelsql.py#l1073)
ignore inactive records.- Cédric Krier assigned to @pilou_2
assigned to @pilou_2
- Cédric Krier added 1 deleted label and removed project + 1 deleted label
added 1 deleted label and removed project + 1 deleted label
- Owner
Please test this review2401002 that's used plain SQL query.
- Cédric Krier assigned to @ced and unassigned @pilou_2
- Cédric Krier added trytond + 1 deleted label and removed 1 deleted label
added trytond + 1 deleted label and removed 1 deleted label
New changeset 597e24b340da by C?dric Krier in branch 'default':
Fix _rebuild_tree to take in account inactive records
http://hg.tryton.org/trytond/rev/597e24b340da- Cédric Krier added 1 deleted label and removed 1 deleted label
added 1 deleted label and removed 1 deleted label
- Cédric Krier closed
closed
- Cédric Krier mentioned in issue #3554 (closed)
mentioned in issue #3554 (closed)