Commit Graph
120190 Commits
Author SHA1 Message Date
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
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
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
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
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
Arnold Moyaux 6b550b8721 [FIX] sale_stock, purchase_stock: lot po/so count
Usecase to reproduce:
- Create a PO or SO with 10 lines
- Process the DO/Receipt to done
PO or SO count on lot is equal to 10 instead of 1

It happens because multiple stock_move could be linked to 1 order.
2018-09-06 13:27:56 +02:00
Alexandre Kühn d5715f482f [FIX] web: no padding/border twice in dom.autoresize
Before this commit, the `dom.autoresize` function may apply the
padding and border width twice when computing the height of the
textarea. This issue occurs when the fixed textarea had the same
CSS style as the textarea.

This commit fixes the issue by enforcing zero padding and border
width in the fixed textarea.

Task-ID 1882736
2018-09-06 12:23:28 +02:00
ThanhDodeurOdoo 5e855453ae [FIX] web: web/image route image type fix
- the http route, when given width and height arguments is no
longer forcing the type PNG (which resulted in heavier images than the
original).
2018-09-05 16:33:25 +02:00
ThanhDodeurOdoo fa39019ee1 [FIX] tools: image.crop_image default type fix
- the image.crop_image method doesn't defaults the format to PNG anymore.
  Instead it uses the format of the original image
  and defaults to jpeg as a last resort as the save method requires
  a type if it is called with an image object.
2018-09-05 16:33:25 +02:00
Christophe Monniez e312ec71dd [FIX] tests: detect coverage and adjust timeout
When computing coverage, the tests are slowed down and the timeout is
often exceeded.

With this commit, HttpCase headless Chrome tests timeout is increased if
coverage is detected.
2018-09-05 15:30:49 +02:00
Christophe Monniez 69a24eb84b [FIX] tests: close Chrome and shutdown on SIGXCPU
When Odoo receive a SIGXCPU (CPU time limit reached), it shuts down
immediately. If a headless Chrome is running, it stays alive after the
Odoo shutdown.

With this commit, the signal is intercepeted and the Chrome browser is
properly closed before shutting down the Odoo server.
2018-09-05 15:30:49 +02:00
Christophe Monniez 2c09110927 [FIX] server: ensure that the error message is flushed
When Odoo intercept the SIGXCPU signal, an error message is written to
the stderr. Unfortunately, if stderr is redirected to a buffered file, the
message will not appear.
2018-09-05 15:30:49 +02:00
Christophe Monniez f468023bd9 [FIX] tests: properly stop chrome when no tab found
In some situations, Chrome remote debugging is sending an empty list of
opened tabs. In that case, an orphan Chrome process stays alive.

With this commit, Chrome is stopped properly in those situations.
2018-09-05 15:30:49 +02:00
Aaron Bohy 5ccc3f66e8 [FIX] web: read_progress_bar: convert dates to strings
Since rev. 960360af, Date (resp. Datetime) fields return
datetime.date (resp. datetime.datetime) objects. This caused an
issue in the read_progress_bar method which returns a dict, whose
keys are values of the group_by. Indeed, when grouped on a Date or
Datetime field, the key was no longer a string but a datetime.date
or datetime.datetime object, and it crashed when that dict was
turned into a JSON string.

This method isn't tested at all for now, but tests will come
shortly.

Task 1878254.
2018-09-05 15:25:57 +02:00
David Beguin ec801b5436 [FIX] calendar : all day event Date to Datetime error
- calendar.event.start and stop are expecting datetime and not date.
Now, if 'All Day' event, start time = 00h00 and stop time = 23h59m59s
- when switching from all day event to not all day event, due to
stop time = 23h59m59s, the rounding for duration leads to make the stop
pass to the next day (00h00). each time you switch between all day and
not all day, the duiration is incremented by 24h.
We remove 1 sec to event stop time to avoid this.
2018-09-05 15:22:50 +02:00
Martin Trigaux 5d2bea62c3 [FIX] mail: display icon
The icon for .o_user_online (e.g. fa-heart for bot) was not displayed as it was
the same color as the one defined in .o_thread_window_header

Use $o-enterprise-primary-color (aka green) to indicate the user is online

