Commit Graph
133232 Commits
Author SHA1 Message Date
Adrian Torres be01db2f71 [IMP] api: move cache_key to the Environment and cache it
Computing the `cache_key` turned out to be a big factor during the
lifespan of a `BaseModel.mapped` call and a lot of this time is spent
computing the same `cache_key` over and over.

These unnecessary computations can be easily reduced to a couple by
moving the `cache_key` method on the environment (instead of the field)
and by implementing a memo for that method.  The rationale is that the
`cache_key` of a field does not change for a given environment.

The result of this patch is up to 50% faster `Field.__get__` which in
turn means a GLOBAL gain in performance, especially for methods /
functions that rely heavily on `__get__` such as `BaseModel.mapped`.

closes odoo/odoo#42674

Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2020-01-21 08:28:36 +00:00
Adrian Torres 8645e31863 [FIX] website_sale: do not pollute the environment
Instead of polluting an existing environment, use the method that was
intended for changing the company `with_company` which returns a brand
new environment and leaves the existing one unchanged.
2020-01-21 08:28:36 +00:00
Yoshi Tashiro 6157934245 [IMP] l10n_jp: covering new tax 10% from Oct 2019
A new tax of 10% has been introduced in October 2019 in Japan.
Add this tax and relative tax group, fiscal position, etc.

Conserve the 8% tax as some sale could use it as a reduced tax rate.

closes odoo/odoo#42538

closes odoo/odoo#42629

X-original-commit: 18925d7fcadac7f30f29d46f7c45e87b083e9e5e
Original-signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-01-20 17:00:11 +00:00
Goffin Simon 632767d83e [FIX] delivery: Delivery Order Adding Freight Cost W/O Markup
Steps to reproduce the bug:

- Let's consider a delivery method DM with fixed price of 10€ and a margin of 20%
- Let's consider a storable product P
- Create a SO for P and get the rate (12€) but don't add it on the SO
- Confirm the SO and process the delivery

Bug:

A SO line was created for the freight cost without the margin. So it was 10€
instead of 12€.

opw:2144894

closes odoo/odoo#43279

X-original-commit: 621dac802ddddc3a4dd58f7370250386e1031598
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-01-14 12:43:14 +00:00
István Csányi 0665cebe73 [FIX] mrp: incorrect outgoing qty
- Create a new Product
- Add a BOM to this product
- Set the BOM to be a kit
- Add components to the BOM
- Create a PO for the components for a qty of 5
- Confirm the PO but don't transfer the products
- Check the phantom kits outgoing_qty and incoming_qty they will match

A Phantom Kit Products outgoing_qty and incoming_qty are identical

Closes #43447

closes odoo/odoo#43584

X-original-commit: 4b2e235be6cab947ce2e0b3b17b54530f984ce72
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-20 15:00:10 +00:00
István Csányi e290a11390 [CLA] signature for fortee
X-original-commit: b3f2659564d5e3db1d1f3feeb29f6d464776b6e1
2020-01-20 15:00:09 +00:00
Nicolas Lempereur 74be8c0f76 [FIX] point_of_sale: 0 => +/- => backspace => 0 and not -
When writting number on the point of sale keypad, if you click on the
"+/-" button, you will get 0 (with buffer "-0"), but then you need to
backspace 2 times to remove "-".

This seems odd since this mean that:

=> "+/-" "backspace" "backspace" "5" will get 5.0 units
=> "+/-" "backspace" "backspace" "backspace" will remove line

instead of what would be expected:

=> "+/-" "backspace" "5" will get 5.0 units
=> "+/-" "backspace" "backspace" will remove the line

opw-2169157
closes #43495

closes odoo/odoo#43507

X-original-commit: d3489146e9e1e20903bf8775527cb8b32a2ba383
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-01-17 16:15:33 +00:00
Jeremy Kersten 5198b209f5 [IMP] base: improve log for wrong xpath
Before create_multi, in case of invalid syntax used in an XPath, only
the problematic record was displayed. It was not ideal for long
definition but still usable.
Since the views are created using create_multi, the whole file content
is displayed in the error traceback, making it almost impossible to
locate on files with multiple records.

