Commit Graph
126133 Commits
Author SHA1 Message Date
Rishabh Jadia ac45703e27 [IMP] purchase: improve the purchase order report.
The purpose of this commit is, remove "our order reference" because it is already in the title, replace purchase order confirmation by purchase order and add the purchase representative.

Task Id #1902886

closes odoo/odoo#31099

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-02-21 09:45:56 +00:00
Antoine Guenet 4339101afe [IMP] web_editor: add tests for deleting all contents of format block
Implementing new behavior on delete all contents of a format block
revealed insufficient testing, which is now covered.

closes odoo/odoo#31277
2019-02-21 09:13:32 +00:00
Antoine Guenet 2a010c38f3 [FIX] web_editor: remove broken and unnecessary test
The next test was identical to the removed one, with the exception that
it inserts a character at the end, which really is the behavior we want
to test. The removed test was broken because it expected the range on
the parent, which is anyway equivalent in this case. This is confirmed
by the fact that inserting a character at either ranges indeed inserts
the character where it is expected to do so.
2019-02-21 09:13:31 +00:00
Antoine Guenet 00a78af98e [FIX] web_editor: stop removing empty block after deleting its contents
Deleting all the contents of a block node replaced it with a blank
paragraph node. To restore v12 behavior, it should only do that when
pressing backspace in an already empty block, which is now what it does.
2019-02-21 09:13:30 +00:00
Lucas Perais (lpe) 84143a34b3 [FIX] hr: tz on user required in view because of resource mixin
In the user preference, change the timezone of the user to blank (False value)
Save

Before this commit, a cryptic error was raised because the field tz in
resource.resource is required
Note that when writing on res.user, we write some fields (including tz)
on hr.employee, which is a resource.mixin, and therefore uses resource.resource

After this commit, we make the field required in the view

OPW 1934462

closes odoo/odoo#31312
2019-02-21 08:33:26 +00:00
Antoine Guenet 8b8d6d0a5b [FIX] web_editor: do nothing on save if no media was selected in modal
When in the media modal, if one selected no media but clicked the "ADD"
button it resulted in an error and a failed RPC instead of simply
closing the modal without doing anything. v12 behavior is now restored.

closes odoo/odoo#31308
2019-02-21 07:32:38 +00:00
Robot Odoo 5cec06b179 [MERGE] website_slides: various fixes for frontend and first design tweaks
Purpose of this merge is to provide several fixes related to new elearning
application. Those are mainly fixes for front-end templates and first
design improvements / fixes.

See sub commits for more details.

Merge linked to task ID 1941250 and PR #31279.

closes odoo/odoo#31306
2019-02-21 08:49:21 +01:00
David Beguin c2629d114b [FIX] website_slides: add various design and UX fixes
- slidesChannelDropdownSort : dropdown items back to visible (was white on white)
- Featured lesson : change icon to bullhorn instead of + icon
- Pass certification fullscreen button : btn primary
- set max height to fullscreen content to 100% minus header
- Fix 'infographic' slide type image view
- change image for 'Furniture Technical Specifications' course
- fix fullscreen presentation mode: The condition to add the iframe that
  contains the presentation of the document was wrong and, so, never met.
  Those conditions are evaluated in javascript and not in python as it's part
  of t-name template linked to a javascript widget.

Commit linked to task ID 1941250 and PR #31279.
2019-02-21 06:57:05 +00:00
David Beguin 9f969fbcb0 [FIX] website_profile: always give access to user to his own profile
The main condition to be able to see a profile is that the user we want to
see the profile is website_published.
But if a new user sign up and wants to access his own profile, he must
get access to his own profile, even if he is (not yet) website_published.

Commit linked to task ID 1941250 and PR #31279.
2019-02-21 06:57:05 +00:00
Aurélien Warnon b612766575 [FIX] website_slides: various fixes related to course page
* remove useless slide management buttons. This commit removes the frontend
   edit/publish/unlink buttons on slide cards (for the 'document' channel view)
   as they were not handled on the backend side.
 * hide slide type filter for documentation channels. The slide type filter
   (including statistics) on the left side of the channel frontend view
   was only handled for channels of type 'documentation'. This commit hides
   the slide type stats/filters if the channel is not of type documentation.
 * display add content/section buttons based on user rights. Fixes two channel
   frontend issues with user rights management:

   * Users that have the right to upload (can_upload field) should have the
    "Add content" button available.
   * The "Add section" button should only be available to website_publisher
     accordingly to ACLs

Commit linked to task ID 1941250 and PR #31279.
2019-02-21 06:57:04 +00:00
Thibault Delavallée 59f439a3f9 [IMP] website_slides: do not display channel information and featured slide if search
Commit linked to task ID 1941250 and PR #31279.
2019-02-21 06:57:04 +00:00
sri-odoo 03a085dff0 [IMP] website_slides: improve homepage navbar design
Force white background + add the default bootstrap shadow. Do not use <h4>
tags to keep the right font-size on mobile. Simplify layout, add a second
navabar to handle content supposed to be moved to the right.

Commit linked to task ID 1941250 and PR #31279.
2019-02-21 06:57:04 +00:00
Thibault DelavalléeandStefano Rigano cb483d2aa6 [IMP] website_slides: fix and improve homepage
Various fixes linked to homepage of courses

 * move channel navigation in its right container, clean its display and
   related templating;
 * display a Completed badge for completed courses;
 * display a cropped image for channel image card in order to avoid blank lines
   around image not having the right aspect ratio;
 * use standard qweb widgets, notably float_time;
 * make header and footer of /slides and /slides/all editable and improve
   their styling;
 * remove old and unused css linked to previous versions of homepage;
 * various small code cleaning;

