Commit Graph
126133 Commits
Author SHA1 Message Date
Simon Lejeune dfb5e3791f [FIX] stock: duplicate route
Do not apply the duplicated route to the products/categories/warehouses
the original one was applied to.

Fixes #31610

closes odoo/odoo#31619

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-03-06 08:38:38 +00:00
Robot Odoo 2140ccb2f6 [MERGE] website_slides: re-order templates and finalize model cleaning
Purpose of this merge is to perform a quick linting after having merged
several tasks and PR adding all requested eLearning features. Templates
are split for better understanding now that main templates for homepage,
course and lessons are in.

A model cleaning is performed as well as a-bit-late additions to stick
to specifications, notably splitting short and long description fields
on course.

See sub commits for more details. Merge linked to task ID 1941250 and
PR #31272.
2019-02-20 14:52:15 +01:00
Christophe Simonis 2c495502aa [FIX] hr_holidays: import used function
Oversight of previous forward-port
2019-02-20 13:58:03 +01:00
Thibault Delavallée 3ecacb31a9 [REF] website_slide: split short from long description in channel model
Purpose of this commit is to provide a better way to display channel information.
Description is split into two fields. A text one, holding the short description
and used in channel header. A long html one, holding more details course
description.

Commit linked to task ID 1941250 and PR #31272.
2019-02-20 12:55:36 +00:00
Christophe Simonis f1ff55bca1 [MERGE] forward port branch 11.0 up to de8cefcef4 2019-02-20 13:40:48 +01:00
Thibault Delavallée f43faad5a3 [REF] website_slide: rename statistics fields on channel and category models
Purpose is to reduce model naming complexity. Currently you have: slide_type
<type>, and related statistics on channel and category nbr_<type>s with a
trailing and error-prone s. Let us remove the trailing s to reduce complexity
of code reading. Some code cleaning in statistics computation is also done.

Commit linked to task ID 1941250 and PR #31272.
2019-02-20 12:24:30 +00:00
Thibault Delavallée 4e116ef055 [REF] website_slides: use mixin.image on channel and slide models
This recently introduced mixin allows to hide complexity of defining, using
and resizing images. Let us use it in channel and image model.

Commit linked to task ID 1941250 and PR #31272.
2019-02-20 12:24:30 +00:00
Thibault Delavallée 0e56426252 [FIX] website_slides: clean some model-related parameters
Quiz questions and answers should be translatable as they are intended
for end users and are displayed in courses frontend. Some required fields
are also missing. Some docstrings are cleaned.

Commit linked to task ID 1941250 and PR #31272.
2019-02-20 12:24:30 +00:00
Thibault Delavallée c6f473a914 [MOV] website_slides: split channel-type specific display in course into sub templates
It will ease maintenance and polish of those templates.

Commit linked to task ID 1941250 and PR #31272.
2019-02-20 12:24:30 +00:00
Thibault Delavallée 9ae7f5a261 [IMP] website_slides: perform some code linting and re-order frontend templates
Purpose is to perform some linting in code. No functional change should
occur with this commit, only some code move. Diff may appear huge but
it is just because some files are split.

This cleaning allow to better understand code and templates architecture
now that eLearning feature has landed in Odoo Community. It will ease future
additions, modifications and fixes.

Containing :
 * [REF] make some internal slide-related methods private as they are not
   intended to be called by outside world;
 * [MOV] new channel invite wizard in wizard folder;
 * [MOV] split frontend templates in some files to better locate code. There is
   now files for homepage, course, lesson, embed and utils in addition to
   slide-related profile template;
 * [REM] dead (unused) templates;

Commit linked to task ID 1941250 and PR #31272.
2019-02-20 12:09:01 +00:00
Adrian Torres 934c001680 [FIX] expression: properly handle {TRUE,FALSE}_LEAF
Before this commit, doing expression.OR() with only FALSE_LEAF would
yield [] which is equivalent to TRUE_LEAF and is therefore not correct.

The same happened (to a lesser extent) with expression.AND() within an
expression.OR(), since the former would return a [] which would be
ignored by expression.OR().

See tests for a clearer view of the use cases.

Fixes #30113, #26540

closes odoo/odoo#31202
2019-02-20 10:45:28 +00:00
Julien (juc) Castiaux c7386de1a2 [FIX] website_mail: no publish button for notes
The admin can decide to publish/unpublish messages in the comments
of a product from the website. The button is also shown for notes
even if they are never published.

opw-1935337

closes odoo/odoo#31420
2019-02-26 09:49:19 +00:00
Nicolas Martinelli f886bdfffa [FIX] account: default account
When importing an invoice without specifying the type, the invoice type
is set to `out_invoice`, but the account set is the supplier account.

At this point, the invoice type is simply undefined (`False`). It will
be set by default at creation to `out_invoice`. Therefore, we reach the
`else` condition which uses the supplier info.

We simply inverse the condition, so it creates a consistent object.
However, it raises a bigger question about how the action context should
be kept at invoice. We won't address it :-)

opw-1925547

closes odoo/odoo#30154

closes odoo/odoo#31373
2019-02-22 14:58:51 +00:00
Nicolas Martinelli b431f8eadc [FIX] barcodes, web: float scannable
- Switch to French language
- Go to Inventory > Inventory Adjustment
- Launch an adjustment

