Commit Graph
126256 Commits
Author SHA1 Message Date
Alex Tuyls f7acbf6466 [FIX] website_event,website_event_sale: correction pricelist in event register
A recent fix c41d1d2 was made to select the related pricelist
to show the correct price of an event product.

This fix creates another bug in case of Ecommerce app
not installed, because the method get_current_pricelist
is defined in website_sale module.

We need to move the fix from website_event to website_event_sale module.

closes odoo/odoo#31953

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-03-19 15:57:46 +00:00
Jorge Pinna Puissant 577333f548 [FIX] account: invoice alias in multi company
Install accounting in a multi company environment.
Configure email server.
Configure an alias for the vendor bill journal per company.

Before this commit, all the invoices were created in the same company,
regardless of the alias used.

Now, the invoice is created in the company of the used alias.

opw-1939909

closes odoo/odoo#31948

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-19 14:33:07 +00:00
Nicolas Martinelli 68860fcc9d [FIX] stock_dropshipping: modify SO
- Create a SO with a dropship product, set a qty of 1.0
- Validate the SO
- Validate the corresponding PO
- Change the qty to the SO to 2.0

2 PO are created: the first one with a qty of 1.0, another with a qty of
3.0.

There is an overlap of functionality between:
- `_purchase_increase_ordered_qty` from `sale_purchase` (first PO)
- `_action_launch_stock_rule` from `sale_stock` (second PO)

The quantity is incorrectly computed since the quantity on the PO is
taken into account only if the no stock move exist.

We remove the latter condition, so the procurement quantity is computed
correctly.

opw-1950076

closes odoo/odoo#31963

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-19 11:50:46 +00:00
Julien Castiaux 716ff76d5e [FIX] sale: force maximum section/subtotal width
Step to reproduce:
- Install sale (sale_management) and studio (web_studio)
- Change the document template (settings > configuration > general
settings) to select the second one
- Go to an order form
- Enable studio, select "Reports" in the right tab
- Edit the "Quotation/Order" report, add a new colomn
- Back to the order form, enable dev mode and add a section to the order
lines.
- Print the report => the section is not using all the available place.

The section/subtotal are using a colspan to use all the place in the
table, this colspan is hardcoded to 5, the number of columns without
customization. Adding a new column doesn't change that value.

The fix has been to force the colspan at 99, the maximum value for
colspans. Using that value will always render the row to fill the table.

opw-1936088

closes odoo/odoo#31951

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2019-03-19 15:28:24 +00:00
Nicolas Lempereur 8003289219 [FIX] mail: activity document name=>updated name
The activities "Document Name" (res_name) are computed and stored by
getting them on original document, so if we change name of original
model => the activity names are not updated.

Thus the document name we see we showing the "Activity" view is the one
that was used when activities were created with an odd heuristic (by
inverse order of activity type and max alphabetical value) and not
translated.

With this changeset we ignore "Document Name" and directly get names of
records when display "Activity" view.

note: the changeset also filter out activities on document we can reads:
this was done when a domain was set but not otherwise so access error
could be easily gotten.

opw-1949437
closes #31850

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-14 15:26:13 +00:00
Nicolas Lempereur de3ff2e533 [FIX] analytic: account search no partner=>work ok
The name_search of account.analytic.account do not find records that
have no partner set.

This is because some ORM search may breaks when it contains a
auto_join relational field. We will try to fix this (at least in master
version).

In this changeset, we avoid the issue by combining 2 searches instead.

opw-1941547
opw-1950010
closes #31881

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-15 15:29:08 +00:00
Lucas Lefèvre 30291091e7 [FIX] hr_payroll: Set benefit type on resource leave
Currently, when creating `resource.calendar.leaves` for a
`hr.leave` it creates one in the employee's calendar and one
in the contract's calendar if it's different.
But if both calendar are the same, it does not associate
the benefit type to the resource leave.

This commit fixes the issue and add unit tests for this use
case.

closes odoo/odoo#31288
2019-02-20 15:18:06 +00:00
Yannick Tivisse 2738341c21 Revert "[ADD] payment_ccavenue: Add new payment acquirer for India"
This reverts commit f735951d5c.

Revert payment acquire due to the fact that the encryption scheme
is broken by design and therefore cannot be trusted.

closes odoo/odoo#31281
2019-02-20 16:16:22 +00:00
Thibault Delavallée 72438ee5dc [FIX] website_slides: fix typo
closes odoo/odoo#31282
2019-02-20 15:10:30 +00:00
Lucas Perais (lpe) ec9fff6530 [FIX] sale, sale_management, website_sale: configurator option modal change variant
Part 1: Backend
Changing an option's variant now change the product name and the image

Part 2: Front end
The behavior is the same as in the backend.

For that part though, there is a huge design problem:
the modal dialog has the class .oe_website_sale, so the widget website_sale
reacts to events triggered in the modal.

It is understandable given the history of the module, but a proper refactoring
that will implement inheriting of business behaviors through OdooClass extension/overrides
is necessary in master

OPW 1938217

closes odoo/odoo#31201

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-02-20 14:50:05 +00:00
Nans Lefebvre 2dbce5e6ff [FIX] hr_holidays: handle all holiday types in onchange
The holiday_type can be 'employee', 'company', 'department' or 'category'.
However in the onchange of holiday_type, for some reason nothing was done
in the case of the 'company' value.

