Commit Graph
125247 Commits
Author SHA1 Message Date
Aurélien Warnon 3cb46ec74c [ADD/MOV] sale_product_configurator: new module and files move
Purpose
=======
- Moved the product_configurator into its own module now that we have a specific option for it.
  The option only enables the p. configurator in the SO form.
  The e-commerce should always allow customer to configure their products, even if the option is not checked.

  This allows moving some of the code specific to the p. configurator into its own module.
  However, a lot of the code has to remain in "sale" module since the e-commerce does not require the option
  checked and needs the "configure product" feature in the shop by default.
  (This is why the fields "product_custom_attribute_value_ids" and "product_no_variant_attribute_value_ids"
  are still in the "sale" module)
2019-03-27 15:12:50 +00:00
Aurélien Warnon 14f0e81e20 [IMP] event_sale: add an event configurator on SO lines
Purpose
=======

Commit 92b9e3684607fbb0c9a7d3f2331292eac51ebdea removed the SO line popup form and added all the event
information fields directly in the sale order line tree view.

The event information should be hidden by default because they are only relevant for 'event_ok' products.

This commit will add an event configurator widget that will open a wizard when the selected product is 'event_ok'.
The widget will allow configuring the 'event_id' and the 'event_ticket_id' fields so that they can be safely removed
from the sale order line tree view.

The user can also edit the event configuration by using a button next to the product_id dropdown field
if the product is configured as 'event_ok'.
2019-03-27 15:12:49 +00:00
Aurélien Warnon e813487e75 [REM] sale: remove the SO line popup form
Purpose
=======

The sale order lines will now always be editable directly from the tree view.

Why?

- Installing some modules would force a popup form, which leads to a significant drop
  in productivity when filling in multiple sale order lines ;
- The next version of the product configurator will only be compatible with inline tree view editing.
2019-03-27 15:12:49 +00:00
Aurélien Warnon d9423656ce [IMP] (website_)sale: improve the exclusion mechanism in p.configurator
Targets commit d3530eb07e
References task id 1891970

Purpose
=======
- A message will be displayed when hovering a disabled attribute value's input to explain why it's disabled.
  e.g: Not available with Color: Black

  This works for both exclusions within the product and exclusions from a reference product.

- The exclusions will work in both sides, if "black" excludes "metal", "metal" will also exclude "black".
2019-03-27 15:12:48 +00:00
Aurélien Warnon f860128159 [IMP] stock: add stock for demo data: customizable desk & conf. chair
Targets commit d3530eb07e

Purpose
=======
- The "Customizable Desk" and "Conference chair" products now have some stock in the initial inventory
  to avoid the stock warning when adding these products in a SO through the product configurator.
2019-03-27 13:46:09 +00:00
Olivier Colson 5091bc1df7 [FIX] account: avoid traceback when using the 'with tax' filter of reconciliation models
Field tax_id has been replaced by tax_ids by commit https://github.com/odoo/odoo/commit/4d7f0526122084e7be08212bd5ef9935603605ff . The filter had not been adapted properly and raised a traceback, as tax_id did not exist anymore.

closes odoo/odoo#32231

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-03-29 08:53:27 +00:00
svs-odoo 3c3b9c0696 [FIX] stock: don't allow putaway for services
Before this commit, you could specify putaway rules for service type
products, but as putaway is useless for services, we don't want that.

Task #1961021

closes odoo/odoo#32199

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-03-28 09:48:31 +00:00
wan 0f8be0d75c [IMP] base: warn when duplicating VAT number
Task 1942984
Add a warning to alert for partner duplicates based on VAT number
When we create a new partner with an existing vat number, on change from vat number -->  trigger a warning,

closes odoo/odoo#31597

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-03-28 15:25:41 +00:00
Robot Odoo 460e96c887 [IMP] mail, test_mail, *: add new email.cc.mixin on main models
*: crm, project, maintenance, hr_recruitment

When a record is created from an email, cc can be lost. This commit
proposes a new mixin to keep cc on the record and allows to create
partner for each of them when sending a message from the chatter.

The mixin is added on the mail recors that can be created from mail.alias:

document
helpdesk.ticket
mrp.eco
quality.alert
hr.applicant
crm.lead
project.task
mail.channel
maintenance.equipment

A new show more/ show less mechanism is also added to the partner suggestions in chatter.

Task: 1925001
Linked PR: odoo/enterprise#3689

closes odoo/odoo#31275

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-28 17:36:53 +01:00
XavierDo fbafbf2230 [IMP] mail, test_mail, *: add new email.cc.mixin on main models
*: crm, project, maintenance, hr_recruitment