The field 'Real Quantity' doesn't follow the float formatting.

This is because the widget is set as `field_float_scannable`, which is
not recognized by the formatting function.

Since the widget descriptor has priority over the type descriptor, we
must explicitly take this widget into account, on top of adding the
`format_value` method.

opw-1940884

closes odoo/odoo#31366
2019-02-22 13:45:30 +00:00
Nicolas Martinelli 264a047a8a [FIX] sale: SO count
Apply e1767490e9 to SO count in order to
take into account all children, and not only direct children.

opw-1941335

closes odoo/odoo#31329
2019-02-21 14:14:17 +00:00
Christophe Monniez db6e8f368c [REL] saas-12.2 2019-02-19 21:02:26 +01:00
Thibault DelavalléeandAurélien Warnon 49a005bbd1 [FIX] website_slides: set slide as completed only for valid members
Indeed some slides are available for external people if is_preview is set
to True. It indicates slide is available for teasing. It should not be
marked as completed for non members.

This commit is linked to task ID 1942836 and PR #31239.

Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2019-02-19 16:54:23 +00:00
Thibault DelavalléeandAurélien Warnon 4f380f4aeb [FIX] website_slides: (temporarily) fix infinite loop
Do not fall into an infinite loop when fetching content of an empty webpage
slide in the newly-introduced fullscreen mode.

This commit is linked to task ID 1942836 and PR #31239.

Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2019-02-19 16:54:18 +00:00
Thibault DelavalléeandAurélien Warnon 18f917fe3b [REF] website_slides: improve and make access options clearer
Purpose is to ensure more advanced use cases are still supported in new
elearning platform in addition to more public use cases. Fields controlling
access are now

 * enroll: who can enroll on course: public (everyone, simply click on join
   button), invite (added by already members) and payment (in bridge with
   website_sale, if SO with product is confirmed);
 * enroll_group_ids: automatically add members of those groups to the channel
   to ease having groups for a given subset of users;
 * visibility: who can see a channel and its slides: public (everyone, it means
   channel is visible on website for example), members (hidden for non members)
 * website_published on channels and slides; non publishers cannot see what
   is not published, whatever other parameters;
 * upload_group_ids: who can upload on a channel;
 * download_security on a slide is completely removed as it makes no sense
   for most slide types;

To ensure a better user experience responsible of a channel is added in its
members. People uploading a slide are now also allowed to read it to avoid
having inconsistency behavior between upload_group_ids and access rules.

Some tests are added.

This commit is linked to task ID 1942836 and PR #31239.

Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2019-02-19 16:52:07 +00:00
sed-odoo fcc49c788f [IMP] l10n_be_hr_payroll: Add 'Individual account' report
Purpose
=======

Add the possibility to generate the 'Compte Individuel' (or 'Individual Account')
based on the belgian payslip for a specific year.

This report aggregates the payslip lines by month, by quarter and for the entire
year.

closes odoo/odoo#30487
2019-02-19 16:35:17 +00:00
Christophe Simonis c6c3d73391 [MERGE] forward port branch saas-14 up to 9b735d0057 2019-02-19 17:09:59 +01:00
Christophe Simonis 9b735d0057 [MERGE] forward port branch 10.0 up to 6cf4f4924b 2019-02-19 17:08:56 +01:00
Lucas Perais (lpe) de8cefcef4 [FIX] web: pivot unload filter, reset, load another filter
On a pivot view with a default filter which has column and row groupbys
Remove the filter
Collapse all columns and rows
Activate another Filter from favorite which has a column groupby at least

Before this commit, the columns were not displayed in the DOM, though RPC's
and internal data were actually correct
This was because we considered the changes had been done "in place"
taking the old tree to build the new one for the columns
when really, we should have recomputed the column tree

After this commit, the columns display the group we want

OPW 1935155

closes odoo/odoo#31247
2019-02-19 15:12:28 +00:00
mgh-odoo 66392a9fff [FIX] pos: encode negative payment for refund
currently, if the user wants to refund amount to the customer
and enter negative payment form keyboard its throws an error. that will fixed.

Task: #1935602

closes odoo/odoo#31061
2019-02-20 07:01:52 +00:00
Nicolas Martinelli 09bf391f4d [FIX] stock: delivery slip address
After discussion with the Mighty Priestess, the address used in the
Delivery Slip should be the picking partner as a first priority, then
the move lines partner.

And we therefore remove the useless 'Assign Partner' button (but not the
associated method since it is public).

opw-1935039

closes odoo/odoo#31250
2019-02-19 14:48:20 +00:00
Alexandre Kühn f945b1bcc2 [FIX] mail: small UI changes with 'seen' icon
- correctly align 'seen' icon
- purple 'seen' icon

closes odoo/odoo#31240
2019-02-19 12:29:39 +00:00
Nicolas Lempereur 8bc2d85b1b [FIX] website_crm_partner_assign: deadline->expected closing
In the backend interface, lead/opportunity date_deadline is named
"Expected Closing" or sometime "Expected Closing Date" but on the
frontend it was named "Deadline" for opportunity.

opw-1941273
closes #31244
2019-02-19 12:19:31 +00:00
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