Closes #26350
2018-09-05 15:17:17 +02:00
jem-odoo 02273803e4 [FIX] sale_timesheet: visibility of SOL on timesheet subview
The field SOL on the timesheet list on task should
be visible when the project is billed at employee
rate. This help the user to see which timesheet is
included in which SOL.
2018-09-05 15:06:16 +02:00
jem-odoo 8ee2a9c232 [FIX] sale_timesheet: project manager can fill employee map
The access rights of project.sale.line.employee.map were not
created. This commit provides record rules and accesses for
a project manager to fill the map of a project, and configure
correctly the way of invoicing the timesheet.
With PO's agreements, a such manager should be able to read
services SO and SOL to do that action, without leaking
informations.
Note: reading SO is required as the name_get of SOL fetch
the name of the SO.
2018-09-05 15:06:05 +02:00
jem-odoo 0d16d65eb4 [FIX] sale: access right for name_get of SOL
Sometimes, we want to give access to sale lines only for some users. But to
allow them to read a SOL, they need the read access of the sale order (as
the name is part of the name_get of SOL), which might break the saleperson
rights. This commit makes the name_get of sOL as  to allow fetching
the name of SOL without having the access right on the order.
2018-09-05 15:05:46 +02:00
jem-odoo a6401391ed [FIX] fields: raise when setting aware datetime
Now that Date/Datetime fields use python naive datetime, we want
to prevent developper to call  or assign aware datetime to
fields. Moreover, if so, the timezone will be stored in the
database, but when reading Datetime fields, we expect naive datetime.
Comparing naive and aware datetime objects leads to errors.

This commit forces developpers to use naive datetime when saving
data in database.

As example, we have to erase the timezone of dates in calendar
modules. We also regroup the 2 assignations in one call to
`write` for performance reason.

Thanks to @dbeguin and @RomainLibert for spending some time
on this bug.
2018-09-05 15:05:33 +02:00
qsm-odoo a997a5a1c6 [FIX] web_editor: adapt 'small' colorpicker button UI 2018-09-05 14:25:53 +02:00
Jeremy Kersten 715d492c8c [FIX] website_event: attach 'new register' modal to body
Before this commit it was attached to the form, in case your banner was
customized to have the font-color white, the text modal become white on white.

Now we attach to body, to don't have custom design from parent div.

This commit closes opw-1881280
2018-09-05 13:55:41 +02:00
Sébastien Theys 18fd4c9177 [FIX] payment: fix typo in payment.icon form
group= should have been groups= so it had no effect.

At the same time the view is already accessible only through a debug menu, so we are fine to always show the list.
2018-09-05 12:05:12 +02:00
Alexandre Kühn 0d515f0c7a [IMP] mail: stylized 'no content' helper in activity view
Task-ID 1882552
2018-09-05 11:43:24 +02:00
Odoo Translation Bot 55a5aca6d9 [I18N] Update translation terms from Transifex 2018-09-05 11:24:24 +02:00
Martin Trigaux cdb4b1c7c2 [I18N] export saas-11.5 source terms 2018-09-05 10:59:44 +02:00
William Henrotin 72c82b34d8 [FIX] purchase_requisition: datetime convertion
Purchase agreements create request for quotation with prefilled field.
The issue is:
date_planned (on RfQ) is filled from schedule_date (on PA). The first
one is a datetime object. The second one is a date object.
This commit makes a right conversion between datetime and date at the
RfQ creation. This issue was introduced by the datetime refactoring
(#24717)

Task id: 1878136
2018-09-05 10:34:39 +02:00
Martin Trigaux 85722a76d6 [FIX] base: correct typo 2018-09-05 10:12:08 +02:00
Aaron Bohy 06e6887950 [FIX] web: Kanban: quick create with correct values
Let's assume a quick create form view with an onchange. Before
this rev., if the user set a value for the char field with
onchange, then clicked on 'Add', the record was created before
the onchange was applied, and thus with incorrect/incomplete data.

The reason is that, when clicking on 'Add', the user triggers a
'change' event on the char field, which notifies the model of its
new value. Then, as 'Add' is clicked, the quick create widgets asks
all widgets to commit their potential (uncommitted yet) changes.
But there is nothing left to commit as the changes have just been
notified. The quick create only waits for this to make the create
RPC, and thus totally ignores the changes that were committed at
the first place.

Task 1878254.
2018-09-05 08:47:21 +02:00