Commit Graph
126256 Commits
Author SHA1 Message Date
Antoine Guenet 6c38ed2f8d [FIX] web_editor: open the link modal on dblclick button descendent
The link modal only opened on double-click directly on an anchor,
meaning that double-clicking text in a span node within the button (as
is the case in the call-to-action snippet for instance) wouldn't open
the modal.
Now it opens as long as we have an ancestor that is an anchor, unless
the double-click occurs on a media (eg: a pictogram), in which case it
should open the media's modal.

closes odoo/odoo#31229
2019-02-19 09:56:32 +00:00
Alexandre Kühn 0fb43cf133 [FIX] mail: no traceback on receiving seen notification
Before this commit, when we post a message and someone
has received it, there could be a traceback.

Steps to reproduce:
1. Two users are logged in.
2. On one user:
   - open any app except Discuss
   - From systray messaging menu, click on "New messages"
   - Open Discuss
   - Post a message in a direct chat with other User.
> traceback `Cannot read property 'getID' of null`

closes odoo/odoo#31228
2019-02-19 09:39:57 +00:00
Ankita Raval 2e1d7f8519 [ADD] stock: Add a field note on SN/LN.
-Add a field note to allow users to record detailed information about a lot/serial number.

Related Task Id : 1938650

closes odoo/odoo#31089

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-02-19 09:35:40 +00:00
wan d60e6a1ab7 [ADD] l10n_be_invoice_bba: update reference fields
Task 1920906
remove the l10n_be_structured_comm field
random/date references will not be longer used
adapt for the last changes in account

closes odoo/odoo#29858

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-04-02 11:11:00 +00:00
wan 46a339fc9e [ADD] account: new european invoice reference
Task 1920906
Rework of the invoice references. We can now select references based on partner or on invoice number, and the Odoo way, or the (newly implemented) european way (SEPA RF references)
The reference type informations are no longer stored on the company but on the sales journals
2019-04-02 11:11:00 +00:00
Thibault Delavallée 76c25f1c3c [FIX][ADD] website_sale_stock(_product_configurator): move option to its bridge module
Since recent changes product configurator is now located in its own module.
Some code remaining in website_sale_stock should be located in its own
bridge module.

closes odoo/odoo#32336

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-02 11:45:44 +00:00
Thibault Delavallée 02f548ce9e [FIX] stock_account: fix reference to undefined variable
post_inventory method does not return anything (in stock), and True (in
mrp). Anyway the returned result is not used anywhere and does not have
any meaning.

In stock_account call to super is done on some sub record sets and result
of super is returned. However due to code architecture it is unsure whether
super is actually called. Let us avoid any issue with res being undefined if
there is no call to super done.
2019-04-02 11:42:55 +00:00
Goffin Simon 2afd482c1a [FIX] project: adding channels members to a private project
Steps to reproduce:
- Create a channels C with user A linked to an employee E
- Create project P with privacy_visibility='followers' meaning only visible for employees that follow P
- Add the channel C as a follower of P
- Log as user A go to Project app

Bug:
The project P is not readable for A

opw:1958386

closes odoo/odoo#32324

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-04-02 07:10:43 +00:00
William Henrotin 600072d8d4 [IMP] delivery: rename 'Delivery Method' by 'Shipping Method'
To be consistent with sale orders

Task : 1942231

closes odoo/odoo#31339

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-02 08:33:17 +00:00
William HenrotinandHetal Dhanak b57a8051f2 [IMP] delivery: only show external carrier
Clicking on 'install more providers' should only show module of external
carrier. In the previous domain, we get delivery_barcode and
website_delivery_ups in the domain which is not intended.

Task: 1942231
Co-Authored-By: Hetal Dhanak <hdh-odoo@users.noreply.github.com>
2019-04-02 08:33:17 +00:00
William HenrotinandHetal Dhanak 9df79f42d0 [IMP] mrp: manage actions without raw moves
If a manufacturing order doens't have any raw move, it now triggers a user error in case of action_confirm and simply change it's state in case of cancel.