closes odoo/odoo#43590

X-original-commit: 8622469e1fdd4789cc45ed52093d0f329abca14e
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-01-20 16:31:09 +00:00
qsm-odoo 54a95099bf [REF] web: remove custom frontend code since done by crashmanager
The handling of unhandledrejection in the frontend was done with
dedicated code since the crashmanager was not in the frontend. This is
the case now so that dedicated code became useless.

closes odoo/odoo#42927

Signed-off-by: fja-odoo <fja-odoo@users.noreply.github.com>
2020-01-08 11:41:33 +00:00
Rémy Voet (ryv) d165a8ce13 [IMP] mrp: remove groups of post inventory button
Show the Post Inventory button to manufacturing users,
also if they are not in debug mode.

task-1887035

closes odoo/odoo#43294

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-01-20 14:01:21 +00:00
Simon Lejeune b9334c53b8 [REF] stock: move line: some guidelines
- move all the constrains at the same place, make sure they are private
- move all the onchanges at the same place, make sure they are private
- move `_get_similar_move_lines` helper at the bottom of the file with
  the other helpers
2020-01-20 14:01:21 +00:00
Rémy Voet (ryv) 177a479cf6 [REF] stock: clean imports
Clean imports of the main stock module:
- Remove unsued import
- Follow odoo guidelines
- Sort them
2020-01-20 13:58:52 +00:00
Rémy Voet (ryv) 53ebf7491e [REM] stock: remove dead-code
Remove dead code of the main stock module:
 - Unused actions
 - Unused private methods
 - Unused helper methods test
2020-01-20 08:57:36 +00:00
Raphael Collet 238e7436ed [FIX] expression: performance of search on one2many fields
We optimize the search on domains like `[('line_ids', 'in', ids)]`.
The condition is rewritten `('id', 'in', ids1)` where `ids1` is the
result of

    SELECT <many2one_field> FROM <comodel_table> WHERE id IN <ids>

The issue is that the latter potentially returns many duplicate values.
The fix consists in having as few duplicates as possible in `ids1`.

Note that domains like `[('line_ids.foo', '=', 42)]` implicitly benefit
from the optimization, as they are rewritten as the one above with

    ids = comodel.search([('foo', '=', 42)]).ids

closes odoo/odoo#43574

X-original-commit: a13c05fa5df9c98504e8e1cdb09d8d4a8d13ea91
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-01-20 13:43:29 +00:00
Antoine Prieels 029ee8dc0d [FIX] point_of_sale: Lost payment info
Payment information for terminal transactions (payment_status,
transaction_id & card_type) was lost when going back to the floor
plan in pos_restaurant. Validated transactions were then considered as
not processed yet.

closes odoo/odoo#43550

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-01-20 14:06:13 +00:00
Sébastien Theys 7588e3a20e [FIX] mail: reintroduce fatype for message status "envelope"
This was incorrectly reverted during 116057b26e71db4692280463669f3e80d813ddcc

closes odoo/odoo#43564

X-original-commit: 73e3afca18fae954552d8cbecb6afddf1b08539b
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-01-20 12:47:38 +00:00
Andrea Grazioso (agr-odoo) a1c522128a [FIX] account: avoid base being included twice in group
Create multiple tax and assign them to the same tax group.
Create an invoice, with two lines, each one with one tax of the group.
Save and click on "Preview" or print invoice.

The tax group will be reported applied on just the first line
This append because of 4d62a94a31c3967bfd34396a3448a3e925422634.
Reverting commit to restore the former behavior in which the tax base
amount is added for every line in which the tax group component is
found. While this other behavior could be an issue for some user the
behavior is more consistent accounting-wise and the template could easily
be changed to adapt to user needs.

opw-2170069

closes odoo/odoo#43553