Commit linked to task ID 1941250 and PR #31279.

Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Stefano Rigano <sri@odoo.com>
2019-02-21 06:57:04 +00:00
Aurélien Warnon da66d49b51 [FIX] website_slides_survey: put the demo certification into a category
This commit puts the certification slide from the demo data into a category
so that it's correctly displayed on the channel frontend view.

Commit linked to task ID 1941250 and PR #31279.
2019-02-21 06:57:03 +00:00
Thibault Delavallée 86226b52d3 [IMP] website_slides_*: update manifests
Commit linked to task ID 1941250 and PR #31279.
2019-02-21 06:57:03 +00:00
keylor2906 faf8c41d80 [FIX] l10n_mx: Fix warnings related to wrong fields names on the creation of tax templates for the mexican coa.
closes odoo/odoo#31296
2019-02-20 20:45:51 +00:00
Arturo Flores 10db0a5052 [CLA] Update Vauxoo's CLA
closes odoo/odoo#31302
2019-02-21 04:03:24 +00:00
Alexandre Saunier e90380e325 [FIX] base_iban: fix acc_number processing
closes odoo/odoo#31293

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-02-20 16:25:36 +00:00
Nans Lefebvre e02a9077b9 [FIX] payment_adyen: convert the paymentAmount respecting the Adyen API
Adyen requires the amount to be multiplied by 10^k,
where k depends on the currency code.
https://docs.adyen.com/developers/development-resources/currency-codes
Provides a map of codes to factors.

Before, k was assumed to be 2 (which is correct in most cases).

opw 1928918

closes odoo/odoo#31984

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-21 07:24:36 +00:00
Nicolas Martinelli 4218f3b5fb [FIX] account: Invoice Analysis
- Go to Accounting > Reports > Invoices
- Go to the pivot view
- Enable 'Total' and 'Untaxed Total' in the measures

The Total is wrong.

`amount_total` is retrieved on the invoice, unlike the subtotal which is
retreved on the invoice line. We apply the same logic than
`residual_company_signed`.

opw-1950663

closes odoo/odoo#31991

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-20 15:11:23 +00:00
Naglis Jonaitis 3aab70c5a6 [FIX] hr_timesheet: don't use dict.fromkeys() with a mutable default value
When used with a mutable default value, `dict.fromkeys()` builds a dict
where each key references the same value:

    >>> r = {}.fromkeys(['foo', 'bar'], {})
    >>> r
    {'foo': {}, 'bar': {}}
    >>> r['foo']['val'] = 1
    >>> r
    {'foo': {'val': 1}, 'bar': {'val': 1}}

Updating one key's value will change the value for all keys.

closes odoo/odoo#31659

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-03-07 10:38:29 +00:00
Dipalee Bhalodia f451f90b9a [FIX] point_of_sale: use IoT Box instead of posbox in pos.config + explain better
TaskId: #1893479

closes odoo/odoo#31747

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-03-11 08:26:29 +00:00
Nans Lefebvre 215c4a6b5d [FIX] base: check that the state matches the country at partner create
Import a list of partners with their addresses.
The state_id field is usually filled with the state codes.
E.g. 'CA' is used for California, but also for Cádiz (Spain), etc.
The import function (db_id_for) uses a name_search on the res.country.state,
and takes the first matching result.
It follows that the state does not necessarily match the country.

Therefore we add a _check_import_consistency in the create.
Here we check that the country matches the state's country,
try to find a correct match, and if we can't we put the state to False.
Note that if the country is not set both fields will end up set to False:
this is because only a state would mean using a code could give an abitrary
country.

opw 1943904

closes odoo/odoo#31599

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-13 14:27:56 +00:00
Lucas LefevreandIldar Nasyrov 4b8e0d82bb [FIX] web: backport of 70c6d3b04c to 12.0
make sidebar filter generic

Adding `res_model` and `res_fields` attributes on a field of
a calendar view adds a filter in the sidebar.
It saves the result as the defined model and should save it
in the defined field.
However `partner_id` has been hardcoded in the rpc call that creates
the record. This breaks genericity, it cannot be used with another
field than `partner_id`.

This commit makes this generic by correctly setting the field name
in the rpc call.

closes odoo/odoo#31858

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>


Co-authored-by: Ildar Nasyrov <iledarn@gmail.com>
2019-03-15 13:28:12 +00:00
iledarn 7a7dbf97c6 [CLA] signature for Iledarn 2019-03-15 13:26:27 +00:00
Nicolas Lempereur f96791051d [FIX] stock: lot action => str to prevent traceback
In a report a lot could be opened with an action that was a number
instead of expected string or falsy value.

In web and web_studio, we sometime expect the action name to be a string
or falsy (calls to `bc.title.trim()` in breadcrumbs code).

opw-1951174
closes #31816

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-13 12:52:16 +00:00
Nicolas Martinelli 1d96787929 [FIX] purchase_requisition: PO date
When creating a new PO from a purchase requisition, the order date of
the PO is the last date of the contract. There is no reason for this,
and althoguh the date can be manually changed, it is error-prone.

opw-1937141

closes odoo/odoo#31969

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-20 10:04:57 +00:00
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