Commit Graph
118131 Commits
Author SHA1 Message Date
Adrien Dieudonne fc5d030ef2 [FIX] web: checks rpc responses in web.ajax
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.
2018-06-19 20:11:22 +02:00
Raphael Collet d3e2cf5585 [FIX] resource: methods plan_* can return naive datetimes
Make those methods return a datetime in the same (naive or aware) timezone as
their argument.
2018-06-19 16:44:56 +02:00
Olivier Colson 85156a8e32 [IMP] account: new bank account setup wizard: remove label on journal name field, for better usability 2018-06-19 10:45:50 +02:00
Kishan Gajjar 47b5c00181 [FIX] web_editor: properly compute scss files
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
2018-06-18 12:09:49 +02:00
Christophe Simonis a935d5bc83 [FIX] base: fail during previous foward-port 2018-06-15 15:11:06 +02:00
Christophe Simonis 73652a0b19 [MERGE] forward port branch saas-11.3 up to 50860317cc
Note: 1aacc96262 has been ignored and will
be forward-ported later
2018-06-15 13:27:27 +02:00
Christophe Simonis 50860317cc [MERGE] forward port branch saas-11.2 up to b170a753e1 2018-06-15 11:30:27 +02:00
Christophe Simonis b170a753e1 [MERGE] forward port branch 11.0 up to b05e4d5f95 2018-06-15 10:15:27 +02:00
jem-odoo 8a03563269 [FIX] sale_timesheet: remove useless field in sql view 2018-06-15 09:43:52 +02:00
Christophe Simonis b05e4d5f95 [MERGE] forward port branch saas-15 up to a53bea49fe 2018-06-14 21:28:39 +02:00
Christophe Simonis a53bea49fe [MERGE] forward port branch saas-14 up to 7c8f335988 2018-06-14 19:19:14 +02:00
Christophe Simonis 7c8f335988 [FIX] sale: do not load non-existing file
Revert fd2b130428
2018-06-14 18:29:59 +02:00
Nicolas Martinelli 5ac40752a4 [FIX] mrp: register time on WO
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
2018-06-14 18:20:52 +02:00
Nicolas Martinelli 7aef847585 [FIX] event: event stat button
Display stat button to groups who have read access to events.
2018-06-14 18:17:00 +02:00
Toufik Benjaa a3c9c286cc [FIX] payment_stripe: Make stripe.js code more generic
- 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.
2018-06-14 18:06:38 +02:00
Christophe Simonis 803df909b1 [MERGE] forward port branch saas-14 up to 804d68efe5 2018-06-14 18:05:38 +02:00
Christophe Simonis 804d68efe5 [MERGE] forward port branch 10.0 up to 23a1bce2a9 2018-06-14 18:03:26 +02:00
Christophe Simonis 23a1bce2a9 [MERGE] forward port branch 9.0 up to 90165e2d96 2018-06-14 17:29:56 +02:00
Christophe Simonis 90165e2d96 [FIX] WorkerCron: keep registry alive after job processing 2018-06-14 17:17:13 +02:00
Christophe Simonis 5233dbdb54 [FIX] core: do not clear cache when removing registry from pool
No need to force other workers to reset their cache.
2018-06-14 17:17:13 +02:00
RomainLibert dff3cd6319 [FIX] hr_holidays: avoid execution of onchange when no employee linked
If the current user is not linked to any employee we cannot retrieve his
calendar and so we cannot compute default times for the leave.
2018-06-14 16:38:18 +02:00
Prakash Prajapati 42ba1298d8 [FIX] website_sale: fix form view not opened for unpaid orders and abandoned carts
Closes #PR:24940. Related to task/issue ID 1851353.
2018-06-14 16:18:55 +02:00
Priyanka Kakadiya a4290faebf [FIX] hr_holidays: set fallback timezone when user has none
Field tz is not mandatory on res.partners, so we need a fallback in case
it is not defined.