Task: 1942231
Co-Authored-By: Hetal Dhanak <hdh-odoo@users.noreply.github.com>
2019-04-02 08:33:17 +00:00
William HenrotinandHetal Dhanak ab215ca158 [IMP] stock: cancel button at the end
On the stock picking form view, we would like the cancel button is at the far right of the button bar.

Task: 1942231
Co-Authored-By: Hetal Dhanak <hdh-odoo@users.noreply.github.com>
2019-04-02 06:46:12 +00:00
William HenrotinandHetal Dhanak 6f3c3ab266 [IMP] stock: picking report improvement
This commit change the word 'state' by 'status' in the picking pdf reports. 

Task: 1942231
Co-Authored-By: Hetal Dhanak <hdh-odoo@users.noreply.github.com>
2019-04-02 06:36:04 +00:00
William HenrotinandHetal Dhanak 8868e14e54 [IMP] stock: priority widget
Use the priority widget (the yellow stars) to represent the priority field on stock.picking

Task: 1942231
Co-Authored-By: Hetal Dhanak <hdh-odoo@users.noreply.github.com>
2019-04-02 06:34:53 +00:00
Romain Derie e8916a817c [IMP] website_sale_delivery: use monetary 'to_html' method
Before this commit:
Instead of using the `to_html` method from `ir.qweb.field.monetary`, we would
use `_format_amount` that would mimick `to_html` but without the HTML part,
keeping only the integer amount.
That was making the python, JS and XML code unnecessarily complexe.
Python: code duplicated between `to_html` and `_format_amount`
XML: double badge in DOM, one to show text and one to show t-field/monetary DOM
     structure ($ <span class='oe_currency_value'>50.5</span>)
JS: handle both badges depending if need to show text or price, complexe
    selector to target t-field integer DOM, and also handle d-none to show only
    one at a time.

Now:
We removed the `_format_amount` method and use the standard one.
That way, XML, JS and python could be clean from unnecessary complexity.

Coming from #31857 (task-1867265)

closes odoo/odoo#32327

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-02 08:00:34 +00:00
Romain Derie b2b73b9295 [IMP] website_sale_coupon_delivery: consider free delivery
odoo/odoo#31857 retrieve asynchronously the delivery carrier price instead of having to
click on every one of them.
If the delivery is free thanks to coupon, the delivery price should be free and
no need to compute it.

Closes #31857
task-1867265
2019-04-02 08:00:34 +00:00
Romain Derie 3bdf6cb358 [IMP] website_sale_delivery: load carrier price async
Before this commit:
User landing on checkout payment step had to select a carrier.
These carriers only showed 'Select to compute price'. This was done to
prevent the page to take seconds to load, since it would compute all the
carrier price by querying these carrier API then display the page.
The users would still click on every carrier anyway to check all the prices and
select the cheapest one.

Now:
Once the page is loaded, we will asynchronously retrieve every carrier prices.
That way, the page rendering page will not be affected and the user will be
able to see the price of every carrier after a few seconds without having to do
anything.

Closes #31857
task-1867265
2019-04-02 08:00:34 +00:00
Romain Derie 37f4bfff3f [IMP] website_sale_coupon_delivery: encapsulate code for task-1867265
This commit does nothing except encapsulating code from
_handleCarrierUpdateResult related to badges.

This is needed for the new feature to allow carrier prices to be loaded
asynchronously, see #31857

task-1867265
2019-04-02 08:00:34 +00:00
Romain Derie ca7da746d8 [ADD] website_sale_coupon_delivery: add bridge module to avoid hacks
This commit introduce a new module which is a bridge between
`website_sale_coupon` and `website_sale_delivery`.

Before that, commit odoo/enterprise@a0a8118 and odoo/odoo@1ab53c2 introduced coupon
code into delivery module, and coupon+delivery code into `website_sale`
module.

That was the only way in stable but was nasty as it is not only code from one
module in another module but also code from enterprise module in community
module..

This is done to prepare the new feature to load carrier asynchronously on cart,
see #31857

