[16.0] web_domain_field problem with standard project.task read_group
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
Direzione di ricerca
The issue identifies web_domain_field and the overridden project.task read_group as the relevant entry points. Read the domain serialization and read_group handling, then reproduce by grouping a tree view using a field with the dynamic true domain (1, '=', 1). Done means grouping works without treating 1 as a field name; the issue does not name a test file.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Module
Web Domain Field - web_domain_field
Describe the bug
Odoo standard project task has read_group overridden and loops on domains. When we create a true domain (1, '=', 1) with web_domain_field it is created as [1, '=', 1], so it's not recognised as true leaf by odoo osv, causing this overridden read_group to try splitting "1" like a field name.
To Reproduce
16.0:
Steps to reproduce the behavior:
- Use a dynamic domain on a project.task field.
- Add that field into a tree view.
- Try to group by.
Expected behavior
Right now I cannot see a proper solution for this other than overridding the read_group on project.task like this:
@api.model
def read_group(self, domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True):
fields_list = ([f.split(':')[0] for f in fields] or [])
if groupby:
fields_groupby = [groupby] if isinstance(groupby, str) else groupby
# only take field name when having ':' e.g 'date_deadline:week' => 'date_deadline'
fields_list += [f.split(':')[0] for f in fields_groupby]
if domain:
for term in domain:
if isinstance(term, (tuple, list)) and term not in [expression.TRUE_LEAF, expression.FALSE_LEAF, [1, '=', 1]]:
fields_list += [term[0].split('.')[0]]
self._ensure_fields_are_accessible(fields_list)
return super(models.Model, self).read_group(domain, fields, groupby, offset=offset, limit=limit, orderby=orderby, lazy=lazy)
Watch how [1, '=', 1] is excluded for parsing and then the models.Model super read_group is called.
- Lingua principale
- JavaScript
- Stelle
- 1.2k
- Fork
- 2.2k
- Merge medio
- 3g 15h
- PR unite (30g)
- 30
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OCA/web
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
[19.0] web_timeline: ValueError "Invalid field 'date_start:month'" when grouping by a date fieldForse già presa @stferraro l’ha presa oggi. Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
[19.0] web_m2x_options: system parameter + m2o options not working properly when no recordsForse già presa @CristhianAC l’ha presa 11 giorni fa. Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
I maintainer di solito rispondono entro 1 giorno
-
Migration to version 20.0Forse già presa Una pull request collegata a questa issue è aperta o già unita. Apertahelp wanted no stale work in progress
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 4/5 1-2 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Add: FILMBOX+ Festival FeedApertacheck:passed feeds:add
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 66/100
-
Wallet functions throws TypeError when the wallet has no account IDForse già presa @Medhansh-741 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
hiero-ledger/hiero-sdk-js#4781 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug package:workers-shared
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cloudflare/workers-sdk#16924 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
dashboard
Difficoltà 2/5 Mezza giornata Idoneità per principianti 78/100
damodharg6/payledger#9 ·
-
parse: child keys like `007`, `1e3`, `0x1f`, `-1` make the parent an empty array and hide the valueAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100