Non-required selection fields and incorrectly updated fields (e.g.
changed options but didn't fix existing values) trips KanbanSelection
badly leading to the entire kanban view failing to appear: the rendering
phase does not find the state in its states list and blows up when
trying to access the state's class.
Fix by adding a fallback default state with an empty class.
The name of the icon on the statbutton was apparently broken during the
new-api migration (commit 095d0174fd),
leading to the icon not appearing on the "Contracts" button of the
Employee form.
There's really no reason to limit group_operator to numeric fields and Postgres's flexible aggregate make the ability to aggregate on non-numeric fields (and/or non-numerically)
* moves group_operator to Field
* adds a default value of `sum` on integer, float and monetary fields
* in read_group, filters on fields with a group operator rather than by
type (also allow id fields, since Id doesn't have a group_operator by
default it will be ignored anyway) (sequence is still specifically
excluded for now because they're usually regular Integer fields)
Closes#12372
Closes#12131
[FIX] report: don't hide errors in custom reports
If a custom report's render_html raises a KeyError for some
reason, Report.get_html would swallow the exception and fallback
on generic HTML rendering, usually blowing up with unfathomable
errors of missing rendering context data.
Check if a custom report object exists instead of waiting for a
KeyError.
If a custom report's render_html raises a KeyError for some
reason, Report.get_html would swallow the exception and fallback
on generic HTML rendering, usually blowing up with unfathomable
errors of missing rendering context data.
Check if a custom report object exists instead of waiting for a
KeyError.
As its documentation notes[0], Jinja2 only processes unicode template
data (or pure ASCII, which will implicitly decode to unicode).
The scaffolding system would read raw scaffolding data in memory (both
templates and passthrough non-templates), but fail to decode templates
before handing them to Jinja, blowing rendering up if templates
contained non-ascii.
Fix#11331 by always decoding templates from UTF8 before handing them
to jinja. This is backwards-compatible, ascii templates work as they
used to, non-ascii UTF8 templates now work correctly, non-ascii
non-UTF8 templates what are you doing?
[0] http://jinja.pocoo.org/docs/dev/api/#unicode
According to PEP302, the signature of `Finder.find_module` should be
`find_module(fullname, path=None)`.
Ever since it was introduced in 64ec5f36df the addons import hook
defines the second parameter as mandatory, which is an issue for
systems relying on the specified behaviour (and not needing to
provide a path) like the stdlib's `pkgutil.find_loader`.
fixes#10670
user_has_groups is used to check for groups in e.g. view attributes (`@groups`).
When trying to format lists of groups in views, it would break down as it would
pass e.g. `\n some.group` to `res.users.has_group`, which would look for
an xid with the module `\n some` and (oddly enough) not find it.
Theoretically could also handle that inside res.users.has_group but it seems
ever-so-slightly more risky, and has_group is only used programmatically and
should thus already be called correctly.
fixes#9797
simplejson and the builtin json module apparently differ in how they
decide to optimise decoding JSON strings to str rather than unicode
python strings, so check for basestring rather than one or the other.
This may also depend on the Python version.
Closes#8726
Allows exporting fields whose string is a non-ascii *byte*string (rather than unicode).
backport of 7286f4e424 fixing #773 to branch 7.0 by request of @flotho
The branch name is used in the version switcher, so the master branch should have a version of "master".
Maybe the release could be the revision hash? Not sure how to extract it from the repo.
The branch name is used in the version switcher, so the master branch should have a version of "master".
Maybe the release could be the revision hash? Not sure how to extract it from the repo.
It turns out TTFontFile can throw not only TTFError (generic) and KeyError, but also ValueError (unknown cmap) and maybe others.
Just catch Exception, warn that the font couldn't be loaded and report why.
Record values should not be passed by keyword to "Model.create": there
is no requirement or guarantee that overriding methods call the
parameter "vals".
After further considering PR #21's arguments, the setup script should
not go around setting `color.ui`:
* it shouldn't be needed for recent gits with default compile
settings[0]
* it may override advanced users's own colour configuration/
customisations (or disabling)
* it forces default colours on users for which it may be useless
(colour- blind) or even detrimental (other vision impairments)
* some linux distributions apparently default to idiotic pagers which
can't handle ANSI colour codes by default and spew garbage to the
terminal
[0] https://github.com/git/git/blob/master/Documentation/RelNotes/1.8.4.txt#L178-L180
After further considering PR #21's arguments, the setup script should
not go around setting `color.ui`:
* it shouldn't be needed for recent gits with default compile
settings[0]
* it may override advanced users's own colour configuration/
customisations (or disabling)
* it forces default colours on users for which it may be useless
(colour- blind) or even detrimental (other vision impairments)
* some linux distributions apparently default to idiotic pagers which
can't handle ANSI colour codes by default and spew garbage to the
terminal
[0] https://github.com/git/git/blob/master/Documentation/RelNotes/1.8.4.txt#L178-L180