The domain of `work_location_id` requires the company_id and address_id
which were missing from the tree view, showing a traceback when trying
to change that field.
closesodoo/odoo#101195
X-original-commit: 8376adc197208490bf3e4ce0ddbdb6f8e1ae6c60
Signed-off-by: Kevin Baptiste <kba@odoo.com>
With the change to 'always edit' on form views by default, several
'oe_read_only' fields had to be modified to play nice with the fact
that in most cases, there is no read_only mode
closesodoo/odoo#101188
X-original-commit: 868992abeeda983768323e1126b5643eff8fdb33
Related: odoo/enterprise#31810
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
Since [1] when the bus service was adapted to wowl, the assets watchdog
service was imported in the frontend. Because the assets will be the
right ones on the next visited page, the notification it might trigger
is seen as degrading the website UX.
This commit removes the assets watchdog service from the frontend
pages.
Steps to reproduce:
- Visit a public page in a tab - keep it open.
- From a different browser, log in and rebuild assets.
=> Notification appears in visitor's tab.
[1]: https://github.com/odoo/odoo/commit/3ae11c87e8a395219229416c2777bcdcdacd08ac
task-2922959
closesodoo/odoo#101186
X-original-commit: d2efe6220281c00a9a6be154113ff20c0745dde6
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Since #97888 it was possible to request a leave during a stress day that
covered multiple day due to a typo in the logic.
task-2995191
closesodoo/odoo#101171
X-original-commit: 7fdb1a9980adeb5fded58b6715c3c6a5b66099ed
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Current behavior:
In the sales report of a product, the margin was not appearing
for product that were sold in the PoS.
Steps to reproduce:
- Activate the margin option in the settings
- Create a product available in PoS, the product should have a price
and cost set
- Start a PoS session and sell the product, then close the PoS
- Go on the product page, click the "Sold" smart button
- Add the "Margin" measure to the pivot
- There is no value in the margin column
opw-2937616
closesodoo/odoo#101168
X-original-commit: b230194d8f6a93d374a31f05e74c8fb26277d905
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
Setting width *and* height attributes allows to reserve some space to
avoid layout shift during page loading. Of course, CSS rules set the
height the user chose, while the width is set to 'auto'. But while the
image is loading, it is best to already reserve some width to reduce
layout shift (like making the menu move or even re-render itself into a
"+" menu).
The chosen values for the space reservation are the ones of the default
logo and theme, but it does not really matter as long as they are
coherent. While the image is being loaded, the chosen user height is
still applied and the 'auto' width rule induces a width that respects
the aspect ratio set by the width and height attributes. That could be a
problem if the real logo has a larger height than width, in which case
the layout shift would be increased because of the arbitrary values set
as width and height, but in most cases, this should reduce it.
This also allows to gain some page speed scoring.
Examples:
=# Logo 200 x 100, height set to 50
Before this commit
- while loading: width = 0, height = 50
- once loaded: width = 200 / 100 * 50 = 100, height = 50
-> layout shift of 100 - 0 = 100
After this commit
- while loading: width = 95 / 40 * 50 = 118.75, height = 50
- once loaded: width = 200 / 100 * 50 = 100, height = 50
-> layout shift of 100 - 118.75 = -18.75
=> Shift of 18.75px to the left, way better than shift of 100px to the
right
=# Logo 100 x 100, height set to 50
Before this commit
- while loading: width = 0, height = 50
- once loaded: width = 100 / 100 * 50 = 50, height = 50
-> layout shift of 50 - 0 = 50
After this commit
- while loading: width = 95 / 40 * 50 = 118.75, height = 50
- once loaded: width = 100 / 100 * 50 = 50, height = 50
-> layout shift of 50 - 118.75 = -68.75
=> Shift of 68.75px to the left, kinda the same as a shift of 50px to
the right.
=# Logo 100 x 200, height set to 50
Before this commit
- while loading: width = 0, height = 50
- once loaded: width = 100 / 200 * 50 = 25, height = 50
-> layout shift of 25 - 0 = 25
After this commit
- while loading: width = 95 / 40 * 50 = 118.75, height = 50
- once loaded: width = 100 / 200 * 50 = 25, height = 50
-> layout shift of 25 - 118.75 = -93.75
=> Shift of 93.75px to the left, worse than shift of 25px to the right
but the case of having a 'portrait' logo is considered less common
than having a 'landscape' logo. Ideally, we should choose the
arbitrary values related to the most common aspect ratio.
closesodoo/odoo#101149
X-original-commit: 73786c5c45202914e02325c19a2afaa47d31c341
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
In order to improve the page speed score and avoid layout shift, set
both width and height of the tiny Odoo logo used in the copyright
section of the website footers. This was able to be done with no
drawback:
- Set the width and height attribute of the image being loaded
- Leave the CSS rule `height: 1em;`
- Add the CSS rule `width: auto;` (which was implicit before)
By doing this:
- Once the image is loaded, the behavior is exactly the same as before
- While the image is loading, the height is still using 1em but the
difference is that the "auto width" now know the final aspect ratio
of the image thanks to the width and height attribute -> the width is
thus the same as it will be once the image will be loaded (while it
was 0 before)
X-original-commit: a709a10e0b746242a6bca1af2ce92020ec917464
Part-of: odoo/odoo#101149
A "thematic break"[1] is composed of 3 or more characters (-, _,
or *). The current separator using only 2 characters between the main
body of the PR and the footer / addendum makes it more difficult to
interpret the message.
Update to 3 so e.g. the mergebot can strip the footer.
[1]: https://spec.commonmark.org/0.30/#thematic-breaksclosesodoo/odoo#101148
X-original-commit: c7bf932c9eb2fc9bc34c653c51bce1552d6afb54
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Not all employees have a company car. This commit adds a private license plate field on hr.employee.
The field allows the HR Officer and HR Administrator to search for emloyees based on their license plates.
If fleet and hr apps are installed, the search is based on both the company car and private car license plates.
task-2936873
closesodoo/odoo#101146
Related: odoo/enterprise#31796
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Before: On a map view, a bunch of points get loaded one by one. Each of
them triggering a new render of the controller. Currently, the useModel
hook does a deep render no matter what. If you are trying to set a
custom filter un the filter menu in the control panel, the content would
systematically diseapear (rerendered) when a new map point loaded.
After: To prevent this, setting the input node as t-model is a solution.
It allows owl to keep track of the value of the input and correctly
set it back when a render occurs.
closesodoo/odoo#100421
Signed-off-by: Géry Debongnie <ged@odoo.com>
The aim of this commit is to:
- allow OSS to use tax that aren't declare by TaxReportLine
- have the oss tax automatically populated with the correct tags for spanish
tax report
- Add taxes specific to the spanish OSS : No sujeto y acogidas a la OSS (Servicios) and No sujeto y acogidas a la OSS (Bienes)
using the official modulo 124 tag
closesodoo/odoo#101121
Community-pr: https://github.com/odoo/odoo/pull/99273
Task: 2930758
X-original-commit: 2a21e4c084ba952eba1b4a7bb6f6ee31875d70ea
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Camille Spiritus (casp) <casp@odoo.com>
Co-authored-by: Camille Casp Spiritus <casp@odoo.com>
This commit dynamically translate some content in the spreadsheet.
Static translated terms are extracted from the spreadsheet data.
One might think we could translate the spreadsheet upfront, server side,
by translating the data before sending it to the client but it could lead to
unexpected behaviors though:
Let's say a chart has a translated title, if you copy-paste it from one sheet
to another, you still want the title to be translated/translatable.
In other words: manipulating things in the spreadsheet should be done on
the raw, untranslated, data.
X-original-commit: 53dc147504bfc3ddabef61a2bae8610f526bf6ac
Part-of: odoo/odoo#101120
This commit extract translatable content from spreadsheet data.
- chart titles and description
- pivot and list names
- argument of _t() functions
- labels of links
X-original-commit: d210a55f48b316fdf38fcbe5ae5a70cf0e2c3814
Part-of: odoo/odoo#101120
This commit make it possible for design theme tours to define
preconditions based on the CSS variables in order to make sure that
the tour is run within a website that has the specific theme applied.
See https://github.com/odoo/design-themes/pull/590.
task-2687506
closesodoo/odoo#101119
X-original-commit: b29e17765f4e912b2dd472493b5be500b3a32c87
Related: odoo/design-themes#594
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit makes failing custom `run()` functions logged as a failed
tour step.
task-2687506
X-original-commit: bcd679f1d204a8c3f858aa03a992686545829e4b
Part-of: odoo/odoo#101119
Move the analytic items menu under the management section of
the Accounting menu.
closesodoo/odoo#101109
X-original-commit: 79e3f311ed9129fadc484446efd320fa58c7b5bd
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
Current behavior:
When the default intermediary account is the same as the default
receivable account define on customers, and you make a payment with
2 differents payment methods the invoice is not marked as paid.
Steps to reproduce:
- Set the Default Intermediary Account to be the same as the default
receivable account on customers. (You can get the default account
by creating a new customer and go in the accounting section and
look for "Account receivable")
- Start a PoS session, select a customer
- Add some product to the order and click on payment
- Click on invoice
- Pay with 2 differents payment methods (cash and bank)
- Validate the order
- The invoice is not marked as paid (Amount due > 0)
opw-2972726
closesodoo/odoo#101106
X-original-commit: 439f7ee0ceae01eaba6a5a352e45531d5e9c9167
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
The web tooling to lint/prettify the js codebase was only enabled
for master branches, because we want minimal diffs in stable.
However, v16 just got freezed, and we can afford to lint for a
while, at least until it is released. This commit enables the
script for v16, in addition to master.
closesodoo/odoo#101110
X-original-commit: 47ffd1b9efa933fa37c1b629afeeb4e3df123249
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, the no content helper was displayed just
below the control panel in empty list views, whereas it must be
displayed approximately in the middle of the screen.
The `position: relative` has been introduced recently, and doesn't
seem useful, so we simply remove it.
closesodoo/odoo#101108
X-original-commit: ee18aa1f6b85eb420e198775592a9e0772cc8475
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
*: adyen, authorize, demo, razorpay, stripe.
The param `create_refund_transaction` from `_send_refund_request` became
useless following this commit:
https://github.com/odoo/odoo/commit/e4c63126b45854b10f08ab14dee5eb1d4ed98bb0
It was only used for Authorize.net, which now works without calling this
param.
task-2869910
closesodoo/odoo#101105
X-original-commit: 6855d65df7a83037ee5e2202966fa4e67dae7d5a
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit prevents the "|" between the additional title and the
website or company name from being turned into a translatable `span`.
closesodoo/odoo#101102
X-original-commit: 81c7c4cdf973b36e8ed787f8247da3a4bbf93117
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, the popover was incorrectly
positionned because of the style of the legacy widget.
The legacy widget added some rules to add margin and an arrow
that the new component does not need.
closesodoo/odoo#101097
X-original-commit: bd4862774264c5169aa2dcf4cd80908c2f4c71bb
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, in a Kanban view, the group representing
a new column did not contain a domain. Its domain should have combined
the view domain and the groupBy domain ([groupByField.name, "=", id]).
How to reproduce:
- Go to a grouped kanban view with a progress bar
- Create a new column
- Create a record in this new column
- Click on the progress bar to filter the records on a state
Before this commit:
All records corresponding to the selected state are displayed in the
column. (even the records that are not part of the column)
After this commit:
Only the new record is displayed in the column.
closesodoo/odoo#101096
X-original-commit: 1022262c6fcd51c8d4fc8024217542bb1f536d2c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Purpose
=======
The template user groups are applied to new users, but this is not the
case for existing users.
To harmonize the flow, the added groups to the default user template are
synchronized with the existing users.
closesodoo/odoo#101086
X-original-commit: aefb05eb497a8a16a9359432f41024c09552ed70
Related: odoo/enterprise#31759
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
If called in cascade, this could lead to a situation in which a same
thread is trying to create recursively several registries when loading
the sames modules, which obviously cannot work in any way.
Use button_install instead, that will simply update the module state
while waiting to be installed in a proper way, instead of forcing
a registry creation that will mess the whole process.
X-original-commit: 6b52844a8dc78788cbd948c7e2f90156ee8b89d7
Part-of: odoo/odoo#101086
Before this commit, when website was not installed, the frontend used
the default bootstrap font. That font was not receiving the unicode
support Odoo provide in the backend or the frontend when website is
installed. This is probably visible on some portal pages in hebrew or
something like that, so this could back-ported in stable if found
necessary (in that case, the fix to the `o-add-unicode-support-font` in
this PR should be back-ported too).
task-2993054
closesodoo/odoo#101068
X-original-commit: f7cfcae0f0169774e0b66b8b8083005a7cd34eaa
Related: odoo/design-themes#593
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
To allow increasing page loading performance, websites can now choose to
use system fonts instead of using a google font. It is also the default
in the default theme of Odoo from now on. The option will automatically
be available for all themes whatever way they defined their available
fonts but will only be used as default if explicitly asked by the theme
(as done in the default theme).
task-2993054
X-original-commit: c0f2f670eb087991cc9a6a67f4beea5f12bd15f2
Part-of: odoo/odoo#101068
Before this commit, if a theme wanted to define a main font for their
theme and let the "headings", "navbar" and "buttons" ones use the same
they had to add this in their map:
```
'font': XXX,
'headings-font': null,
'navbar-font': null,
'button-font': null,
```
Indeed, without setting the "null" values, those font would use YYY
which is the first font defined in the theme config, which might be
different from XXX. And if forcing XXX 4 times, like most themes do at
the moment, if the user wanted to change them all, he had to change the
4 ones instead of the main one.
Now, only the 'font' value use the first font defined in the theme
config if not explicitly set. So forcing the null values is not
necessary, it will be the default behavior.
The advantage is thus also functional, as most theme forced all their 4
fonts so changing the main one did not change the others.
task-2993054
X-original-commit: c6b56955f62c6b837b477223daac2d87ab984efb
Part-of: odoo/odoo#101068
Before this commit, if a theme defined in its website values "palette"
"null" as value for the "headings-font" variable, it was properly making
the headings font use the default "body" font as expected but the editor
panel showed an empty value instead of displaying the "body" font value.
Now, that panel UI problem is fixed for the headings, navbar and buttons
fonts. Note that all our current themes force the font for each of those
component so the bug was never visible anyway. That's why it is merged
here in 16.0 and not before but it could be backported if necessary
(although it is only an UI bug which is not really confusing).
Before this commit, for a theme which says "use XXX as main font" and
"let headings follow the main font", the UI displayed:
Main font: XXX
Headings font: /
After this commit, it displays:
Main font: XXX
Headings: XXX
task-2993054
X-original-commit: b07a408f2f80638a2abdda8304e31d3dac9968b3
Part-of: odoo/odoo#101068
Before this commit, the function (which allows adding unicode support
to a font definition) relied on the fact "serif" or "sans-serif" was
defined last in the given font. If that was not the case, you had to
give the position in the given font stack where you want to include
unicode support).
Now, if no position is explicitly given, the function does not suppose
"serif" or "sans-serif" is defined last. It only supposes it is defined
somewhere in the stack, and put unicode support just before.
task-2993054
X-original-commit: 1f34ef2b64aad34ab533e77b1f31e434a5a17af1
Part-of: odoo/odoo#101068
Some views still use them.
closesodoo/odoo#101081
X-original-commit: adb5508afd2749dbbfeb85803d707df43358b011
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Before, the user had to manually unplug and replug the IoT Box to reboot it.
Also, it was required to connect to the IoT box to restart Odoo service.
This improvement adds the 'Restart Odoo' and 'Reboot IoT box' buttons on the box's form view to IoT app.
They allow the user to reboot the IoT box and restart Odoo service on it remotely from the IoT app in Odoo.
task-2476576
closesodoo/odoo#101045
X-original-commit: 662b41293315ae934502c683939d9820e4ca451a
Related: odoo/enterprise#31747
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Currently cannot see assigned user working on picking/batch in kanban view.
Added user_id in picking kanban view, and related user_id
from batch
TaskId: 2871679
ENT PR: odoo/enterprise#28886closesodoo/odoo#101026
X-original-commit: 943e5b9761b43257ec968c12f15723c618c3b5ad
Related: odoo/enterprise#31740
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Ahmed Khalaf <ahkh@odoo.com>
Copying an odoo chart gave a traceback since the method `copyInSheetId` wasn't implemented in Odoo Charts.
Odoo task 2987656
closesodoo/odoo#100748
X-original-commit: c26b8ee12857253c90b62b14c0a86c60457af4c2
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Minne Adrien (adrm) <adrm@odoo.com>
Given the group only contains EU27 members and the UK was specifically removed in 52cdfd22d7 it seems clear this group represents the European Union speifically rather than any other interpretation of "Europe".
Rename the group to match.
closesodoo/odoo#101051
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
When the kanban is grouped on a readonly fields,
it shouldn't be possible to drag and drop a record from
one column to another.
It was the case when the field was part of the view architecture,
but not when the fields wasn't part of the architecture,
despite we have the information as we have the field description
through the search view / the control panel.
This is a bug which has been introduced during the OWL conversion.
For instance, in 15.0, when grouping CRM leads by sanitized phone,
it wasn't possible to drag and drop records from one column
to another.
In master this is possible.
Besides, in the legacy code, the readonly information
is read from both the field in the architecture and the general
field descriptions:
- https://github.com/odoo/odoo/blob/67191359f2e71be85e6e72d64720bb2748008b3f/addons/web/static/src/legacy/js/views/kanban/kanban_renderer.js#L506-L515
In addition, compared to before,
this revision allows a new possibility compared to before:
Make draggable when grouped by a field which is by default
readonly in the model,
but which is set as `readonly="0"` in the view.
This is to be uniform with what is done in the list and form views.
closesodoo/odoo#101041
X-original-commit: 2a0f8d9ddba754cfc297b2a0de6e2c56990b1e61
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
*: crm,link_tracker,project,sale,utm
Before this commit, in some form and kanban views, there were
missing whitespaces, typically between icons and texts. This was
due to the transition to owl views, because we simply ignored
`&nbsp;` in archs. This commit also fixes a layout issue in
a project view, where the icon and the field should be displayed
in the same line.
closesodoo/odoo#101040
X-original-commit: f5813e348b6052436a4fabaa5837ecc37b15430e
Related: odoo/enterprise#31746
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Improve both tree and form views for the account.analytic.distribution.model
closesodoo/odoo#101001
X-original-commit: bb2820ad585ceed0f0562de3cd5f9ef8f1fac7d1
Signed-off-by: Ayob Habib (ayh) <ayh@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
Before this commit
In a nondeterministic sequence, the editor was not totally loaded
whenever the test `mass_mailing_editor_tour` dropped a snippet
in the page.
Now, by waiting for the attribute `data-editor-message` to be set,
we ensure that the state of the editor is ready for dropping a snippet
in the page.
closesodoo/odoo#100752
X-original-commit: a333c8ff6b48c7f614ee0a45321fdf176e9dc33b
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>