When a record is created from an email, cc can be lost. This commit
proposes a new mixin to keep cc on the record and allows to create
partner for each of them when sending a message from the chatter.

The mixin is added on the mail recors that can be created from mail.alias:

document
helpdesk.ticket
mrp.eco
quality.alert
hr.applicant
crm.lead
project.task
mail.channel
maintenance.equipment

Task: 1925001
2019-03-28 09:34:11 +00:00
XavierDo e1cd5bbede [IMP] mail: add show more button on partner suggestion.
When sending a message from chatter, a list of suggested partners appears
on the top of the text area. With the previous commit,
cc will be added to this list. This commit adds a show more/show less
button in case there is more than 3 suggested recipients to display.

Task: 1925001
2019-03-28 09:34:11 +00:00
wan c160c73602 [IMP] account: disable quick create on account.account
Task 1958439

Purpose: prevent the erroneous account creation

closes odoo/odoo#32177

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-03-28 08:25:05 +00:00
William Henrotin b3b8f6357f [FIX] mrp: update test_order.py
- Add docstrings
- Use Form views in all tests
- Add some missing assets

closes odoo/odoo#31473

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-03-27 15:16:55 +00:00
William Henrotin 291eb73ce1 [IMP] mrp: flexible component consumption
Purpose: The quantities to consume on Bill of Material lines should be
either strictly used or be taken as a reference more or less adjustable.

This commit adds a setting on BoM to specify if the consumption is 'strict'
or 'flexible'. This new option has the following impacts:

   On produce wizard: if consumption is set to 'strict', the done quantities
   are prefilled and checked when saving the wizard. If set to 'flexible',
   the production flow remains the same as present one.

   On workorders: if consumption is set to 'strict', the Validate button
   will save the consumed data, and propose to fill the remaining ones until
   the total is registered. If set to 'flexible', two button are displayed.
   'Validate' to register the current component and pass to next step either
   the quantity to consume is complete or not, and 'Continue Consumption'
   to registered the current component quantity but leaving the user the
   possibility to add more quantity (and possibly another lot number) for
   the current component

This commit also revert partially d3617fd852
as the warning become some sort of an error

Task: 1889393
2019-03-27 15:16:55 +00:00
Martin Geubelle 32ab3422f0 [FIX] web: tests: correct pass hasSelectors
The attribute is true by default, but when it is set to `false`
in a test, it was not correctly passed in the view.

Note that it has no impact currently in the tests.

closes odoo/odoo#32175

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-27 15:36:59 +00:00
Christophe Simonis da711b9c0b [MERGE] forward port branch saas-12.2 up to 27e9c9e011 2019-03-27 19:17:30 +01:00
Alexandre Kühn 05e480acb1 [FIX] im_livechat: open website livechat window
Before this commit, when opening a website livechat window,
it crashed with the following error message in the dev tools:

```
Cannot read property 'html' of `undefined`
```

The problem was caused by the rendering of the chat window header
before the chat window widget is even mounted in the DOM. This error
has been introduced by the migration from jQuery 1.12 to 3, in which
most occurrences of `$.Deferred` have been turned into `Promise` [1].

`Widget.appendTo()` returns a `Promise` (was `$.Deferred` before).
A `Promise` is always asynchronous, whereas a `$.Deferred` with
jQuery 1.12 may be either synchronous or asynchronous. In the case
of the website livechat window, the implementation with `$.Deferred`
was always synchronous, which is no longer the case now.

[1] https://github.com/odoo/odoo/commit/126fb33f6a74916c808c8e988f55faf82f0b5759

closes odoo/odoo#32168

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-03-27 14:27:11 +00:00
Arnold Moyaux 27e9c9e011 [FIX] mrp: unlock a raw move line
Usecase to reproduce:
- Go on a Mo
- Edit and Unlock
- Produce the MO
- Update a raw move and add a move line

User error you quant write on product_qty fields.
product_qty represent the reserved quantity on move line as quant's UoM.
The system requires to write a product_uom_qty that represent the same
quantity but in the move line UoM.

Fix it by removing the fields from the view, so it's no more save.
Also set the quantity done as readonly if the lines are present in
the view.

