Create a hr.attendant in a stage where a mail template is present.
Fill the email field as: Name Surname <name@surname.com>
Before this commit:
- the created partner's email has been rendered as name@surname.com>
- the email failed to be sended because of this
This was because Jinja rendered that snippet escaping the special characters
Putting a 'pipe' safe in the snippet does the trick
After this commit:
both the partner and the email are created successfuly
OPW 1830739
closes#24059
Also when there is both a docstring and directive-level content put
the docstring first. That seems to match what Sphinx's autodoc does
and looks less odd.
Possible future improvement: a parameter to suppress the docstring?
Possibly a way to reorder the non-docstring content (e.g. members
documentation)?
- Install Website
- Load the 'Norwegian Bokmål' translation, and choose to translate the
website
- Logout
When accessing the website, the language displayed is not consistent to
the browser language.
1. `no` shows homepage in `nb_NO` (Firefox only) => expected since
Bokmål is the main language in Norway
2. `nb` shows homepage in `en_US` => unexpected
3. `nn` shows homepage in `en_US` => expected since 'Norwegian Nynorsk'
is not a language available (this will be the topic of another PR)
The issues comes from Babel's side, since `nb` is not in the
`LOCALE_ALIASES` while `no` is. We monkey-patch the value to avoid this
while Babel is corrected.
opw-1827258
* add UUIDs to XID sections (4 bytes / 8 hex digits) so it's not
necessary to handle collisions & add a fallback generator
* use COPY for performances over executemany: executemany just
performs an implicit loop on all statements (in psycopg2)
* ~pure SQL was possible:
INSERT INTO ir_model_data (module, model, name, res_id)
SELECT
'__export__',
'{model}',
'{table}_' || A.id || '_' || uuid_generate_v4(),
A.id
FROM {table} A
LEFT JOIN ir_model_data B
ON A.id = B.res_id AND B.model = %s
WHERE B.res_id IS NULL;
but would have required installing pg extensions (problematic
especially in stable) and performances are about the same as
the COPY version
task 36343
Fixes#22493
Using `break` when looping over a recordset in a compute method could
have side effects. Computed field are computed in batch, according to
the order of the recordset, the value may only be computed correctly for
some records
related to rev c493569866
opw-1833347
- Create a vendor bill, save and validate
- Duplicate the bill, save
- Click on "Create"
A customer invoice is created, while the user expects a vendor bill.
After duplication, the new record is loaded but the context is lost.
Since the default value for the invoice type is based on the context key
`type`, a loss of context leads to an incorrect invoice type.
opw-1826453
Co-authored-by: Géry Debongnie <ged@odoo.com>
Before this commit:
In the web_editor in backend, entering edit mode would display differently text
in `div` and text in `p` but not when viewing the content outside edit mode.
Now, `div` and `p` won't have different style when entering edit mode.
category was changed to "Website" so it'd appear under the website
category in the store, but it needs to be "Theme" otherwise it doesn't
appear in the "Choose your theme" menu after installing website.
This is a backport of 10.0 https://github.com/odoo/odoo/commit/3d53a740
Without extra themes, the "Choose your theme" would be empty.
fixes#21898
opw-1802936
closes#24042
We want to force the tax template to be blank always, because multiple companies can potentially use this template to create taxes. We want consistency company-wise.
Before this commit, if you or a lib uses Glyphicons, the font was loaded from
/web/content/fonts/ (or /web/static/src/less/fonts/ in debug=assets)
It is because bootstrap is imported from /web/static/src/less/import_boostrap.less
not directly from /web/static/lib/bootstrap/less/bootstrap.less
Now, we use absolute path to load font, overriding the variable define in
variables.less from bootstrap.
Since rev. odoo/odoo@cd05983 it was not possible to submit a survey if a date
field was empty (trying to set `toJSON` on `null`).
The datepicker `date` function returns `null` if no date has been selected.
opw-1832381
When sorting events according to some property that is not defined for all
events, Odoo would give a traceback as it would try to compare a boolean to some
other type.
We simply lift every value to a (boolean, X) tuple for any type X in the
sorting key function, thus having values of homogenous type.
opw 1831457
The global link was redirecting to http://getbootstrap.com/components/ (without
the fragment identifier).
Moreover, now that Bootstrap 4.0 is released, this URL may be broken in a close
future.
Closes#24031
When installed, marketing_campaign shows the root "Marketing" menu by
default but this menu is not an action and just contain a
"Configuration" submenu without action as well.
Thus in community we got on a page without content, and on enterprise we
got a JS error.
note: only happen in 9.0
fixes#21898
opw-1802936
closes#24026
Have your user and your system in timezone Sao Paolo
When it is 2200 TZ time, UTC is the day after 0100
Have a activity schedule for today
Before this commit the activity was flagged as overdue.
This was because we compared the date deadline of the activity (no TZ)
to the date.today() in Python
While date do not have TZ legitimately, the moment (and place) you create them matters
Thus, we compared the date of the server (UTC -- day +1) to a date set by the user (TZ -- day -1)
After this commit we make up a date according to the user's tz
And the activity is not overdue, but in state 'today' as it should
OPW 1827920
closes#23969
- Open in debug mode the 'beetle'
- Click on open view
- select a Tree view in the list
Before this commit: A traceback appears
This was because while the Tree view per se has been discontinued
the mode 'tree' of an action must be supported
Which was not the case for this particular widget
After this commit: the list view asked for appears
OPW 1833008
closes#23963closes#24005
When saving the settings, we perform a `write` on the groups and implied
groups. This will trigger a recomputation of the fields `share` on
`res.users` and `partner_share` on `res.partner`.
On a database with many users, this can lead to a non-negligible time
spent in these methods.
opw-1830145
We transform the rrule stored as a string into a real
rrule object using 'rrule.rrulestr'. The 'UNTIL' parameter
of the rrule might not be timezoned. So the '_until' property
of the rrule object will be a naive datetime.
Later in the '_get_recurrent_date_by_event', we add the recurring
date in the '_exdate' property, but those dates are timezoned.
When iterating on the rrule set (its a set since forceset=True), the
until date and exdate are compared, but it cause crashes as we can not
compare offset-naive and offset-aware datetimes.
This commit make the rrule use only naive or aware datetimes for its
'until' and '_exdate' properties depending on the 'until' property
of calendar.event rrule field.
opw-1825679
closes#24010
Steps to reproduce the bug:
- Set your user in multi company
- Set a default analytic account A for product P with your company
- Create a PO with P and deliver it
- Generate the invoice.
Bug:
The analytic account A was not set on the line.
opw:1831998
Before this commit, some breaking spaces were present in the js code.
Such spaces are misinterpreted and worked by luck.
This has become a problem with exported js bunldes (e.g. the
external_lib bundle in im_livechat).
This commit replaces breaking spaces by regular spaces.
Correct account invoice line form view so studio doesn't fail on
something that doesn't seem really correct (and somehow worked thanks
to pyeval implementation or the override from another view type).
opw-1826254
opw-1830171
closes#23997
On 'My attendance', do some check-in/out operations
while on the server side, everything was ok, the display had some issues:
On Chrome, that worked well whereas in Safari, it did not
since the Date() implementation only accepts ISO date strings
We take the opportunity of this fix to handle dates with moment.js, which accepts non-ISO formats
OPW 1831555
closes#23962
When creating sales/purchase receipt for a journal having a secondary currency, an error was raised as the amount_currency had the wrong sign (compared to the debit/credit).
Was Issue #1819396. Was PR #23768
Steps to reproduce the issue in 11.0 Enterprise:
- Go to the language English
- Remove from the time format the seconds
- Refresh the page
- Go to sales
- Create a sales order;
Bug:
- You get the warning message
closes#23596closes#22027
opw:1829577
The code in res config that enabled or disabled internal operation type
did not take into account that active_test is set to False inside this
type of code since c2e259d8.
Thus a picking type of an archived warehouse would possibly unexpectedly
be enabled after saving the settings.
opw-1826196
closes#23956