As a result, the default 'employee' would set the employee_id,
but then changing the type to company would not remove the employee_id.
It follows that the lucky employee would get two allocations instead of one.

opw 1938498

closes odoo/odoo#31656

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-07 13:44:45 +00:00
Jeremy Kersten afd2019fd4 [FIX] website_blog: fix align in grid view mode
bug from bs4

opw-31574

closes odoo/odoo#31676

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-07 14:10:20 +00:00
Romain Derie edfa62bbae [FIX] website_sale: remove race condition on variant tour
Before this commit, there was a possible race condition in the
`tour_shop_dynamic_variants` tour. Indeed, the `click add to cart` would be
triggered before the `click on the second variant` RPCs are done.

Trigger on `.oe_price .oe_currency_value:contains("0.00")` was supposed to
check that condition but it was not strong enough.

Then, clicking on add to cart would not call `create_product_variant` as it
would still have the first variant id in the hidden input instead of "0".

closes odoo/odoo#31670

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-07 15:12:43 +00:00
Romain Derie 8c91670a77 [FIX] website_sale: remove useless search condition
Searching on website is enough. Plus, it will avoid bugs if admin
change sale team of the order or the sale team type.

closes odoo/odoo#31669

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-07 15:18:07 +00:00
Christophe Matthieu b1d80841fc [FIX] base: allow to t-raw="0" with empty content
Before this commit, when doing `<t t-raw="0"/>` to print the t-called
content, it was printing "[]" if the content was left empty.

closes odoo/odoo#31668

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-07 15:06:41 +00:00
Gorash 05c095a73b [FIX] website: edition of links on safari and firefox is now possible
closes odoo/odoo#31629

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-03-07 16:03:03 +00:00
Baptiste Vergote f3f8430600 [FIX] base: use correct state name in res.partner import template
State from the template was 'CA' for California - not recognized on import
Changed it to 'California' to match with the db data

opw 1943904

closes odoo/odoo#31556

Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2019-03-07 13:54:17 +00:00
Romain Derie 3f5a6f423d [FIX] website: fix install theme error
Commit 5a81d8883 fixed the COW view deletion on module update but introduced an
error when installing a theme.

Indeed, when installing a theme, the first step is to remove the currently
installed theme from the website (by unlinking its ir.ui.view).

Commit 5a81d8883 introduced the fact that deleting an ir.ui.view during a
module uninstall also search and delete the COW views, calling
`_get_specific_views` (that expects a singleton).

When installing a theme, it calls `_theme_cleanup` which search COW views and
unlink them. If not cow view, unlink is called with an empty record set raising
the singleton error.

closes odoo/odoo#31662

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-07 13:36:10 +00:00
Nans Lefebvre ffbdea57f5 [FIX] sale: correctly propagate contexts
Commit d139e92c62 set the force_send to True
unless there is an explicit mail_notify_force_send set to False in the context.
The _get_eval_context puts mail_notify_force_send to False in the context,
but it might be lost before reaching that method call.

Launch a cron that starts a transaction, see if it goes through,
and rollback if it didn't,
then the mails send inbetween will be sent every time the cron restarts.
E.g. _cron_post_process_after_done.

opw 1921112
opw 1945953

closes odoo/odoo#31605

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-06 12:49:14 +00:00
Swapnesh Shah b8ff6754fb [FIX] purchase_requisition: Use correct UoM field
uom_po_id is the 'Purchase Unit of Measure' and is required so should be used
here.
This way, the onchange matches the behaviour of purchase module or the reset of
the purchase_requisition code

closes odoo/odoo#29717

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-07 08:45:42 +00:00
Martin Geubelle dcf8c67fe3 [FIX] web: hide CopyClipboard widget button when pointless
The widget has been moved in rev. odoo/odoo@15f3bbe but was not very generic.

In particular, there was a traceback when clicking on the button if the field
had no value (the button was displayed for readonly fields in create mode).

The button is now only appended in readonly mode (a `button` inside an `input`
or a `textarea` is not very DOM friendly) if the field has a value.

Task 1941996

closes odoo/odoo#31635

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-06 16:11:33 +00:00
Nicolas Lempereur a3489be331 [FIX] web: have link over whole many2one
The style of a link (color) of a many2one is only applied over the
first line (probably for eg. the partner on an invoice that has the
partner name and on following lines the address).

In some instance this make some sense, but on other (the name of a
product is too long from where it is) it makes no sense and seems buggy.

With this change, we have the link style over the whole link which seems
good enough.

opw-1947113
closes #31568

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-05 12:30:48 +00:00
Romain Derie 5a81d88837 [FIX] website: delete cow view on module update
Before this commit, when a view was removed during a module update (eg: the
record was deleted from the file), its COW views would not be deleted.

This could lead to unwanted behaviors including tracebacks(1).

This commit is somehow related/an extension of b5fe23055d that handle COW view
write during module update and 2e32cc5aa3 that remove COW views during module
uninstall.

task-1931683

Note: Some existing tests had to be run post install

(1) A view doing a t-call is COW'd, then that view and its t-called view are
    removed. If the cow view is not removed, the t-call will crash (see tests
    in this commit for detailed case).

closes odoo/odoo#31295

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-05 11:04:52 +00:00
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