Commit Graph
120347 Commits
Author SHA1 Message Date
Kishan Gajjar efc1981cb7 [IMP] account: remove 'preview_priority_type' option
Because now attachment previewer supports paging so user can see
all the attachments from the chatter.

Task 1844685
2018-09-10 08:26:59 +02:00
Odoo Translation Bot 956720ed7f [I18N] Update translation terms from Transifex 2018-09-09 02:25:15 +02:00
Christophe Simonis 68d36512ef [MERGE] forward port branch saas-11.4 up to d78f23df84 2018-09-07 20:20:45 +02:00
Toufik Benjaa d78f23df84 [FIX] payment,sale_payment: extract code to overridable methods
- We extract some code logic to methods to allow to override them.
  This is needed for the subscription module where a payment token need
  to be copied from a transaction to a subscription.
  The subscriptions is created from a sale order and before the
  payment.transaction holding the payment.token id is validated.
  Since the payment.transaction is not validated, the subscription
  module doesn't find the correct transaction.

  By extracting this code logic, we can override exactly when it should
  be.
2018-09-07 19:26:51 +02:00
RomainLibert f63bf09cdd [FIX] hr_holidays: make related fields readonly
In the allocations we have two related fields on hr.leave.type but a
user cannot write on these fields hence we should make them readonly
2018-09-07 17:28:09 +02:00
Christophe Simonis 5020f41b95 Revert "[FIX] tools: skip bad translations"
This actually broke some valid use cases (catch by new translations tests)

This reverts commit 428fbd0381.
2018-09-07 17:24:10 +02:00
qsm-odoo cfe22cb593 [FIX] portal: <body/> should still be the scrolling element
Commit https://github.com/odoo/odoo/commit/a7a89f31741c3df1d15f1fb8d0433b2761a7e1d0
was a bit too optimistic. Too many features still depend on the scroll
event listened on the <body/> element.
2018-09-07 17:18:49 +02:00
RomainLibert 283c842289 [FIX] models: support multiple group by in _read_group_fill_temporal
The method _read_group_fill_temporal did not support multiple levels of
groupby. Which meant that everytime you grouped by a date and by
something else you had a traceback.
2018-09-07 17:03:22 +02:00
svs-odoo 74fcd3ac3b [IMP] web: FieldInteger and FieldFloat can use input of type number
This allow the browser/device to handle the experience of handling number in a more native way.

FieldInteger and FieldFloat now inherits from NumericField because we want
to format it or not dependent of the view (readonly or edit) and the
NumericField will manage it.

We do that because input type number can't take a value with comma on Chrome
(FireFox is more permissive but not perfect because comma is the separator
for decimal in this case).

Task #1880376
2018-09-07 16:18:45 +02:00
ThanhDodeurOdooandPierre Paridans 16aeecc73d [REF] base, mail: Documents (enterprise) related changes
-removed force_ext from ir.http.
    -added signature arg to web/image to differentiate cache entries by URL.
    -added an embed youtube viewer for youtube URL's
    -added a PDF splitter to the PDF viewer UI
    -added tests for mail's Document Viewer
    -added a "signature" param to web/image to go around the browser cache

    -thumbnail field of ir.attachment is now stored in the filestore
    as a distinct attachment.

task 1853490

