Commit Graph
123770 Commits
Author SHA1 Message Date
Andrea Ulliana 7f2ce89554 [IMP] web: add JS-related lib files for ace editor
In task handled in https://github.com/odoo/odoo/pull/29999, we will need
support for javascript files in ace editor. This commit adds the related
lib files.

See https://ace.c9.io/#extending-highlighters:
https://github.com/ajaxorg/ace/tree/master/lib/ace/mode
1. https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/doc_comment_highlight_rules.js
2. https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/javascript_highlight_rules.js
3. https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/javascript.js

task-1919350
2019-02-05 14:12:16 +00:00
Thibault Delavallée 8f3eff13fb [REF] website_slides: light cleaning
Purpose of this commit is to prepare future code addition by making some
noise in a separate commit. In this commit we move compute methods below
fields definition because currently it is a complete mess and finding a
given field gives a headache.

Commit linked to task ID 1933820 and PR #30830.
2019-02-05 11:19:52 +00:00
Thibault Delavallée 7105669b77 [FIX] website_slides: limit auto subscription
In order to avoid spam and unwanted notification this commit limits auto
subscription on channel when

 * creating a channel;
 * automatically telling a channel a new publication has been done;
 * creating a slide;

As being a follower of a slide channel means following its slides user should
choose manually to be follower of a channel, notably through the UI.

A new way of managing subscription will come with elearning in mind and
therefore auto subscription should be limited.

Commit linked to task ID 1933820 and PR #30830.
2019-02-05 11:19:52 +00:00
Antoine Guenet 275af90b38 [FIX] web_editor: update displayed media in dialog on remove media
closes odoo/odoo#30809
2019-02-04 12:52:15 +00:00
Antoine Guenet f834204af3 [FIX] web_editor: reapply the classes of ANY type of media on replace
closes odoo/odoo#30801
2019-02-04 11:29:40 +00:00
Antoine Guenet 48cb3c71d1 [IMP] web_editor: handle CTRL+A (and then DELETE) locally
This fixes issues with CTRL+A then delete.
Now CTRL+A selects all the contents of the unbreakable node in
which the range is contained. Deleting it all will replace the contents
with `<p><br></p>` so the user can start editing afresh.

Note: Only CTRL+A is handled: ``select all`` in contextual and edit
menus are still handled by the browser.

closes odoo/odoo#30648
2019-02-04 09:44:18 +00:00
RomainLibert 6dbdfb9bf7 [IMP] various: optimize _name_search
In the overrides of _name_search we should avoid creating domains with
huge lists of ids as it is inefficient.
We can also make sure that we optimize the empty search as in this case
the custom domain doesn't make sense, we can simply search on an empty
domain and, thanks to the limit argument, still keep a fast query.

Linked to task 1918906

Thanks to @odony and @nseinlet

closes odoo/odoo#30155
2019-02-05 11:44:21 +00:00
Robot Odoo 0b79687155 [IMP] board,web: cleaner layout and kanban/pivot integration on mobile
This merge improves the Dashboard app and make it more usable on mobile:
- The layout is fixed to 1 column.
- Embedded Kanban view is fitted to its content and handle correctly empty columns.
- Embedded Pivot view has smaller left indentation for readability purpose.

Task ID: 1904747

closes odoo/odoo#30467
2019-02-05 14:54:27 +01:00
Hetal Dhanak b8f7df1a6a [IMP] project: Clean timesheet related fields on task form
-Moved the share Button to the dropdown Action menu as it was better suitable there.
 -moved sale order item field to extra info as it was better suitable there.
 -changed display of settings for project to give it organized look.

Related Task ID: 1928422

closes odoo/odoo#30310
2019-02-05 12:09:14 +00:00
Parth ChoksiandMohammed Shekha 514d6fb90d [IMP] base: Hide Save/Discard on Settings until there are modifications
Purpose
=======

It only makes sense to display 'Save' and 'Discard' if the user actually
changed something in the settings.

