Before this commit, load_action and load_views were never resolved
in case of internet connection loss.
It's because the call is triggered by web.rpc direcly who uses
ajax.rpc without any response check.
Now the rpc response is checked in web.ajax.
Thereby all responses are handled whether they come from session.rpc
or rpc.query.
Plus, it was not the responsibility of the session to check the
rpc responses.
Steps to reproduce the issue:
(1) load_action:
- Go to the app switcher for the first time
- Force disconnected from the network
-> No notification appears and the user aren't notify
(2) load_views (mobile only):
- Go to Sales -> Quotation
(In this case, the first call is 'load_views' because we need to force
to load some views like kanban view)
- Force disconnected from the network
-> No notification appears and the user aren't notify
Note: It's now important to notify the user about connection loss
because a recent improvement in mobile app replaces the 'retry screen'
and lets the webclient handle connection issues by itself.
The single odoo mobile app is supposed to work with all databases
from 10.0.
In LESS, 'fadeOut' function is used to make a color more transparent.
In SCSS, that function is called 'fade-out'.
Closes https://github.com/odoo/odoo/pull/25233
When manually registering a time on a Work Order, an error is raised
because of an incorrect value for `workcenter_id`.
The field is added in the view.
opw-1851766
- Stripe.js was limited to only a few pages, which means, if you tried to
implement a new payment route it would never work without modifying
stripe.js to support the new case.
This commit allows stripe.js to be generic and work with any page.
Before this commit, load_action and load_views were never resolved
in case of internet connection loss.
It's because the call is triggered by web.rpc direcly who uses
ajax.rpc without any response check.
Now the rpc response is checked in web.ajax.
Thereby all responses are handled whether they come from session.rpc
or rpc.query.
Plus, it was not the responsibility of the session to check the
rpc responses.
Steps to reproduce the issue:
(1) load_action:
- Go to the app switcher for the first time
- Force disconnected from the network
-> No notification appears and the user aren't notify
(2) load_views (mobile only):
- Go to Sales -> Quotation
(In this case, the first call is 'load_views' because we need to force
to load some views like kanban view)
- Force disconnected from the network
-> No notification appears and the user aren't notify
Note: It's now important to notify the user about connection loss
because a recent improvement in mobile app replaces the 'retry screen'
and lets the webclient handle connection issues by itself.
The single odoo mobile app is supposed to work with all databases
from 10.0.
Recently a ref() has been converted into a direct xml id match. As this
does not return a recordset but an ID, the .id that follows is not
necessary anymore.
In order to avoid the access error when trying to view a partner form
view we should hide the event count stat button for the users who don't have
access to it (must be event_user or event_manager to read this field).
Closes#25225
The controller /event/<model("event.event"):event>/registration/confirm
was broken since the portal user cannot read event.registration objects.
In 9.0 this was not an issue as we browsed and sudoed the
event.registration, but since in 10.0 this line disapeared so did the
sudo which this commit reintroduces.
This information does not add a real interesting value when dealing with jobs
as this is a concatenation of documents linked to the jobs and to applicants.
Computation is heavy and could lead to performance issues. We choose to therefore
not show the document count and keep the icon.
- Create a product with -4.0 Units in stock
- Set the Buy and MTO routes, assign a vendor
- Create a SO for 25 Units
- A PO of 25 Units is created => validate and receive products
- Check availability on the picking linked to the SO
Nothing is reserved, while 21 Units could be reserved.
opw-1850688
Co-authored-by: Nicolas Martinelli <nim@odoo.com>
This sets the field country_enforce_cities readonly in order to skip inverse field's write on contact creation.
Was PR #24686. Courtesy of Carlos Lopez
If we applied a link eg. on:
```
<span>hello <b>world</b></span>
```
The system actually gets the "label": hello worldworld because there is
3 nodes:
text node: hello
element node: `<b>world</b>`
text node: world
Also since "hello worldworld" is different than "hello world",
instead of just keeping existing nodes and adding the link, the system
would replace the selected range by:
`<span><a>hello worldworld</a></span>'
instead of:
`<span><a>hello </a><b><a>world</a></b></span>`
This commit ignores element nodes when creating a new link, since when
getting the label of the link from the selection, only the text nodes
insides the element nodes have any interest.
There was a second issue because if we had:
```
<i><a href="hello">world</a></i>!
```
and tried to put a link over "world!", the code would decide: "world" is
inside a link so we will just update that link.
Thus we would get:
```
<i><a href="hello">world!</a></i>!
```
instead of:
```
<i><a href="hello">world</a></i><a href="hello">!</a>
```
opw-1848351
closes#25187
Field 'name' (Label) on account_move_line isn't required. When
following the usual flows, it is automatically set by the system.
However, one can manually create move lines without specifying it.
When this occurs, the Sale/Purchase Journal can't be printed
anymore because it causes a crash.
OPW~1857663
The lower-level widget itself supports passing options to the underlying
datepicker library. However this is not exposed to higher-level view
declaration. With this patch, one can declare a field in a view such as:
```xml
<field name="datefield" options='{"daysOfWeekDisabled": [0, 6]}'/>
```
That option would land in the widget and disable those weekdays.
Documentation has been updated accordingly.
Closes#25044.
Before this rev., if you went to Sales > Sales order, switched to
calendar view, edited the arch such that 'color="state"' is
replaced by 'color="invoice_status"' on the root node, it crashed.
The reason of the crash is that a possible value of the
'invoice_status' selection field is 'to invoice' (it contains a
whitespace), and the JQuery selector didn't wrap the value by
quotes.
OPW~1856305