Since (at least) Chrome 94+, some element's sizing computation returns a
slightly different value (in the order of a fraction of a pixel). Sadly,
due to rounding, this difference has an impact on exact sizing
assertion.
As the difference is *really* small, introducing a margin of error (i.e.
<= 1px) looks reasonnable ; as implemented in this commit. More
specifically as Element.scrollHeight can have either an int or a decimal
value (cf. fractional-scaling), this commit allows to property handle
both usecases.
Reference:
https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#determine_if_an_element_has_been_totally_scrolledclosesodoo/odoo#92328
X-original-commit: 93348ae0d0b076fe2dfa094a2d7b3ef74442d390
Related: odoo/enterprise#27790
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
*: website_mass_mailing
Before this commit, some types of buttons were not managed by the
editor, only the primary, secondary and link buttons were supported.
However, if there is another type of btn in the DOM, the editor must be
able to handle it. This commit allows to manage all types of buttons in
the editor. This commit also adds a test so that the bug does not come
back.
Steps to reproduce the fixed bug:
- Drop a block with a <a> with the btn-success class
- Click on the button to edit it
- The link tool part in the editor does not work properly
or
- Drop the newsletter block
- Save and register to the newsletter
- Edit the new "Thanks" button
- The link tool part in the editor does not work properly
opw-2802139
closesodoo/odoo#92325
X-original-commit: 4c68b3e923610e1d573b4bd2b241b2fc5923c412
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is a copy of 7ddcebfc, which was reverted in dfcfe63c.
Before this commit, the menu_service was not included into the
`pos.assets_backend` bundle which was fine until we had to add
a dependency to `menu_service` in a file which is included in
`web.assets_backend`. Since pos.assets_backend imports pratically
all `web.assets_backend` bundle, there was dependencies errors.
The sublient issue is that the pos bundle was built relying on a
specific feature (the primary copy of Qweb templates) which was
dropped when we introduced the new assets manager (8cc06617).
There a two other approaches that we could consider:
- Create a new bundle `web.assets_backend_primary` that would be
called separately by `web.assets_backend`and `pos_assets_backend`,
it would mimic the dropped behaviour
- Change the `pos_assets_backend` to manually call every specific
element they need to function, which would prevent the depepdencies
issues
Unfortunately, both solutions are not realistic on a stable release,
which is why we chose to reintroduce this patch, and will fix the POS
bundle properly in master, where the side-effects can be handled.
After this commit, there are no dependency issues, and the menus
are not loaded, as expected and as before.
Part of task 2860257
closesodoo/odoo#92324
X-original-commit: b077fe72e8d9338e802cbceb580f3abcb6938462
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
Since [1], during the call of `apply_inheritance_specs` in charge of
resolving all the xpath of inheriting views and building the whole
primary view, processing instructions were added to mark the locations
where nodes were removed. Before that commit, another system was in
place where the following node next to the removal was marked via a
meta-oe-xpath-replacing attribute.
The problem with that change is that some of those processing
instructions were actually not removed once the branding was distributed
before the view was served... indeed all processing instructions which
were in the `<head/>` or a t-ignore area were ignored instead of removed.
This was actually already the case with the old system of the attribute
"meta-oe-xpath-replacing" but it was never noticed (as either the
attribute was there but had no effect or was indirectly gone if it
landed on a `<t>` node).
After [1], a bug was reported in 15.0 with the website configurator
where the processing instruction actually made some nonsense appear on
top of the page (at least without the work being discussed at [2] which
makes it so processing instructions act as HTML comments as it should
normally be the case).
[1]: https://github.com/odoo/odoo/commit/f67832a3ae0d9a3b5b53129132762e6bc1aed874
[2]: https://github.com/odoo/odoo/pull/92213closesodoo/odoo#92316
X-original-commit: 4310d012a16f982c2336d084254b5c5617794ee2
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The kanban view for sales team is defined with a progressbar widget to
indicate sales target. There was a .include of KanbanRecord to customize
the behavior of that widget whenever the target value was not set. This
was problematic for the following reasons:
1. it is a .include, so it is applied to all kanban records in odoo
2. it is a lot of code,
3. and it mostly duplicate the editing logic in the progressbar widget
With this commit, the .include is removed, and a new
'sales_team_progressbar' widget is introduced to mimic the previous
customization. This should be safer and easier to maintain.
closesodoo/odoo#92071
Related: odoo/enterprise#27747
Signed-off-by: Géry Debongnie <ged@odoo.com>
The kanban view was recently improved to add the support of 'action' and
'type' attributes on the kanban arch. This commit takes advantage of
that change to simplify a few views in various addons.
Part-of: odoo/odoo#92071
It is very common when using kanban view to need a way to declare what
action is executed when clicking on a record. The default action
(switching to form view) is sometimes not what we would like. For
example, clicking on a project kanban record should open the
corresponding tasks, instead of the project form view.
Until this commit, it was not possible to do this simply for a whole
kanban record, however it was possible to add a button with a name and
type attribute to specify the resulting action. This commit introduces
the same idea, but on the complete kanban record, instead of just a sub
element.
To specify the action that should be executed when clicking on a record,
one can now use the 2 attributes 'action' and 'type' (which corresponds
to the 'name' and 'type' attribute for the kanban record. 'name' was
also considered, but it was too weird). For example:
<kanban default_order="name" action="action_brand_model" type="object">
...
</kanban>
Part-of: odoo/odoo#92071
Since (at least) Chrome 94+, some element's sizing computation returns a
slightly different value (in the order of a fraction of a pixel). Sadly,
due to rounding, this difference has an impact on exact sizing
assertion.
Specifically in these drag-and-drop tests, it prevents the sorting from
being triggered as the "mouse" doesn't pass beyond the center of the
destination element (aka. next row).
By setting the position to `bottom`, this commit mitigates this issue by
making sure to pass that boundary, just like a real-user would do.
closesodoo/odoo#92292
X-original-commit: ed798b216063caa299800a56c617277aabdfb8fd
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
This commit improves cross-browser compatibility for the `user-select`
property by adapting the css statement to Safari's Webkit syntax.
task-2838625
closesodoo/odoo#90476
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Prior to this commit, there was no mobile layout adaptation on
`NotificationGroup` and this creates some design inconsistencies with
the other components (`ThreadPreview`, `ThreadNeedactionPreview` and
`NotificationRequest`).
This commit fixes these inconsistencies.
task-2838625
Part-of: odoo/odoo#90476
Prior to this commit, there was still some unnecessary css that was
creating conflicts since the revamp of mixins in `NotificationListItem`
(commit: 7760c54ec09f93488ccb89d2925b6655fdb0092f).
This commit removes this unnecessary css.
task-2838625
Part-of: odoo/odoo#90476
Define "Bootstrap v5 ready" utility-classes to handle font-size.
These classes definitions can be safely removed after migrating to v5.
task-2838625
Part-of: odoo/odoo#90476
This provides a new API for those operations, in order to make the
distinction between the use cases more explicit. The former API was
using obscure parameter combinations to correspond to various cases.
In the summary below, `fnames` is an iterable of field names. If the
parameter is not given, it means "all fields" in the given context.
Note that method recompute() is now mostly private, as it should not be
used in business code.
# process pending computations and updates
records.env.flush_all() # all fields of all models
records.flush_model(fnames) # the fields of all records of the model
records.flush_recordset(fnames) # the fields of the given records
# process pending computations, became non-public methods
records.env._recompute_all() # all fields of all models
records._recompute_model(fnames) # the fields of all records of the model
records._recompute_recordset(fnames) # the fields of the given records
# invalidate the cache of fields
records.env.invalidate_all() # all fields of all models
records.invalidate_model(fnames) # the fields of all records of the model
records.invalidate_recordset(fnames) # the fields of the given records
Part-of: odoo/odoo#87527
The users shouldn't be able to edit the answers from the attendees as they don't know
what questions they are answering to or the type of response expected.
opw-2845524
closesodoo/odoo#92283
X-original-commit: 379f8702a9759cdec533e29f43f15bca74de3b43
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
Current SCSS is replaced with global Bootstrap classes, in
order to reduce code lines and to increase performance.
Task-2834810
closesodoo/odoo#90174
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Currently, clicking on the blocking stat button throws an error when
there is more the 1 task in blocking stat.
So this commit, fixes the issue by removing the extra comma so that
clicking on blocking stat button doesn't throws an error.
task-2834743
closesodoo/odoo#92257
X-original-commit: cd7b7b02523e0982366f4ca60b6df2448d7e9cb5
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
In fixing leftover jammy warnings in #92078 I mistakenly updated the
setting of `_daemonic` to the public `daemon`, missing that it was a
dedicated and explicit workaround for Python's checks (cf
d03b4f8675).
closesodoo/odoo#92255
X-original-commit: e35a4d87578a588e33f604638289ca7e7ee02029
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
When using a sub-location of "Subcontracing Location" and a dropshipped
component, the purchase order doesn't have any dropship address.
To reproduce the issue:
(Enable debug mode)
1. In Settings, enable "Multi-Step Routes"
2. Create a new location L:
- Parent: Physical Locations/Subcontracting Location
- Type: Internal Location
3. In Rules, duplicate the rules of route "Dropship Subcontractor on
Order" and replace "Physical Locations/Subcontracting Location" with L
4. Create two products:
- P_finished:
- Type: Storable
- Vendor: V_subcontractor
- P_compo:
- Type: Consumable
- Vendor: V_compo
- Routes: Dropship Subcontractor on Order
5. Edit V_subcontractor:
- Subcontractor Location: L
6. Create a bill of materials:
- Product: P_finished
- Type: Subcontracting
- Subcontractor: V_subcontractor
- Components: 1 x P_compo
7. Create and confirm a purchase order:
- Vendor: V_subcontractor
- Products: 1 x P_finished
8. Open the purchase order linked with P_compo
Error: the Dropship Address is not defined
This address is defined thanks to the value of `partner_id`:
https://github.com/odoo/odoo/blob/aec7fcdb693729f432ae2341c00ef317b65fbcbc/addons/purchase_stock/models/stock_rule.py#L300
However, this key is missing
OPW-2721474
closesodoo/odoo#92249
X-original-commit: 587d8cd0ecb956a5c1b1a32a7abadea3019f848e
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Define "Bootstrap v5 ready" utility-classes to handle border-width.
These classes definitions can be safely removed after migrating to v5.
task-2842691
Part-of: odoo/odoo#91298
Current behavior:
If you create an order in a PoS then go in the backend and archive
any of the product in the order. If you try to go back in the PoS
session it will crash
Steps to reproduce:
- Open PoS session and create an order with some products
- Leave the session and archive atleast one of these products
- Go back to the session, the session crash
opw-2854018
closesodoo/odoo#92248
X-original-commit: 0a01e0b97f96754ac2ae84da207584b6b6860b0e
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
Before this commit, when a view contained a ProcessingInstruction node
`<?XXX YYY?>`, if this was rendered via qweb, it was leading to very
strange results in the form of
```
<<cyfunction ProcessingInstruction at 0x7f538c4902b0>>YYY</<cyfunction ProcessingInstruction at 0x7f538c4902b0>>
```
After this commit, it will lead to "<?XXX YYY?>" being rendered which
will automatically be parsed into an HTML comment if reaching a browser:
```
<!--?XXX YYY?-->
```
Note: this will be rendered only if preserve_comments is set to true.
This was added following [1] which actually led to an issue where some
ProcessingInstruction nodes were rendered by mistake. That was fixed
with [2]. With this commit, that kind of mistake will silently fail
(which may not be good) but will lead to no harm and allows to better
debug such cases (by actually allowing rendering what was in the view).
[1]: https://github.com/odoo/odoo/commit/f67832a3ae0d9a3b5b53129132762e6bc1aed874
[2]: https://github.com/odoo/odoo/commit/de348b3f818adcf2068deb629e612c246a6a4374closesodoo/odoo#92213
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Allows the timesheet overtime computation to be based on the contract
the employee had on the day of the timesheet instead of his current
contract. The employee creation date of the demo data is set in the past
in order to ensure demo data works properly.
task-2652259
closesodoo/odoo#88742
Related: odoo/enterprise#24910
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Before this commit:
BasicModel.localdata is not getting updated after follower removed
After this commit:
BasicModel.localdata is getting updated after follower removed
Task-2810734
closesodoo/odoo#91928
X-original-commit: c5da228
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Current behavior :
While having DIN 5008 (external_layout_din5008) as document's layout, an error
occurs when you try to validate & send a signed document, which has been uploaded
Steps :
- Install Germany - Accounting (l10n_de) and Sign
- Set Document's Layout to DIN 5008 in the Settings
- Go to Sign, then
- Upload a pdf
- Insert a sign field
- Send it
- Try sending the document after signed it
Reason :
sign.request doesn't have name field which is used in DIN 5008 layout [1]
[1] : https://github.com/odoo/odoo/blob/d5b8c26c46b1daf795a6b286af80bb4dad8072ff/addons/l10n_de/report/din5008_report.xml#L107
OPW-2763962
closesodoo/odoo#92218
X-original-commit: c6d9988710e4414f787f85ad652674d0d72223fc
Signed-off-by: Claude Thibault (thcl) <thcl@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
task-id: 2806842
PR : https://github.com/odoo/odoo/pull/87636
- Implement an 'address.provider' structure, designed to be extendable and support multiple providers (not just google)
- Add a module website_sale_autocompletion, that could be relocated without too much hassle
- Add a module autocompletion_google_places thats adds google functionalities on top of the previous module
closesodoo/odoo#88782
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Task-id : 2791237
PR : https://github.com/odoo/odoo/pull/87636
Allows customers to see a list of delivery carriers as shops in the website page;
A delivery carrier may now be an onsite one, which means the client comes to the corresponding store to pickup the products.
Also adds a payment acquirer based on wire transfer, for paying on site.
The customer can only pay on site if he also comes to pick the product on site
Notes :
- If a warehouse is set on a delivery carrier, the sales order will take it's address.
closesodoo/odoo#87636
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Since [1] gradient color steps cannot be moved anymore for the text
foreground and background colors.
This was already modified in [2] but it did not address the case of the
color palettes.
This commit makes sure that the mousedown events are not prevented
within the color palettes that are spawned within the toolbar.
Steps to reproduce:
- Drop a "Text - Image" snippet.
- Select the text header line.
- Apply a custom text gradient.
- Add an intermediary color step.
- Try to move the new color step.
=> Color step could not be moved.
[1]: https://github.com/odoo/odoo/commit/57701b2125f7de4fc543bd9c10642a5c11fa32b8
[2]: https://github.com/odoo/odoo/commit/84fd0b0a1bc1d874e7d6d6ff10b4fb6351f5a1af
task-2862233
closesodoo/odoo#92210
X-original-commit: 50342251895d8397788c3f914a2e7abf5439813f
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Python 3.10 formally deprecated the old threading API. This was missed
in #88803.
Also apply a few other fixes and improvements:
- `Thread._daemonic` is a non-public unchecked internal attribute, use
the corresponding documented property
- remove unused assignment to unused local
- define `Event` attribute in `__init__` where it belongs
- cleanup spawning on thread to do everything in ctor (permissible
since 3.3)
- fix import to not rely in implicit sub-module imports
closesodoo/odoo#92187
X-original-commit: 87d087ff7d53394dd991099cf7eac37d1ef68423
Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
This commit tries to avoid a traceback when no postgresql connexion is available.
closesodoo/odoo#92195
X-original-commit: 8199daf4bcba76277fed39554863efa3f1585b20
Signed-off-by: Josse Colpaert <jco@odoo.com>
In order to be able to use #86723 Odoo needs to be used as a local
proxy. With this commit, a new install type `Local Proxy Mode` is added
to the windows installer. When chosen, this install type does not
install the PostgreSQL server and it adds the `hw_l10n_eg_eta` as a
server wide module. It also generate and sets a proxy token.
While at it, the windows packaging is a bit improved:
* the VM now uses the virtio drivers
* the installer size and speed is improved
X-original-commit: 8586f78af36616d8014caf7ec9e44d8f6549d10d
Part-of: odoo/odoo#92195
This commit adds a `genproxytoken` command to generate and set an access
token for the proxy mode in the config file.
X-original-commit: 41a7224b46b3b163789257efd4583ef2d74479ba
Part-of: odoo/odoo#92195
For the egyptian localization, it is necessary to electronically sign invoices before sending them to the egyptian tax authority (ETA). This module is a proxy server located on the user's pc which will interact with a secure thumb drive provided by the governement which contains the private key used for signing.
X-original-commit: 71c3f46ead217ac89718aa34d94914452c75e699
Part-of: odoo/odoo#92195
Follow-up of https://github.com/odoo/odoo/pull/90893
Improvements of message action list introduced a gap of clickable
part of button between button and the container of buttons.
This commit fixes the issue by removing this gap.
Also fixes an issue where the icon buttons were too small in mobile.
Task-2862366
closesodoo/odoo#92196
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This patch was previously defined globally, but it has been removed at some
point. This absence prevents from running some tests that relied on it when the
current browser value does not match what the test is expecting.
Part of task-2810734
Part-of: odoo/odoo#92193
Computing the fields instead of storing them allows to implement the
feature for each provider more easily, without needing a migration
script.
task-2841744
closesodoo/odoo#91961
Related: odoo/enterprise#27618
Related: odoo/upgrade#3535
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Set appropriate padding around the chatbox search bar and aligned it with the
header content.
Task-2844934
closesodoo/odoo#91900
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit improves the design of the `_quickSearch` component, by
adapting its design to the logic of Bootstrap's `form-control` class.
Task-2823729
closesodoo/odoo#88710
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Current SCSS is replaced with global Bootstrap classes, in
order to reduce code lines and to increase performance.
Task-2823729
Part-of: odoo/odoo#88710