So after this commit, the 'Save' and 'Discard' buttons of statusbar in
general settings will only appear when you make any changes.

Also when there are changes, there will be a message shown that will tell
the user that he/she has unsaved changes.

The commit is related to Task ID: 1917637

Co-authored-by: Mohammed Shekha <msh@openerp.com>

closes odoo/odoo#29726
2019-02-04 08:40:20 +00:00
Mohit Ghodasara bbd64c22ab [IMP] various: prevent unlink of automated activity types
Purpose of this merge is to update main addons and set activity types used
for automated activities as master data. This means they cannot be removed.
Indeed those activity types are used in business flow to generate activities
and removing them may break some flows.

This commit is linked to task ID 1907970 and PR #29257.
2019-02-05 11:32:14 +00:00
Mohit Ghodasara 0db0e66e96 [IMP] mail: improve usability of activities
Purpose of the task is to improve the usability of activity types and
activity scheduling.

Another purpose is alto to protect some master data activity types by flagging
them and preventing their deletion.

Containing
 * make the activity type as master data so deletion will be prevented;
 * improve the usability of the activity type;
 * prevent the deletion of activity type which are used for automated activity;
 * change the usability of activity scheduling modal;

This commit is linked to task ID 1907970 and PR #29257.
2019-02-05 11:32:14 +00:00
Darshil Trivedi 7214173f52 [ADD] l10n_ie: Introduce localization for Ireland
closes odoo/odoo#23031
2019-02-05 11:48:28 +00:00
Vandan Shah f757b5eccd [IMP] web: Improve calendar display when no partner is set on event
Task:- 1906798
PR:- #28669
Co-authored By:-  Mohammed Shekha <msh@odoo.com>
2019-02-05 11:45:29 +00:00
Nimesh Jethva 3272d2a384 [IMP] account: Display 'Draft Invoice' instead of false on name_get
name_get() override when payment in draft display the result false.

screenshot : https://drive.google.com/file/d/1dT22ysXmSOJvXMhzhyh_0tVW9z_v3b-s/view?usp=drivesdk

closes odoo/odoo#27537
2019-02-04 08:48:45 +00:00
Nimesh Jethva e12229f1d7 [IMP] account: Track some fields on payment
Purpose
=======

Every change to invoice is indicated in the chatter - the state, the
person, and the time is indicated in the chatter.

This is currently not the case for payment - It should be the
case, as if I were in charge of these things, I would like to know who
did what and when.

Specification
=============

Add chatter followup on payment to know who
did what and when.

Related Task ID : 1880825
2019-02-04 08:48:36 +00:00
Siddarth Gajjar f3a390cb74 [IMP] generic: replace suds with zeep.
- Added new library zeep for soap request.
- Remove old suds library.

Task ID: 41696 Closes #26934
2019-02-05 11:42:18 +00:00
qsm-odoo b6db6b878c [REF] website, *: remove 'website.context' module
* website_forum, website_gengo, website_mail_channel, website_sale

Retrieving the global context is now the root's job, this will prevent
problems when trying to extend the values the context has.

See upcoming improvements with https://github.com/odoo/odoo/pull/29442

closes odoo/odoo#30816
2019-02-05 11:39:11 +00:00
Christophe Simonis 99499589ea [FIX] website: correct module import
Oversight of previous forward-port
2019-02-05 11:33:07 +01:00
Christophe Simonis ba0fe3437f [FIX] website: skip broken tests
Theses tests does not works with latests changes.
Skip these to allow other changes to be commited.
2019-02-05 10:34:29 +01:00
Christophe Simonis 4400cce820 [MERGE] forward port branch saas-12.1 up to 4524ad06a8 2019-02-04 13:27:22 +01:00
Priyanka Kakadiya 4524ad06a8 [FIX] mrp: removed unexisting default filter
last_year_mo_order was removed in commit 4a350ff8cc. However it was still used in action_view_mos.
This commit adpat the action context in order to keep the same behaviour than previously.

task id 1922547