X-original-commit: 43de214bf2d0da20b7609e392d800b49465b483d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-20 11:09:04 +00:00
Damien Bouvy 4c427de6a3 [FIX] product: incorrect super call
Unfortunately caught in a really wide try/except clause where it was
completely silenced, causing a lot of stuff to be archived instead of
deleted.

closes odoo/odoo#43543

X-original-commit: cfa2993615150416b801ce942f18339065678648
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-01-20 09:56:29 +00:00
qsm-odoo e927d1e89b [REF] web_editor: review left-panel unknown dependency behavior
Left panel widgets can define the widgets they depend on to be visible.
Up to now, if such a dependency was defined but that the related widget
was not found, the dependency was considered as not met. Now, it acts
as if that particular dependency was not defined at all.

This is useful for controlling the visibility of a generic option in the
case of a specific snippet without having to duplicate and restrict that
generic option.

E.g. There is a generic "color" option on all snippets. For my snippet
"hello" I only want that generic "color" option to be visible if my
"world" option is enabled. I then add `data-dependencies="world"` on the
generic "color" option. In the case, any other snippet than "hello" is
used, since the "world" option does not exist there, the "color" option
acts as if it had no dependency.

closes odoo/odoo#43511

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-01-20 09:50:16 +00:00
Andrea Grazioso (agr-odoo) 41be5fbcae [FIX] point_of_sale: list price display after tax mapping
- In general settings:
    - Sales:
        - Activate discount
        - Activate Multiple Sale Prices with option computed from formula
    - Point of sale:
        - Activate Multiple Sale Prices with option computed from formula
    - Accounting:
        - Set show price tax-included
- Modify the Public Pricelist: Set to Global, price discount 50%
- Modify the sale tax to be included in price
- Create a 0% tax included in price
- Open fiscal position: Set auto-detect, replace sale 15% by 0%
- Open a product and set customer tax to sale 15%
- Open POS session configuration
    - Set fiscal position, tax included in price and public pricelist
- Add product "Pedal Bin"

You will see in strikethough text the original selling price with tax included,
while taxes should have been removed from the tax mapping.
Note that this is purely aesthetical, the total amount calculated is correct.
Fixing by calculating the price from the original selling price.

opw-2155779

closes odoo/odoo#43284

X-original-commit: 7de221c04133d37c23783fd6232eb23fd91cefe7
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-01-14 13:18:56 +00:00
Andrea Grazioso (agr-odoo) d8047201ce [FIX] calendar: avoid creation of the document on invitation
Install Projects, documents, calendar, website, crm.
Under Settings enable "File Centralization"
Now go to Projects, enter in a Task, click on "schedule activity".
On the activity form under "Activity Type" choose Meeting, click on
"Open Calendar" button.
Choose a slot, edit the event, add a contact type individual, save
Error will popup.

This is caused by the whole flow of creating a new document for the
invitation.ics generated for the meetings which has to be sent via email
but get detected as an attachment to be sent into the document app as
well.

Disabling the document creation since it is not a relevant attachment

opw-2150770

closes odoo/odoo#43537

X-original-commit: 4e30db33938d4d740d847cfbc6a29b4013be964d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-20 09:18:59 +00:00
Nicolas Martinelli fbb73734f9 [FIX] analytic: partner without name
Do not crash if the commercial partner doesn't have a name.

opw-2158809

closes odoo/odoo#43533

X-original-commit: 90b55325894a248b0386d2f8c4b8568d278963f9
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-20 08:46:04 +00:00
Arnold Moyaux 87fde093d6 [IMP] mrp_subcontracting: filter on partner and product
Allow to easily find product and partners related to subcontracting

closes odoo/odoo#43046

Task: 2158126
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-01-20 08:53:14 +00:00
Nicolas Martinelli f211eaafcb [FIX] hr_holidays: allocation multi-company
As Mitchell Admin:
- Install Leaves
- General Settings > Multi Company
- Create companies A (YourCompany) and B
- Mitchell Admin should be an employee of A, not B
- Switch to company B
- Go to Leaves > Managers > All > Allocations