Co-authored-by: Pierre Paridans <app@odoo.com>
2018-09-07 16:06:47 +02:00
eco-odoo 469d7acb89 [FIX] snailmail: fix cron job name typo (#26851)
The typo could be inconvenient when searching through  logs for
example.
2018-09-07 15:47:57 +02:00
Thibault Delavallée c4130bcbde [MERGE][IMP] mail, note: improve activity summary view and use
Main specifications
 * set mail as dependency on contacts as activity view is used in contact
   that does not depend on mail -> crash;
 * update icon on the reminders: use calendar instead of clock;
 * add an icon to Contact in the systray;
 * add the Activity icon in the upper right corner of the Contact;
 * sort Activities by date: from more urgent to less urgent;
 * on the contact name in the activity view, the name is clickable but the
   cursor is wrong: use the little hand as a cursor;

Please see sub-commits for more details. Thanks to @alexkuhn for
reviewing and @est-odoo for testing.

This merge is linked to task ID 1882545 and closes PR #26797.
2018-09-07 15:30:56 +02:00
Thibault Delavallée 9abbd843a8 [FIX] mail: set cursor as pointer when hovering contact name in activity summary view
Purpose of this commit is to make it obvious contact name cell is clickable.

This commit is linked to task ID 1882545 and PR #26797.
2018-09-07 15:29:57 +02:00
Thibault Delavallée a75b7cd517 [IMP] mail: sort activity summary view by deadline ascending
Purpose of this commit is to have first activities to perform displayed
first in the activities summary view.

This commit is linked to task ID 1882545 and PR #26797.
2018-09-07 15:29:57 +02:00
Thibault Delavallée 540226d806 [IMP] mail, contacts: allow to have actions in systray elements
Purpose of this commit is to allow having an icon redirecting to the
activity summary view in the partner activities section of systray.

This is done by supporting an additional 'actions' list in the activity
data given to the systray. It displays small icons that redirect to an
Odoo action given its xml ID.

This commit is linked to task ID 1882545 and PR #26797.
2018-09-07 15:29:57 +02:00
Thibault Delavallée 11918bbf43 [FIX] mail: use contact app icon for partner-related activities in systray
As res.partner model is defined in base systray takes the base icon as icon
used in the systray when classifying activities by model. As base module has
no icon it leads to a blank icon being displayed in the systray. Purpose of
this commit is to use the icon from Contact application instead.

As contacts application now depends on mail we do it simply through
inheriting the systray_get_activities method that return the data to display
the systray elements.

This commit is linked to task ID 1882545 and PR #26797.
2018-09-07 15:29:57 +02:00
Thibault Delavallée db3cdee226 [FIX] note: use calendar icon when setting the reminder date in systray
Specifications :

 * clock icon is generally used for datetime;
 * calendar icon is generally used for date;
 * as we set the reminder date in the systray let us use the calendar
   icon in the systray in the reminder section;
 * please also remove the extra margin bottom of note when entering a
   new reminder, it makes @est-odoo very sad;

This commit is linked to task ID 1882545 and PR #26797.
2018-09-07 15:29:47 +02:00
Thibault Delavallée 8be06de0af [REF] contacts: set mail module as dependency of contacts
Contact application allows notably to see the activity summary view on
customers activities. It require mail to be installed. As there is no
real use of contacts application without mail let us set mail as a
dependency of contacts. It seems a better solution than having a bridge
module between contacts and mail.

This commit is linked to task ID 1882545 and PR #26797.
2018-09-07 15:25:43 +02:00
Raphael Collet c33a013943 [FIX] server: fix colored query count 2018-09-07 15:07:20 +02:00
XavierDo 7f47dcae5b [FIX] mail: improve activity view and fix activity feedback
-Improve no content helper on activity view

-Update chatter after editing an activity un form view

-Avoid context to appear as feedback
When using call_button the context is set as an arg and will be catched by
the kwargs of the called action.

As for action_feedback, we can create a wrapper without kwargs
used when calling this method from a button to avoid this problem.

Another solution would be to change the call_button in order to give
the context as a kwargs. Maybe a possible improvement for master.

-Remove groupby from activity view
group by has no effect on activity

-Change cursor to pointer on record name in activity view

Task: #1878184
PR: #26668
2018-09-07 14:59:05 +02:00
Christophe Simonis 49c3264ce0 [MERGE] forward port branch saas-11.3 up to 4850fb0838 2018-09-07 14:43:48 +02:00
Pratima Gupta dd32131ce6 [IMP] various: improve settings wording and labelling
Purpose of this commit is to improve settings by improving labels and
section titles. Purpose is to ease use of settings by users and make
it easier to understand.

This commit is linked to task ID 47221 and PR #26483.
2018-09-07 14:39:32 +02:00
Mahendra Barad f81f85eba2 [IMP] base: properly focus search input in settings
Before this commit, the search input was focused everytime the settings
view was rendered after a timeout of 0. This is not considered as correct.
It is fragile as asynchronous code could break in many situations.

This commit fixes that behavior by using a hook 'on_attach_callback' which
is called when the widget is put in the DOM.

This commit is linked to task ID 47221 and PR #26483.
2018-09-07 14:39:32 +02:00
jem-odoo 9c277c6b6d [FIX] sale_timesheet: correct domain for SOL on task
The onchange returned a domain with a non existing
field of sale.order.line.
This commit fixes it.
2018-09-07 14:06:49 +02:00
jem-odoo d11636191b [FIX] sale_timesheet: avoid recreating task from SOL on confirmation
When cancelling SO, then reconfirm it, a new task will be created. This is
no the willing bahavior. This commit fixes this, so reconfirmating does
not create a second task.
This commit also provides a test case and so, mixes 2 test cases into
one for a better coverage.
2018-09-07 14:06:49 +02:00
jem-odoo aee642939c [FIX] sale_timesheet: hide 'create SO' on project
This button requires the rights to handle SO (create and update), so we now
only display this button if current user can do such action. Otherwise, when
submitting the wizard, the user gets an access error.
2018-09-07 14:06:49 +02:00
jem-odoo c31cebfe27 [FIX] sale: wording for SOL on analytic line
Let's stay consistent with other modules ...
2018-09-07 14:06:49 +02:00
jem-odoo 602e0528cd [FIX] hr_timesheet: generate AA when allowing timesheet
During the super of write, a check constraint is done
in python. So, if writing allow_timesheet=True the constraint
will raise is no AA is set on the project.
This commit restore the exepected behavior.
2018-09-07 14:06:48 +02:00
qsm-odoo 3444e0a0da [FIX] web_editor, *: use explicit string keys for color maps
* website

```
$map: (
    test: 1,
    black: 2,
);
@​debug map-get($map, 'test');
@​debug map-get($map, test);
@​debug map-get($map, 'black');
@​debug map-get($map, black);
```

The above code leads to a:
1
1
null
2

This is because maps' keys can be *anything* in sass (even other maps).
In the example, the map is defined with unquoted `test` and `black` as
keys which are understood as the string 'test' and the *color* black.
When asking for the value for the 'black' string key... there isn't any.

This commit forces the use of quoted string as color maps' keys.
2018-09-07 13:57:14 +02:00
Christophe Simonis 4850fb0838 [MERGE] forward port branch 11.0 up to 9b602ae648 2018-09-07 12:38:59 +02:00
Christophe Simonis 1884c71245 [FIX] test_translation_import: correct test and add required i18n files ignored during forward-port 2018-09-07 12:06:24 +02:00
len-odoo 9b602ae648 [FIX] base: allow to use Python builtins in views
Py.js does support Python builtins, e.g. abs, len, str, which can
be used in views if the view validation accepts it.

opw 1879160
2018-09-07 11:38:22 +02:00
Toufik Benjaa b4c72220c7 [FIX] payment: portal payment use newly generated reference
- When creating a transaction on the payment page of the portal, the
  transaction reference returned was incorrect.
  This commit return the newly created transaction's reference.
2018-09-07 10:48:35 +02:00
XavierDoandChristophe Monniez c44fe91232 [IMP] http,server: add query count and request times in logs
When there is a performance issue, it's sometimes difficult to discover
which request increased the query count or its duration.

With this commit, the query count, the query time and "python and io" time are displayed
in the logs at the end of each werkzeug request line.

Co-authored-by: Christophe Monniez <moc@odoo.com>
2018-09-07 10:27:46 +02:00
Nicolas Martinelli 7e83ea8d57 [FIX] point_of_sale: restrict price control
- Activate the Price Control option in the POS
- Connect as Admin => you are allowed to modify the price
- Switch the user to Demo => you are still allowed to modify the price
- Switch back to Admin => you are not allowed to modify the prices

The two last steps are clearly incorrect.

The reason is the following.
The function `applyAccessRights` is bound to `'change:cashier'` event of
the `pos` at:

https://github.com/odoo/odoo/blob/d25719cdf2b8a863c1a855f2e42e9c3a43580f66/addons/point_of_sale/static/src/js/screens.js#L389

When switching the user, 2 steps are performed:
1. Set the cashier on the `pos`
2. Set the cashier on the `pos.db`

https://github.com/odoo/odoo/blob/d25719cdf2b8a863c1a855f2e42e9c3a43580f66/addons/point_of_sale/static/src/js/models.js#L646-L647

Step 1 will trigger the function `applyAccessRights`, which calls
`pos.get_cashier`. However, the latter retrieves the user on `pos.db`
first, and falls back on `pos`.

https://github.com/odoo/odoo/blob/d25719cdf2b8a863c1a855f2e42e9c3a43580f66/addons/point_of_sale/static/src/js/models.js#L642

This means that we retrieve the cashier in the `pos.db` before it is
actually set (in step 2).

To avoid this, we explicitly retrieve the cashier on the `pos`, then
fall back on the usual `pos.get_cashier` function.

Closes #26814
opw-1871189
opw-1881172
2018-09-07 09:29:38 +02:00
Rémi Rahir 2f033d7184 [FIX] account_facturx: fix condition on _post_pdf
The override on _post_pdf should only be triggered when there is only
one record. The if statement was faulty.
2018-09-07 09:17:28 +02:00
Rémi Rahir fb7500c050 [IMP] account: close modal after printing report
Benefit from the improvement introduced in
94f8db9d18a722404f0c861ee698d9d96443833d and drop
the 'printed' status which becomes useless.
2018-09-07 09:17:28 +02:00
Rémi Rahir 241efab999 [IMP] web: Close window when printing a report
Up until now, the execution of a report action could not be followed by
any action which prevented, for example, to automaticcaly close a modal
after printing a report from it. This has become an issue when working
on customer's invoices using the new modal introduced in 4cb9194275

This commit allows to close a modal after the download of a report.
2018-09-07 09:17:28 +02:00
Rémi Rahir ab0f5f7135 [REM] web: legacy code on action_report
Removing the code that allows to generate multiple reports with a single
action introduced in 410d6a703b as it was
only used for l10n_ch and that this was abandoned in
5169b50efe.
2018-09-07 09:17:28 +02:00
Aaron Bohy a51a5b70d3 [FIX] web: FieldDomain: reset field with a new domain
Before this rev., there was a crash when a FieldDomain was reset
with a new domain (e.g. coming from an onchange). For instance, it
crashed in Email Marketing > create new Mass Mailing > select
mailing lists. Introduced by 68332a01.

opw-1882850
2018-09-07 08:37:45 +02:00
Christophe Simonis 21a186dadd [MERGE] forward port branch 11.0 up to 737ca0eb42 2018-09-06 18:13:56 +02:00
qsm-odoo a7a89f3174 [FIX] portal: use flex for #wrapwrap layout
(Needed for themes migration)

The #wrapwrap element always featured a hack to make the inner <footer/>
stick to the bottom of small-height pages (typically, empty pages). As
advertised, this was a *hack*: forcing the element to "table" display
and its children to "table-row" display. This prevented some themes
to do some stuff.

With the migration to BS4, we now use flex at various places and so
only support the browsers which support flex (every last version of
major ones). The footer feature can be solved using flex, so there is
no point in keeping the hack.

This also allows to make the #wrapwrap element scroll instead of the
<body/> and to always have a screen-shaped #wrapwrap element, making the
element the user's <body/> it was always meant to be.
2018-09-06 18:04:09 +02:00
Christophe Simonis 737ca0eb42 [FIX] web: adapt newly added test (2) 2018-09-06 17:27:50 +02:00
Christophe Simonis 63f95760ef [FIX] web: adapt newly added test
Oversight of previous forward-port
2018-09-06 17:23:27 +02:00
Christophe Simonis 505e42b78b [MERGE] forward port branch saas-15 up to 5a5d6d1e8e 2018-09-06 17:00:26 +02:00
Xavier Morel a3cd0ac2ce [FIX] project: add access token to task attachment display
Following CDN expansion (d98b262398)
portal attachment links now go through the CDN, which is an issue for
restricted-access attachments e.g. attachments bound to specific objects
(such as support tickets).

Add an access token to the attachment links in the /my/task template.

Cf OPW-1882014 (fixed ad-hoc by editing the relevant view on odoo.com)
2018-09-06 16:44:00 +02:00
Goffin Simon d3dc5048e4 [FIX] purchase_requistion: Duplicate purchase agreement with "Run sch…
…eduler"

Steps to reproduce the bug:

- Let's consider P a product with routes "buy" and "mto" and with
purchase_requistion = 'Propose a call for tenders'

- Let's consider a BOM B with P as component

- Create a MO for B

- Run the scheduler two times

Bug:

Two purchase agreements have been created for the the same MO.

opw:1882280
2018-09-06 16:05:13 +02:00
Toufik Benjaa e11c0a45f2 [FIX] payment: Fix reference computation to avoid duplicates
- The method to compute the reference of a payment.transaction and avoid
  duplicate was missing some edge cases (for example if there was a '-'
  in the reference).

- The creation of transactions in the route /website_payment/pay was not
  checking for duplicate payment.transaction.
2018-09-06 16:03:01 +02:00
Toufik Benjaa 541e049d96 [FIX] payment: properly set communication field on account.payment
- After 01216345e2 the field communication
  on account.payment was not properly set when created by a
  payment.transaction.
2018-09-06 15:57:27 +02:00
Toufik Benjaa ec324fdd04 [FIX] project: allow portal customers to post on task chatter 2018-09-06 15:57:27 +02:00