closes odoo/odoo#30347
2019-02-01 14:01:19 +00:00
Christophe Simonis d55665faf5 [FIX] website_sale_delivery: restore expected behavior
As usual, I mess up with forward-ports. This one was actually nasty, as
no syntactic error was introduce, while only failing because of this
left over `console.error` call.
2019-02-03 09:37:58 +01:00
Odoo Translation Bot 9f6c2ec11c [I18N] Update translation terms from Transifex 2019-02-03 06:03:42 +01:00
wan ceb0548930 [IMP] account: add chatter in account.journal and account.move
Task 1915154
The chatter will mainly be used for communication / messages
Add the chatter to account.move

    Do not generate message at the record creation
    Do not track any field

closes odoo/odoo#29274
2019-02-01 08:20:23 +00:00
Prakash Prajapati 8a25e58ed2 [FIX] purchase_requisition_stock: onchange and picking type
Issue:
- Create a RFQ for a stockable product
- Try to validate
- A required field "deliver to" (picking_type_id) is not set

Rev [1] moved the stock related part of purchase_requisition to
purchase_requisition_stock.
It implements an onchange on the purchase order setting the
picking_type_id of the one of the requisition. When no requisition is
set, it wiped the default one.

We fix the issue by only using the picking type of the requisition if a
requisition is actually set.

[1] 826f927a1e
Task: 1935077

closes odoo/odoo#30685
2019-02-01 10:36:14 +00:00
Sébastien Theys ff368fdbd5 [IMP] portal,sale: toggle sign button depending on signature state
Before this commit, it was possible for the user to click on the Sign button
even when the signature area was empty, which would lead to an error message.
Now we disable the button when the area is empty.

Related to enterprise PR: https://github.com/odoo/enterprise/pull/3535

PR: #30653
2019-02-01 12:10:13 +00:00
Lucas Lefèvre 20bc2bbab5 [IMP] hr_payroll: add multi contract support
Purpose
=======

We would like to be able to manage multi contracts payslips and contract transitions.

Specification
=============

General flow:
1/ Benefits are generated based on contracts's calendar.
2/ When validating additionnal benefits, calendar.attendances are created in the contract's calendar
3/ Create one payslip per contract in state [open|pending|close]
4/ For each payslip, generate worked day lines based on the contract's calendar

New Constraints:
1/ An employee cannot have more than one contract at the same time (excluding draft, closed and cancelled contracts).
2/ A leave cannot overlap multiple contracts.
3/ A contract cannot have starting and ending dates such that a leave become in the middle of
   two contacts.

New state for a contract: Incoming. It means it's ready and will be running soon.
An incoming contract automatically becomes 'Running' if the start date is passed (cron)