An AccessError is raised in `_compute_number_of_hours_display` because
we try to access `employee_id.resource_calendar_id.hours_per_day`.

After this AccessError is solved, several others are raised when
accessing a record. They are solved in this commit.

opw-2160542

closes odoo/odoo#43529

X-original-commit: 97085bf16e009ea563719385c8c7073436a1aa7e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-20 08:09:08 +00:00
Jason Van Malder c6dff46203 [FIX] account_facturx: fix too much restrictive XML bill upload
Issue

    - Install Accounting
    - Upload XML bill (tried with a MX one)

    No decoder was found.

Cause

    The _create_invoice_from_xml method gets decoders from overrides of
    _get_xml_decoders. There is only 2 overrides: Belgium & Italy.

    All others countries are not handled. So, this error blocks
    the user.

Solution

    Log the error instead raising it. (Reproduce V12 behavior)

OPW-2170516

closes odoo/odoo#43503

X-original-commit: 592d2a296e4aa6a0c96bb1e56119965cd066ea0f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-17 15:38:11 +00:00
Odoo's Mergebot 7253c33956 [MERGE][IMP] survey: redesign frontend views
PURPOSE
=========

In 3 words, make survey beautiful.

SPECIFICATIONS
==============

- Center the question in Question per page mode
- When last question or page of the survey, Continue becomes Finish
- Add Press key capabilities to speed up the survey completion
    - ENTER : go to next question (or next page)
    - A to Z : to select answers in choice and matrix question type
      (only in question per page mode to avoid mismatch and complexity with multiple questions
- New layout for single / multiple choice
    - Custom radio buttons and checkboxes. Unified style for both except we keep circle icon for
      simple choice and square icon for multiple choice.
- Add a progress bar (2 modes : % and number)
- Add Background image
- Re-do quiz correction mode that were removed from controller during survey refactoring.
- Review breadcrumb style (make it more integrated to the new design)

See sub commits for more details.

LINKS
=====

Follow the survey refactoring done in #42908.
Task ID: '2150291'

closes odoo/odoo#43237

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-17 17:24:12 +01:00
David Beguin aedeccbeea [IMP] survey : redesign frontend layout
In this commit, all the questions type have been redesigned to look more fancy.
(impacted question types : radio and checkboxes, text boxes (textarea and text
inputs, date and datetime inputs and matrix)

For radio and checkboxes, both design have been aligned to work the same way
(except checkboxes can still have more than one selected option).
Selection by key have been applied on those two question types if the number of
option is under 26 (to use all the alphabeat character for selection). This
selection by key is only available on page per question layout.

Tests have been adapted accordingly to the redesign (typically for choice and
matrix inputs)

* Progress Bar

This commit adds a progress bar to the survey to inform the user
where he is in the survey filling process.

There are two progress modes:
    - Number : will display the number of the current page on the total number
    of pages (or questions if layout mode is question_per_page)
    - Percentage : will display the percentage of page or question already done

So this leads to, on last page:
    - in Number mode :
    the progress bar div is 100% filled         3 / 3 pages   [===]
    - in percentage mode :
    the progress bar is aligned to percentage   66% completed [== ]

* Print Widget

A widget is added for survey print mode in order to resize all textarea to fit
their content, instead of showing a scroll bar. This can be usefull if user
wants to print the results. He will get the entire content of the 'textarea
answers' instead of only the two first lines.

* Misc

This commit also :
    - adds background image to survey.
    - redo quizz correction and add some data to illustrate non scored
    questions rendering in print template
    - review breadcrumb style

Note : readonly data option on survey form widget is not set anywhere yet but
the usage is done in prevention of the future work on presenter view for survey
session mode.

Task ID: '2150291'
PR #43237
2020-01-17 16:04:17 +00:00
David Beguin 860768b79b [IMP] portal, web: move wrapwrap flex style rules from portal to web
This commit moves the flex rules of #wrapwrap div to web so it can be used in
survey.

This is needed to make the survey footer stick to the bottom of the screen
even if main has not enough content to fill the page.

This commit prepares survey redesign.

Task ID: '2150291'
PR #43237
2020-01-17 14:54:58 +00:00
David Beguin 307f51ab85 [IMP] web: split _content_image with get response sub method
This commit splits the _content_image method to allow to call the
get response part individually.

This is needed because _content_image call binary_content using current user
access. But in some cases, we need to render a binary content even if the user
does not have access to the target model (typically for public users).

The binary_content is gotten in sudo mode where needed and the result can be
given to the _content_image_get_response.

This will avoid code duplication where the sudo use case is met.

Usage :
This commit prepare the redesign of survey. This _content_image_get_response
method will be called to grant access of background image even for public
users. Other modules will use this new method like elearning (website_slides)
to display karma ranking, etc.

Task ID: '2150291'
PR #43237
2020-01-17 10:25:20 +00:00
Kaushalya Mandaliya ded9d60986 [IMP] website_form: add info on email_cc field
In a website form, when "Email cc" field is added,
an i icon will be displayed besides the field label to
guide user about multiple email addresses support.

task-2074045
closes odoo/odoo#37116

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-17 13:44:39 +00:00
Robin Heinz 2c76d365e4 [IMP] point_of_sale: prevent use of the cash control without profit and loss account
Prevent the use of the point of sale when the cash control is used and there is no
profit and loss account on cash jornals linked to payment method.

closes odoo/odoo#43493

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-01-17 14:01:13 +00:00
Raphael Collet cdc4547168 [FIX] models: duplicates in records to prefetch
Fix the prefetching mechanism to never consider a recordset with
duplicates.

closes odoo/odoo#43426

X-original-commit: c312e1e5e5e23d1d8dc172aa6e5f8f07f5638792
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-01-16 15:11:58 +00:00
Raphael Collet a8ea77a771 [FIX] base: browse(record) in company-dependent field value
The faulty code modifies a dictionary in-place to apply a formatting
function to each value.  In this case, the formatting is `browse`, and
the issue occurs when `ids` contain duplicates:

    for id in ids:
        result[id] = format(result.get(id, default))

Fix it by returning a new dictionary based on `result`.

X-original-commit: bd4565e227c7196604af9c5c51ce136a2beac088
2020-01-16 15:11:57 +00:00
oco-odoo 170eaa4743 [IMP] account: add wizard to perform transfers between accounts
This wizard also reconciles automatically entries done on reconcilable accounts. It can hence for example be used to "move" the balance of a receivable account into a payable account (or the opposite), using the generated transfer entry to do as if the receivable and payable accounts were directly reconciled together.

[IMP] account: display 'P' as matching number when account.move.line objects are partially reconciled

For this, we introduce a new matching_number field, used in account.move.line's tree views instead of full_reconcile_id, which used to be shown directly.

Was task: 2037318

closes odoo/odoo#39415

Related: odoo/enterprise#6544
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-01-17 13:34:15 +00:00
Jeremy Kersten a62abf22d0 [FIX] website_forum: test - wait modal shown
Wait that modal animation is finished before to close it.

closes odoo/odoo#43487

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-01-17 12:45:23 +00:00
Jason Van Malder 071e03f178 [FIX] mail: handle server error in the front-end part
Issue

    - Install Time Off
    - Marc Demo > Create leave request
    - Admin > Validate the leave request
    - Marc Demo > Add an attachment

    Nothing happens

Cause

    There is a access right issue that is not handled in the
    JS.

Solution

    Handle it by doing a do_warn.

OPW-2171791

closes odoo/odoo#43484

X-original-commit: 6a98c75ebfca694e1e68fa09eca95e47472bed92
Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>
2020-01-17 12:37:47 +00:00
Sébastien Theys 69f0f765bd [FIX] product: flush before invalidate in write override
Since [1] `computer_hdd_attribute_lines` is archived instead of unlinked in
`TestSaleProductAttributeValueConfig` which leads to indeterminism in tests due
to the missing `flush`.

Indeed `flush` is necessary before `invalidate_cache` since [2] if the data
that are pending being written must be saved to the database before the cache
invalidation.

[1] which highlighted the issue was merged after v13.0, but it still makes sense
to merge the current fix in the earliest version possible.

[1] 5361706e5e
[2] 9920f20e4c

closes odoo/odoo#43483

X-original-commit: f721bfe2860293d1456770d57be7805920929ca0
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-01-17 12:37:24 +00:00
Christopher Ormaza 51de5eb041 [FIX] core: disable wait_callback during copy_from
Apparently some solutions (e.g. bitnami) deploy odoo using async
workers, and not all pg/psycopg2 features are supported in that mode,
notably COPY FROM (bulk-copying data from a stream to postgres). Work
around this issue by disabling "async mode" as we do the copy (by
resetting the wait callback) then re-enabling it.

While this is not an officially supported run mode, it should Do No
Harm™ for normal operations and could help users and clients.

Of important note: while this fixes an error running in async mode, it
will also prevent the worker from yielding while copy_from is
executing. Hopefully that doesn't take too long (as the entire point
of the copy_from is to be fast) but there you are.

Fixes odoo/odoo#24145

closes odoo/odoo#43481

X-original-commit: c4583cf89c2b24085a2eeafea5ef76f474c5ff84
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-01-17 12:20:03 +00:00
Robin Heinz 0871ed02ab [FIX] l10n_fr_pos_certif: fix post push order when not french.
When the french certification is installed for the pos, there is an error when we use it in a company that is not french.
The format of the values sent was not identical to the format of the values expected.
Now the order and the server_id are sent separetly to match the parent function.

closes odoo/odoo#43476

X-original-commit: 657133a22df2208c9bc429257a3fe2c0344872e5
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-01-17 12:00:08 +00:00
Nicolas Martinelli 990a299b3a [FIX] account: purchase receipt with included tax
- Create a 10 % purchase tax with price included
- Create a Purchase Receipt with a price unit of 100 and the 10 % tax

The total is 90.91 + 8.26 = 99.17.

The root cause of the issue is that... actually I have no idea. For some
mysterious reasons, in case of an `in_invoice`, `in_refund` and
`in_receipt`, we go through `_compute_base_line_taxes` when the price is
changed. In case of the `in_receipt`, we compute the tax based on the
`balance` (= 90.91) rather than the price unit, which screws things up.

Note that in case of `out_*` moves, we simply don't go through
`_compute_base_line_taxes` at all, so Sales Receipts are fine.

opw-2170975

closes odoo/odoo#43475

X-original-commit: 1bbf66937c2b4fdb45318652e3ed1147f1edd29b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-17 11:58:45 +00:00
oco-odoo a1c175bae7 [FIX] l10n_ch: fix bad field renaming in QR code generation
Originally introduced by https://github.com/odoo/odoo/commit/f3c1e6cfbe70f9dd37cc7c7b3b3464c5b9af280b

closes odoo/odoo#43474

X-original-commit: 3c85bed2f7680336d52821ce0d8bc241347c56c5
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-01-17 11:58:24 +00:00
Tiffany Chang (tic) 830395e49a [IMP] website_slides,portal_rating: update UX
Minor updates to improve user useability of website_slides primarily with
clearer wording and more intuitive displays/display interactions. Primary
purpose is for onboarding wow.

Related to:

closes odoo/odoo#42030

Task: 2070662
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-16 09:11:27 +00:00
Elmeri Niemelä 6c634c7890 [IMP] account: ability to localize the conditions for automatically generated invoice references
closes odoo/odoo#35369

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-01-17 10:53:34 +00:00
Thanh Dodeur e2a8ee3aa1 [FIX] mail: restores the documentViewer modal
Revision on
https://github.com/odoo/odoo/commit/34bbdd88c0bc354b76b254bb78c4eb786f3d08c0#diff-9da02f8f30ea349fbc4b9884c2b77b78

The document viewer did not work properly because, by default, dialogs are non-active,
so most interactions were not possible (just pressing ESC to close the dialog worked).

The correct fix consists of using OwlDialog for DocumentViewer,
but that's basically close to a re-writing, so in the meantime marking it as always active is fine.

closes odoo/odoo#43446

Task: 2177011
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-01-17 10:11:27 +00:00
Mitali Patel 2d2b65ae8a [IMP] mail: do not send email on join/leave mailing channel
Before this commit, when a user joined, left, or was invited to a
channel with "Send by email", it sent an email notification to every
member.

This commit disables email notification on subscribe/unsubscribe on
a channel, while still showing messages on join/leave.

Task-Id 2003281

closes odoo/odoo#35142

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-01-17 10:29:08 +00:00
Priyanka Kakadiya 0b11ed87b6 [IMP] mail: keep old subtype subscription on change on parent record
With this commit, when changing subtype subscription from a parent
record (e.g. project of task), then it does not update subtype
subscription of existing records. Changes on parent record should
only affect new record afterwards.

Task-Id 1974055

Closes #34150

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-01-17 10:05:08 +00:00
Priyanka Kakadiya 16dd3da7a9 [IMP] mail: auto follow subtypes based parent record at creation
With this commit, when the user subscribes to internal subtypes
(i.e. activities and notes) on a parent record (e.g. project of
tasks), then the user follows them by default on every record
creation (e.g. all new tasks of this project).

Task-Id 1974055

Closes #34150
2020-01-17 10:04:54 +00:00
Jason Van Malder 6afb7074e4 [FIX] sale: fix ecommerce quantity width
Issue

    - Install eCommerce, use Graphene
    - Shop > Any product

    The add to cart button is shifted.

Cause

    Quantity field take full-width & max-width is too large.

Solution

    Remove width: 100% and reduce the max-width.
    Screenshots on OPW

OPW-2166060

closes odoo/odoo#43459

X-original-commit: 48ce80f0678510b9a5ccc2da19b51b5c39c410b0
Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>
2020-01-17 10:10:04 +00:00
Nicolas Martinelli e3f1802d4c [FIX] account: account with single character code
The creation of an account with a single character code crashes.

opw-2176764

closes odoo/odoo#43455

X-original-commit: 7b1e881e60d6424f7b3a676c06a4b5b8a222d025
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-17 09:07:04 +00:00
Prakash Prajapati 4bb5ba65a6 [IMP] account: Rename customer/vendor filters on a partner
PURPOSE
=======

When the customer and supplier boolean fields were dropped
from res.partner in 13.0, the 'customers' and 'vendors' filters
were removed as well.

Two new 'customers' and 'vendors' filters have since been added
in the account module.

They might look identical to the former ones at first, but those
are instead based on two brand new 'rank' integer fields:
customer_rank and supplier_rank.

Those fields start off at zero and are increased by one each
time an in_invoice/out_invoice line is posted for the res.partner.

This means that, to be considered as a customer, a res.partner
has to have at least one invoice line posted.

This has stem confusion in both former and new users of Odoo:
- users do not have a clear idea of how this filter actually
  works. (I personally had to go through xml and python code to
  understand how to turn a res.partner into a 'customer')
- to the users that were used to the 'customer/supplier' boolean
  fields, it simply looks like the old filters stayed while the
  boolean fields were removed
- one of the reason why we got rid of the 'is a customer' field,
  is that there is no unanimous definition of what a customer
  actually is
    - is it when the lead is won? when the quotation is
      created/sent/confirmed? when the invoice is
      created/sent/confirmed?
    - here, we decided that is it when the invoice is posted,
      but whether the user agrees or not with this definition,
      there is no way for him to know this is where we decided
      to draw the line

A simple way to clarify all this is to rename the 'Customers' and
'Vendors' filters to make it obvious that they are based on the
customer invoices and vendor bills.

closes odoo/odoo#43349

Taskid: 2166410
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-17 08:51:49 +00:00