closes odoo/odoo#32135

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-03-27 14:02:32 +00:00
William Henrotin 799ab73189 [FIX] mrp: handle multi
The _compute_final_lot_domain method is implicitely multi but doens't manage the loop over 'self'
2019-03-27 13:40:29 +00:00
Sarah Van Bogaert ce4713cd0e [IMP] web: allow multiple fields in form views
This feature was already working in the actual version of Odoo but it is now tested. The following
features are supported:
- When the value of one widget is modified, the other ones change accordingly
- The modifiers 'invisible' and 'readonly' are applied correctly if they differ between widgets.
However, the modifiers 'required' must be equal for the several fields, otherwise the behavior
is not guaranteed.

closes odoo/odoo#32158

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-03-27 13:32:53 +00:00
Christophe Simonis 6b4758cd9a [MERGE] forward port branch saas-12.2 up to 7c1a9a8204 2019-03-27 14:29:01 +01:00
William Henrotin 419d32207a [FIX] mrp: qty_done and qty_to_consume concistency
This commit ensures the qty_to_consume is always adapted to be the same
as qty_done in the onchange on qty_processing. This patch is needed to
keep the same behaviour before and after the workorder line refactoring
5ef46664a2
2019-03-27 10:29:20 +00:00
Yannick Tivisse 7c1a9a8204 [FIX] l10n_be_hr_payroll: Hide wage_with_holidays when leaves = 0
Now that we don't take into account the legal leaves, it should be hiddden when the number of leaves is equal to 0 instead of 20.0

closes odoo/odoo#32125

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-03-26 12:05:33 +00:00
Christophe Simonis 5dbf7bf357 [MERGE] forward port branch saas-12.1 up to f00c490be8 2019-03-26 10:33:26 +01:00
Christophe Simonis f00c490be8 [MERGE] forward port branch 12.0 up to 11b1e12cde 2019-03-25 19:45:26 +01:00
Christophe Simonis 11b1e12cde [MERGE] forward port branch saas-11.3 up to e9068c290b 2019-03-25 18:28:16 +01:00
Christophe Simonis e9068c290b [MERGE] forward port branch 11.0 up to 0196a6feb5 2019-03-25 16:47:05 +01:00
Martin Trigaux 57e6346442 [FIX] web: format date without locale
moment().locale('en').format('YYYY-MM-DD')
"2019-03-25"
moment().locale('ar').format('YYYY-MM-DD')
"٢٠١٩-٠٣-٢٥"
moment().locale('my').format('YYYY-MM-DD')
"၂၀၁၉-၀၃-၂၅"

Was rejected as a valid bug at moment/moment#4448
Apply the same logic than 109b319d64

Fixes odoo/odoo#32081

closes odoo/odoo#32102

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-25 14:42:28 +00:00
Isabel Esparza 6155210d12 [FIX] crm: states
Onchange to show only the states of an especific country in
opportunities.

Closes #31993
opw-1958170

closes odoo/odoo#32099

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-25 14:13:34 +00:00
Christophe Simonis 0196a6feb5 [MERGE] forward port branch saas-15 up to 6cd6d1d468 2019-03-25 15:12:00 +01:00
Thibault Delavallée 02f5b654c3 [FIX] website_slides: fix vote karma
Currently doing a like then dislike does not give a void karma total. Indeed
karma is removed / added only when the vote hits 1 or -1 but does not correctly
take into account the third (void) state. We also avoid adding karma when
upvoting / downvoting an already upvoted / downvoted slide. Interface does
not allow it but avoiding to add karma at model level is always a good idea.

Karma-related tests are improved a bit.

Commit linked to task ID 1958810 and PR #32057

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-25 12:39:32 +00:00
Can Tecim a39b1f4595 [ADD] l10n_tr: add provinces of Turkey
closes odoo/odoo#31592

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-25 12:38:05 +00:00
Christophe Simonis 6cd6d1d468 [MERGE] forward port branch saas-14 up to 3c7be1e88f 2019-03-25 13:32:17 +01:00
Christophe Simonis 3c7be1e88f [MERGE] forward port branch 10.0 up to a95811eee2 2019-03-25 13:30:34 +01:00
Thibault Delavallée 534822e54c [REF] website_slides: better completion computation
Purpose is to avoid having to recompute too much stuff. Indeed currently
slide.channel.partner completion field depends on its channel number of
slides. It means adding a slide on a channel having a lot of members will
trigger the recompute of all its slide channel information.

Instead completion on slide.channel.partner is now simply the number of
completed slides. Computed (not stored) field on channel that indicates
current user status is now based on total slide (completion / total slides).

Commit linked to task ID 1958810 and PR #32057
2019-03-25 12:18:28 +00:00
Thibault Delavallée eb045af676 [FIX] website_slides: remove unnecessary sudo in computed field
As we always update slide / partner relationship using sudo let us remove
unnecessary sudo in the computed field.