Number of hours and days are always correct (according to the contract's calendar) on payslips as the
flow starts from the contract's calendar.
However, it is not correct in the Time Off app because it's counted based on the employee's calendar.
The number of days/hours for hr.leaves should be computed according to
the contract at the time of the leave.
e.g. If I currently work full time and I request 2 weeks off next month where I'll be working only
3 days/week and 5hours/day (other contract), It should count 6 days and 30 hours.

- in hr.benefits form view show the contract (below employee field)

TaskID: 1903483

closes odoo/odoo#30181
2019-02-01 12:16:54 +00:00
William Henrotin f5bca867ac [IMP] mrp: lot restriction from the second WO
The user have to enter the final lot number on workorder when he process
a component. The purpose is to register the use of components for
tracability report. However currently the user could create different
final lot during the process. It would result in inconsistencies since
components could be used for lot/SN not produced and a wrong
tracability.

This commit ensure that once a lot/sn is created during a WO, it has to
be used in the following workorders.

closes odoo/odoo#27984
2019-02-01 08:13:25 +00:00
Arnold Moyaux 356175230d [IMP] stock, mrp: hook on ml to reservate
Currently _action_assign will try to add new reservation to existing
move lines. With mrp it could be problematic with the following usecase:
- 2 product A in stock
- Create a MO for 2 final product tracked and consuming 4 products A
- Reserve -> It will create a ml with 2 product A.
- Product -> It will fill the ml with 2 quantity done for first lot
- Add 2 product A in stock (4 in total)
- Reserve -> It will increase the reservation on the existing move line.

It's a problem since the new produce (wizard or wo) will create a new
move line because the existing move line have a lot_produce_id and can't
be used for a different lot/SN anymore.

This commit only increase reservation if the move line has not been used in
order to create a lot.
2019-02-01 08:13:25 +00:00
William Henrotin 24f05151f4 [FIX] mrp: uom management in workorder
Usecase : create a bom in unit with a component tracked by serial and
quantity to produce = 1 unit

Create a manufacturing order with a UoM different that the bom one
(e.g. Production request = 1 dozen)

Launching the produce wizard or a workorder will show to the user
a workorder line with 12 component units to consume. But as the
component is tracked by serial. We would like to get 12 differents
lines of 1 unit. This commit take care of this specific case.
2019-02-01 08:13:25 +00:00
William Henrotin 5ef46664a2 [IMP] mrp: add production lines
To record a production via a manufacturing order, the user can either
use the produce wizard or the workorders views. Those two objects was
technically different but act more or less the same. This commit aims to
merge the similar behaviors in common code

We introduce two new abstract models :
 1. Abstract workorder to share workorders and the produce wizard
 2. Abstract workorder lines to share active_move_line on workorder and
    product_produce_line on the wizard. Those abstract line keep the information
    about the quantities and lot number to put on component move lines and
    finished product move lines

Task : 1891864
2019-02-01 08:13:25 +00:00
qsm-odoo 0abfaeda96 [FIX] website: prevent animation of anchor links with invalid fragment
Also secure the anchor creation to only allow valid names, that is
letters, digits, underscores and hyphens.

task-1913458

closes odoo/odoo#30701
2019-01-31 17:35:07 +00:00
mgh-odoo 43888662ff [FIX] web: unaccent default params fixed
purpose of this commit is to remove default parameter of "casesensitive",
because default parameter is ES6's feature. it's not supported in IE9.

closes odoo/odoo#30751
2019-02-01 06:50:54 +00:00
Christophe Simonis 2f118c41fb [FIX] web,mass_mailing: adapt forward-ported tests to new version 2019-01-31 18:10:02 +01:00
qsm-odoo e4e1c01f69 [REF] website: merge BodyManager and WebsiteRoot
Following the new editor's merge at https://github.com/odoo/odoo/pull/29775,
'web_editor.BodyManager' stopped being used by the editor and the
related file was moved to website without being renamed or considered.

Hopefully, the editor replaced it by something else so the `BodyManager`
makes no sense on its own anymore. This commit merges its features
with the only other component which still used it: `WebsiteRoot`

See upcoming improvements at https://github.com/odoo/odoo/pull/29442
(related to task-1932066)

closes odoo/odoo#30740
2019-01-31 16:20:35 +00:00
Christophe Simonis f927c68ddb [MERGE] forward port branch 12.0 up to cb8fefa899 2019-01-31 16:59:58 +01:00
Christophe Simonis cb8fefa899 [FIX] web: correct tempusdominus lib patching
Oversight of previous forward-port.
2019-01-31 15:22:27 +01:00
Christophe Simonis 49cb3d8fad [MERGE] forward port branch saas-11.3 up to aeed32d4ff 2019-01-31 15:07:09 +01:00
Pierre Paridans de26abf214 [IMP] board: single column layout on mobile
Improve the dashboard app on mobile by :

- Hide the change layout button
- Force one column view layout

Task Id: 1904747
2019-01-31 11:30:54 +00:00
Romain Estievenart 7d1dafa3e2 [IMP] web: improve kanban mobile
Improve the mobile kanban when it's embedded in another view like
the Dashboard app

- Improve swipe: Allow to swipe on empty space
- When it's embedded :
     - The Kanban column height now is fit to the content
     - A empty space is now display if the Kanban column is empty

Task Id: 1904747
2019-01-31 11:30:54 +00:00
Romain Estievenart 635944443c [IMP] web: allow customize tab padding on pivot view
Allow the customization of the pivot header cell's left padding in mobile.

Task Id: 1904747
2019-01-31 11:30:54 +00:00
Martin TrigauxandRaphael Collet ba58888ced [IMP] models: remove orphan translations
Same logic as for the mail.message or ir.attachment, when a record is deleted,
drop the ir.translations linked to it as well.

Fixes odoo/odoo#25105

Co-authored-by: Raphael Collet <rco@odoo.com>

closes odoo/odoo#30721
2019-01-31 10:22:16 +00:00
Vincent Schippefilt 2e57f90bd1 [FIX] web: fixed leak on image fields
During the unit tests, I have noticed that the test window was doing a
lot of work after the test were completed, it was using CPU and using RAM
in jigsaw pattern. Eventually after being left alone for a few hours,
the window would just crash.

This was due to an unlimitted chain of deferred running when an image
field had a load error.

The situation is as such:
1. The image is put in the DOM with an onError handler
2. There is an error, as the image is a dummy text for the tests
3. The onError is called, it clears the image field, then calls _render
4. _render re-adds an image with the same onError handler   <----------
5. The onError is called - again - it clears the image field - again  |
   (wich does nothing this time because the value is the same) -      |
   then calls _render - again                                         |
6. The second time _render is called, go to step 4 --------------------

... In the meantime, the widget has been destroyed by the test,
so it should not do anything anymore.

This fix breaks the loop, as well as bind the onError handled with 'one'
instead of 'on'.

closes odoo/odoo#30716
2019-01-31 09:38:31 +00:00
Deep Patel d989016a26 [FIX] point_of_sale: unbind keydown event when close product screen
closes odoo/odoo#30671
2019-01-31 09:54:06 +00:00
Fabien Pinckaers c50e82c127 [FIX] account: Undistributed Profits/Losses
If no Undistributed Profits/Losses account can be found, Odoo tries to
create one with number '999999'. However, such an account number might
have been created manually by a user. In this case, the account creation
fails.

opw-1932701

closes odoo/odoo#30719
2019-01-31 09:23:54 +00:00
Nicolas Lempereur c4d222677f [FIX] web: click/studio work in colored kanban tile
When a colored kanban tile is colored, and there is a color attribute on
the tile HTML element indicating a color field (eg. when a kanban view
with color dropdown is created in studio), there was a HTML element over
the whole tile preventing to click on links or other sub element of it.

This HTML element is just a transparent used for accessibility to
contain the tile color intelligible name, so this commit just size it
over the area of the color (currently in base bootstrap ~3px at the left
of the tile).

opw-1932283
closes #30717
2019-01-31 09:01:44 +00:00
Yenthe666 5ae4941bde [IMP] account,sale{_management}: set name on create elements
For easier xpath

Followup of odoo/odoo#30534

closes odoo/odoo#30711
2019-01-31 08:25:13 +00:00
Thibault Delavallée 0748e13426 [REF] survey: improve existing answer management in invite wizard
Purpose of this merge is to clean the way we manage exiting answer when
inviting partners or emails to participate to a survey.

When wizard finds that some recipients are already linked to answers it
displays a bootstrap warning with the name of duplicate recipients and
display the field allowing to choose between two options

 * resend: send the same token and answer;
 * new: create a new token and answer;

It will be useful notably with certifications support as number of attempts
to succeed is limited. Allowing people to retake certifications should be
made clear to survey managers.

This commit is linked to task ID 1935176 and PR #30689 .
2019-01-31 12:00:52 +00:00
Thibault Delavallée 0e91762c99 [IMP] survey: rename and improve statistics fields
Purpose is to clean a bit those fields. A field holding the number of send
invitations is added as well as a button. It allows to directly jump on
answer linked to an invite which helps dealing with private surveys.

This commit is linked to task ID 1935176 and PR #30689 .
2019-01-31 11:53:44 +00:00