(Note that `sale_coupon_delivery` already exists)

task-1867265

Coming from #31857
2019-04-02 08:00:34 +00:00
Romain Derie 9a6a00ed13 [FIX] website_sale_delivery: show 'Free' instead of '$0'
As coupon does, show 'Free' instead of '$0' when a delivery is free
(`free_over` field).

That is more coherent and also prevent flicker when coupon and delivery are
both installed.
Step to reproduce:
  - Have a free promotion from `sale_coupon` giving free delivery
  - Have a delivery carrier free over x$
  - Go to /shop/payment with over x$ in cart
  - Select the delivery carrier, it will show 'Free' then will be replaced a
    few seconds later by '$0'

Coming from #31857 (task-1867265)
2019-04-02 08:00:34 +00:00
Romain Derie 327932f63a [FIX] website_sale_delivery: don't replace error message by 'Free'
When a delivery carrier can't compute the delivery price, it returns an error
that is shown instead of the price (eg 'bpost Domestic is used only to ship
inside Belgium..').

But since 1ab53c27f everytime the user compute a carrier price and there is a
coupon allowing free delivery, every listed delivery carrier would have their
badges set to 'Free', including also carrier in error state.

This commit will not replace the error message by 'Free'.

Coming from #31857 (task-1867265)
2019-04-02 08:00:34 +00:00
Romain Derie 9cd990c740 [FIX] website_sale_delivery: remove useless check
This commit remove part of the condition as an empty jQuery element is always
truthy.

This commit is cleaning code to prepare the new feature to allow carrier prices
to be loaded asynchronously on cart.

See #31857 (task-1867265).
2019-04-02 08:00:34 +00:00
Pierre Masereel 4c9fa084b4 [IMP] delivery: allow recompute when not in draft
closes odoo/odoo#32213

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-04-01 12:47:25 +00:00
Pierre Masereel 4483121739 [IMP] delivery: remove carrier from SO, when remove line 2019-04-01 09:23:03 +00:00
Pierre Masereel 47ee1666bb [IMP] delivery: only add lines on SO when rate_and_ship 2019-04-01 09:23:03 +00:00
Pierre Masereel 1882cd18e9 [IMP] delviery: remove useless field 2019-04-01 09:23:03 +00:00
Julien Giannone 230177ffa9 [IMP] mail: add a different layout for inactive followers
When displaying the followers of a document, followers who are set as inactive will be displayed in a different layout than the active ones. The purpose is to mark a clear difference between active and inactive followers.

Task #1957849

closes odoo/odoo#32084

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-03-27 15:54:46 +00:00
Robot Odoo d2c75b7e86 [MERGE] *: Improve graph view, replace nvd3 with Chart.js
The present work is part of an ongoing plan aiming to refactor/improve the reporting views (in particular the graph view).

The most notable changes are
- better support of comparison mode (comparison of different time periods)
- better tooltips and legend (content/style)

It has also been decided to use Chart.js instead of nvd3 to draw charts.
The main reasons are that Chart.js is better maintained/designed and offers many interesting features.

Thus we have rewritten all the code depending on nvd3, adapt it to the new library, and remove completely the nvd3 library and the references to it.

Task Ids: 1911201, 1946138

closes odoo/odoo#31766

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-04-02 10:47:52 +02:00
Mathieu Duckerts-Antoine 596206cdf6 [IMP] web: remove nvd3 library
It has been decided to use Chart.js instead of nvd3 to render charts.
Now that nvd3 is no more in use, we remove it.

Task ID: 1946138
2019-04-01 14:40:51 +00:00
Mathieu Duckerts-Antoine 0eba50dd1c [IMP] survey: use Chart.js instead of nvd3 in survey results
This commit is one part of the task 'removing nvd3'.
We use now Chart.js to draw charts.

Task ID: 1946138
2019-04-01 14:40:51 +00:00
Géry Debongnie 8b7891044d [IMP] *: use Chart.js in website_links/website_sale_link_tracker.
This commit is one part of the task 'removing nvd3'.
We use now Chart.js to draw charts.

Task ID: 1946138
2019-04-01 14:40:51 +00:00
Mathieu Duckerts-Antoine 0d7ebb6d14 [IMP] sales_team: remove useless css rules
This commit is one part of the task 'removing nvd3'.
We use now Chart.js to draw charts. This makes old CSS rules
related to nvd3 useless.

Task ID: 1946138
2019-04-01 14:40:51 +00:00
Géry Debongnie 769806ad13 [REF] reimplement journal dashboard widget with Chart.js
This commit is one part of the task 'removing nvd3'.
We use now Chart.js to draw charts.

Task ID: 1946138
2019-04-01 14:40:51 +00:00
Géry Debongnie 2af74a5f53 [REF] web_kanban_gauge: reimplement gauge widget with Chart.js
This commit is one part of the task 'removing nvd3'.
We use now Chart.js to draw charts.

Task ID: 1946138
2019-04-01 14:40:51 +00:00
Mathieu Duckerts-Antoine 3ab3082a32 [IMP] website: use Chart.js in community dashboard
This commit is one part of the task 'removing nvd3'.
We use now Chart.js to draw charts.

Task ID: 1946138
2019-04-01 14:40:51 +00:00
Mathieu Duckerts-Antoine 604c43640a [IMP] web: use Chart.js in graph view
It has been decided to use Chart.js instead of nvd3 to render charts.
In this commit the graph view has been largely rewritten to benefit
from the options offered by Chart.js.

Task ID: 1946138
2019-04-01 14:40:51 +00:00
Mathieu Duckerts-Antoine a8d3ca771f [IMP] web: add library Chart.js
This commit makes possible to use the Chart.js library to create
various charts.

Task ID: 1946138
2019-04-01 14:40:51 +00:00
Mathieu Duckerts-Antoine a9bcb12f64 [IMP] web: graph view improvements
This commit extends the support of comparison mode for the graph view
and refine the tooltips and rendering in line mode.
The graph view code has also been slightly refactored.

Task ID: 1946138
2019-04-01 14:40:51 +00:00
Mathieu Duckerts-Antoine d23419fd86 [FIX] web: call super in AbstractAction willStart
The commit https://github.com/odoo/enterprise/commit/19a144d6af2974e964c6487170e6bca1b14d3898 has
modified how libraries are loaded at several places and has
introduced a bug in sale_subscription_dashboard where the
libraries are no longer loaded at all. We fix that situation
by calling super in the willStart method of AbstractAction
that inherits from Widget. Abstract actions can now also
benefit from the mechanism present in Widget willStart.
2019-04-01 14:40:51 +00:00
Mathieu Duckerts-Antoine 4315e1b4aa [FIX] web: on_attach_callback of form renderer widgets
Before this commit, the 'on_attach_callback' method of a subwidget of
the form renderer would not be called when the renderer renders
itself but is already in the dom. This can cause problems when a
subwidget has to know if it is in the dom for its own rendering.
This commit fixes that situation.
2019-04-01 14:38:44 +00:00
Mathieu Duckerts-Antoine a804585700 [FIX] web: correct quarter format in mockReadGroup
Before this commit the value of a field (of date/datetime type)
used as a groupby was not correctly formatted in the test environment
when the granularity was 'quarter'. This commit fixes that situation.
2019-04-01 14:38:44 +00:00
Mathieu Duckerts-Antoine 863de16a91 [FIX] web: correctly update this.widgets
Old subwidgets of a widget inhereriting from BasicRender were not
correctly destroyed. This was the cause of various problems when
cycling over this.widgets.
2019-04-01 14:38:44 +00:00
jem-odoo a742279ad2 [REF] sale,sale_expense: clean and optimize reinvoice code
In the previous commit the analytic entries generation when posting a
move was optimized to be done in batch. The performance is break
when sale module is installed. Indeed, in case of reinvoicing a
analytic line, AAL creation will trigger a sale.line creation.

This mecanism is very inefficient because
1/ AAL creation and Sales line creation are not batched
2/ sale line creation is done after the AAL creation, and then linked
with a `write` operation. So one `create` and one `write` per AAL to
reinvoice.
3/ To determine on which Sales Order to reinvoice, many `search` can
be performed per AAL.

Also, this looks strange that AAL creation might result into a sales line
creation.

This commit changes this in order to optimize and clean the code:
- the account.move.line (that creates the AAL) will also create the
Sales lines
- SO lines creation will be done in batch
- minimize the number of `search` done during the process
- the SO line will be linked to the AAL by passing the SO line id in the
create values of AAL (no `write` operation one AAL and SOL are created).

This was the last part of legacy code of 'sale_analytic.py' that we need
to get rid of. There are still work to do, but I think now, the
business case handled here can now breathe and have a peacefull life.

Task-1911898

closes odoo/odoo#28939

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-04-01 07:05:02 +00:00
jem-odoo bc9e5ea361 [IMP] account: generate analytic entries in batch
When posting an account.move.line, the ones with an analytic account set
will create analytic entries. As this is purely and simply data
generation,
they might be create in batch, using the new "create multi", in order to
perform only one INSERT query for all the lines to generate.
This commit aims to optimize the analytic.line creation by doing it in
batch.

Task-1911898
2019-04-01 07:05:02 +00:00
Romain Derie 9f5cdd86f2 [FIX] sale_coupon: upgrade discount when possible
/!\ Cherry-pick of odoo/enterprise@8b85628c65 that was lost between
coupon move from OE to OC and forward-port

It is possible to setup multiple global promotions, i.e. 5% discount
after 5 products and 10% discount after 10 products. Buying 10 products
gives the 10% discount. But if you select 5 products (5% is applied)
then add 5 more products, the 10% discount is not automatically applied,
the custommer must remove the 5% discount in order to get the 10% one.

This commit automatically upgrades the promotion to use the best
applicable discount.

opw-1953224

closes odoo/odoo#32314

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-04-01 15:47:40 +00:00
Romain Derie b327f2f3c3 [FIX] website_sale_coupon: forward-port on module move
website_sale_coupon was moved from enterprise to community just before a
forward-port bring changes to that module and before that module was removed
from enterprise.
2019-04-01 15:25:42 +00:00
Robot Odoo 2f238f6cda [IMP] website: improve reset view feature
- Store previous arch to be able to reset it (soft reset)
- Add the possibility to reset from file if possible (hard reset)
- Adapt frontend reset page to these new fields
- `arch_fs` hack to check if view was modified got moved to new field
  `arch_updated` as we now need to keep track of the `arch_fs` to reset a
  broken view.

Closes #32009 (task-1943001)

This commit also:
- adds the possibility to reset a view arch in its form view, including a diff
  viewer (github like).
- adds string helper on those arch fields, as they are not documented, it is not
  always obvious to get the purpose of each fields.
- adapts the font-size and headings to fit Odoo style on the error 500 page.
  The error page does not use Odoo's assets, just bootstrap.css (the cursor
  might be broken on the error 500 page so we can't use Odoo assets).
- raise the caller on unexisting t-call during QWeb rendering.
- adapts reset view code to single view as the code still had remains of its
  initial release (Odoo 9.0). Handling multiple views has no sense anymore.

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-01 19:14:42 +02:00
Sébastien Theys d3d58b60dc [IMP] base,product,website_sale: move image fallback mixin -> variant
Only the variant is using this code, so it was a bad idea to make the mixin
more complicated than it had to be.

Update the image tests to make sure this is working correctly. The test were
only testing the size of the images, now they also test the actual content.

Part of task-1949729

closes odoo/odoo#32253

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-30 11:25:19 +00:00
Christophe Simonis 7ac5ec628c [MERGE] forward port branch saas-12.2 up to 18c735361a 2019-04-01 16:20:00 +02:00
Jeremy Kersten 8de362fac6 [MRG] sale_coupon_delivery: move to community 2019-04-01 15:08:01 +02:00