Tests are added to ensure it is effectively working. At least probably.

Commit linked to task ID 1958810 and PR #32057
2019-03-25 12:18:28 +00:00
Xavier Dubuc 46d22fbd4f [FIX] product: template kanban view perf
When displaying product template list in kanban mode, all the variants
of the product template are loaded but aren't used at all. This causes a
perf issue when loaded product templates have a lot of variants.

This commit removes the field `product_variant_ids` from view
`product_template_kanban_view` to avoid that perf issue.

opw 1951369

closes odoo/odoo#32048

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-25 11:44:55 +00:00
Nicolas Lempereur 2a89f0c7f8 [REV] "[FIX] website: language prefixed URL on website"
This reverts commit 5324284f56
This reverts commit ad826f56ba.

If for example we had in a template:

 <script type="text/javascript" src="/payment_stripe/static/src/js/stripe.js"></script>

it has been reproduced to be gotten as:

 <script type="text/javascript" src="/de_DE/payment_stripe/static/src/js/stripe.js"></script>

which is unexpected and could cause an error.
closes #32090

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-25 10:53:25 +00:00
wan 29ef024b51 [IMP] account: display sample data on dashboard if empty
Task: 1893104

closes odoo/odoo#28131

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-03-25 10:23:49 +00:00
eco-odoo 3d6aa1db14 [IMP] account: improve dashboard design
Replace "Balance in General Ledger" by "Balance in GL" or simply "Balance" when both balances are equal.
Rename Import Bills > Upload bills.
Remove space between labels and values.

Task: 1893104
2019-03-25 10:23:49 +00:00
eco-odoo 7dfae39db4 [IMP] web: improve attachment files design
Task: 1893104
2019-03-25 10:23:49 +00:00
Colinliz a4f9b48667 [CLA] add Colinliz to Inspur CCLA
closes odoo/odoo#32076

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-25 10:02:08 +00:00
Nicolas Martinelli d3bd48d67b [FIX] stock: has_tracking
The field `has_tracking` should be read-only, there is no reason to make
it writeable.

opw-1958266

closes odoo/odoo#32080

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-25 08:24:01 +00:00
Odoo Translation Bot fa12433867 [I18N] Update translation terms from Transifex 2019-03-24 03:11:51 +01:00
Olivier Dony 28a1371035 [FIX] payment_ogone: send client info in S2S tx data
The client IP and email are useful pieces of information for auditing
transactions, and are used by the Fraud Detection Module(s) of Ingenico.

closes odoo/odoo#32058

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-22 18:35:28 +00:00
Nicolas Lempereur ad826f56ba [FIX] http_routing: ignore # when checking multilang URL
With 953a693df when a route is not found we assume it is a website.page
that can be multilang.

But with #31792 we should once again prefix URL by the language if
necessary.

The combination of the two cause issue when an url like `/web#home` is
tested since we do not take `#` into account, we check if the route is
multilang but no route `/web#home` is found => so we get
`/fr_FR/web#home`.

With this fix, `#fragment` is not taken into account when searching
route.

related to #31792
related to opw-1922051
closes #32059

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-22 16:51:09 +00:00
Nicolas Lempereur 5324284f56 [FIX] website: language prefixed URL on website
In 10.0 and before, if we were eg. on website page /fr_FR/contact, if
`fr_FR` language (french) is installed and not the default website
language we would have all URL towards translated content (route with
multilang=True) prefixed with /fr_FR/ (the language code).

With 9cd982bcc some improvments were done to CDN but this also breaks
language prefixing, so this cause an unecessary redirect:

- we are on /fr_FR/contact and click on "Shop"
- we go to /shop
- odoo redirects US /fr_FR/shop

With this PR, URLs are prefixed with language once again.

note: the added test is hackish but the function tested depends on a lot
of odoo.http things that are hard to use for test (request.render,
request.context, request.httpreqest).

opw-1922051
closes #31792

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-22 16:14:09 +00:00
Christophe Simonis 3a0bedd655 [MERGE] forward port branch saas-15 up to 48e4c18fc4 2019-03-22 16:26:33 +01:00
Christophe Simonis 48e4c18fc4 [MERGE] forward port branch saas-14 up to cded89b531 2019-03-22 13:26:19 +01:00
Christophe Simonis cded89b531 [MERGE] forward port branch 10.0 up to f1c72ee8ee 2019-03-22 13:25:55 +01:00