Related to Issue : 1856843
Closes #25206
2018-06-14 16:12:53 +02:00
Adrien Dieudonne 1aacc96262 [FIX] web: checks rpc responses in web.ajax
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.
2018-06-14 15:57:55 +02:00
Christophe Simonis c13d67dd25 [FIX] website: valid time zone guessed from GeoIP
The timezone returned by GeoIP may be unknown by `pytz` due to
incompatibilities between GeoIP and pytz databases (which may be outdated).
2018-06-14 15:49:16 +02:00
Tejas Shahu c62f105f68 [FIX] mail: fix mismatch between recordset and id
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.
2018-06-14 15:40:38 +02:00
Christophe Simonis 45f2876694 [FIX] stock: remove invalid test
scrap test is irrelevant in version 11.0
2018-06-14 14:59:23 +02:00
RomainLibert ed47e3a546 [FIX] event: use groups to hide event count stat button
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
2018-06-14 14:55:55 +02:00
Thibault Delavallée 8d6ee5cb08 [FIX] website_event: put location in calendar event only if there is an address
Otherwse there is a traceback. Anyway no need to put a void location.
2018-06-14 14:44:38 +02:00
Thibault Delavallée 51d0a52c9b [FIX] product: wrongly placed break statement
Oversight of last forward port.
2018-06-14 14:19:03 +02:00
RomainLibert 84acd427b8 [FIX] website_event: allow controller to read event.registration
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.
2018-06-14 14:14:50 +02:00
Thibault Delavallée fc64744e6b [FIX] hr_recruitment: do not display number of attachments on jobs kanban view
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.
2018-06-14 13:00:28 +02:00
Priyanka Kakadiya 645f64827b [FIX] point_of_sale: update method name to avoid conflict with another method
Because of same method name point of sale's onchange method overrides sale's
onchange method. Sale's method is therefore not called anymore.

Fix related to commit https://github.com/odoo/odoo/commit/e434690fe3adf884222b84e16dac3b3dcc0b12ad. See task/issue ID #1854683.
Closes #25116.
2018-06-14 12:09:29 +02:00
qsm-odoo 50418c4811 [FIX] web_editor: properly save media dialog without any image
When saving the media dialog without any selected image, a crash
occurred. Now, it properly closes the dialog.

opw-1858614
2018-06-14 10:47:38 +02:00
Simon LejeuneandNicolas Martinelli d42856f29d [FIX] stock: partial reserve in MTO
- 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>
2018-06-14 10:36:57 +02:00
Nicolas Martinelli 1bde9b1ec4 [FIX] event: do not use sudo to compute event_count
This reverts commit c0618d72d0.
2018-06-14 10:15:23 +02:00
celm1990 caadeeee62 [FIX] base_address_city: avoid unexpected write trigger
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
2018-06-14 09:39:28 +02:00
Christophe Simonis d45c32baac [MERGE] forward port branch saas-15 up to bdd051bf78 2018-06-13 18:13:48 +02:00
Goffin Simon ab0b3a6217 [FIX] stock: Printing barcode on picking list
Inspired from 12b11c1e6f
Fixes #25214

opw:1849965
2018-06-13 17:21:56 +02:00
Nicolas Lempereur c4ddf55880 [FIX] web_editor: link don't duplicate child text
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
2018-06-13 16:20:40 +02:00
Aaron Bohy f03f2f7c8a [FIX] account: print move lines with no label
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
2018-06-13 15:51:35 +02:00
Miku Laitinen fd2b130428 [FIX] sale: Add missing import to 'account_config_settings_views.xml' in manifest
Coming from the migration of sale https://github.com/odoo/odoo/commit/f3d715ca94f24f86ce39a4bc6873fe7576ef1860#diff-7ca766af4bd53a0bc808dd3a4ead8317
2018-06-13 15:36:48 +02:00
Antonio Espinosa a8dd1de5c4 [IMP] doc: add i18n section to command line reference
Closes #14042
2018-06-13 15:13:52 +02:00
Josse Colpaert 232d5ca64b [FIX] stock: onchange like pr 25223 2018-06-13 15:07:34 +02:00
Xavier Brochard b10e34ed1a [FIX] web_editor: add <em> as inline tag and remove duplicate strong
This commit closes #24818
2018-06-13 14:56:16 +02:00
Jairo Llopis 71334b13bd [IMP] web: Expose datepicker configuration to view declarations
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.
2018-06-13 14:53:11 +02:00
Prakash Prajapati 8bc74a09ba [REF] stock: picking report: show lot name below the barcode
PR:24832
Task:1849829
2018-06-13 14:47:09 +02:00
Christophe Simonis bdd051bf78 [MERGE] forward port branch saas-14 up to c43c540172 2018-06-13 14:12:12 +02:00
Thomas Binsfeld 4d3debe2c3 [FIX] purchase: do not show all pickings from PO if there are no picking
Closes #19961.
2018-06-13 12:05:17 +02:00
Aaron Bohy c7b1faa458 [FIX] web_calendar: color of sidebar filter
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
2018-06-13 11:32:36 +02:00