Commit Graph
133206 Commits
Author SHA1 Message Date
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
oco-odoo 8e4158af81 [IMP] account: add 'partial' and 'reversed' payment states to invoices
- 'partial' payment state corresponds to invoices whose payable/receivable move line has been partially reconciled with some other line.

- 'reversed' payment state corresponds to entries that have been cancelled by the creation of a single reverse entry (using the dedicated button on the form view). This state can be set on invoice as well as on regular entries.

=> To stay consistent with the naming conventions, this commit also renames invoice_payment_state field to payment_state, since it's no longer only applicable on invoices.

closes odoo/odoo#41723

Related: odoo/enterprise#7202
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-01-16 18:04:26 +00:00
Pierre Masereel 1a7c21328f [FIX] delivery: return label compute field incomplete
Since new ORM in Odoo, the compute methods should always return values.

In the case of return label in delivery, nothing was returned when there
was no carrier on picking.

So we are now setting the field to False when there are no carrier on
picking.

ISSUE-43270

closes odoo/odoo#43452

X-original-commit: 9bf52959a5afad01970f1ef39a64d6b3694abcc8
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-01-17 08:36:08 +00:00
Nicolas Martinelli 33bb316577 [FIX] account_analytic_default_purchase: access error
- Activate Analytic Accounting
- Set the demo user with only the Purchase User access rights (no
  accounting access rights)
- Create a PO with demo

An AccessError is raised because the user has no access to
`account.analytic.default`.

We can use `sudo` to retrieve the default account. There is no access
rights error on `account_analytic_id` or `analytic_tag_ids` later on.

Fix the `company_id` at the same time.

opw-2171813

closes odoo/odoo#43431

X-original-commit: ef5cc35b50e54ea3d161897bbb089dedb68e36a1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-16 15:51:15 +00:00
Nicolas Martinelli 206b197cc9 [FIX] website_form: remove evaluated domains
- Install helpdesk_stock
- Publish the team Customer Care on the website
- Edit the ticket submission form
- Add the field 'Lot/Serial Number'

A crash occurs because of a malformed domain.

It happens because the domain is a string, and therefore should be
evaluated.

We remove the string domains since it won't be possible to evaluated
them in the website form anyway.

opw-2176144

closes odoo/odoo#43427

X-original-commit: abc85e176e337f61926d92cdf33680037af1dd96
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-16 15:12:21 +00:00
Jorge Pinna Puissant 6977f85d2f [FIX] website_sale_digital: limit attachment search
Before this commit, in a sales order preview, a search is performed to
search all the attachments in invoiced products or free products.

Now, the search is only performed if the product is a digital product.

opw-2172563

closes odoo/odoo#43434

X-original-commit: 2c9e7832a02d2e4e2f219e979dd8ae3cbaa77bd9
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-01-16 16:15:08 +00:00
alt-odoo 0bea630c98 [FIX] website_sale_digital: access rights error in preview order page
In preview order page, we are looking for product attachments, but if we are
using public user, we get an access rights error leading to a 403 page.

opw-2172563

X-original-commit: d07800eadf49e75c249f9a28aca2412b6b106793
2020-01-16 16:15:07 +00:00
Jorge Pinna Puissant dd9f893d67 [FIX] website_sale_digital: search domain for attachment count
Before this commit, the search domain returns no results.

Fine-tuning of 62c9dedafd

opw-2172563

X-original-commit: f3d178c329eeb4d840c24801247fc5da39df998c
2020-01-16 16:15:07 +00:00
Simon Lejeune 50cbaef2dd [REF] stock_landed_costs: domain on transfers
The previous domain was too naive: a receipt is not always valued
(inter-warehouse transfer) and even a receipt that should be valued
isn't always (receive goods you do not own, change your config from
manual to automated and then apply the lc on an old receipt, etc.)

Enforce a domain making sure the transfer is valued.

related opw-2165697
task-2169844

closes odoo/odoo#43410

X-original-commit: c6aa61b22a18c3f110baa7ed3c97e275b21e5329
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-01-16 12:07:42 +00:00
fja-odooandqsm-odoo 218e1cad61 [IMP] web_editor, *: allow saving of snippets
* website, mass_mailing, website_event, website_form,
  website_mass_mailing, website_sale

Now the user can save snippets to use them on other pages.

task-2120409

closes odoo/odoo#40408

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-01-16 14:29:04 +00:00
Sapan Zaveri 4946739c17 [IMP] base_import: improve preview table UI
Task 1919628

closes odoo/odoo#30430

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-01-16 13:38:02 +00:00
Goffin Simon 4734315aad [FIX] product: Searching prodcut on internal ref when archived
Steps to reproduce the bug:

- Let's consider a product template P with an internal reference = I
- Archive P
- In the list view of product template select the Archived filter and
search for I with the Product filter

Bug:

P was not found.

opw:2169441

closes odoo/odoo#43414

X-original-commit: 051e8581ba05ed0e5762b6e7e18a78179822146d
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-01-16 12:52:32 +00:00
fja-odoo a8d1a9a782 [IMP] web_tour: add new "text_blur" action for tours' run method
The 'text' helper does not focus out of the inputs after adding the
text. The new 'text_blur' one will.

It will be needed for future tasks of the website editor since the
inputs in the left panel are only considered on blur or on ENTER.
See https://github.com/odoo/odoo/pull/42189 for example.

closes odoo/odoo#43337

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-01-15 12:17:04 +00:00
Yannick Tivisse daaf5f00d2 [FIX] sale_timesheet: Ignore cancelled invoices to compute qty_to_invoice
closes odoo/odoo#43359

Related: odoo/enterprise#7747
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-15 15:36:21 +00:00
Yannick Tivisse 0392e4e62d [FIX] sale_project: Link generated task to SO 2020-01-15 15:36:21 +00:00
jbm-odoo 79cdcd13c8 [IMP] sale_timesheet: Move not invoiced time sheet to new SOL
Description of the issue/feature this PR addresses:
There is no easy way to re-assign the time sheets to the correct SOL (changing
the task's SOL does not change the non-invoiced time sheets automatically)

Current behavior before PR:
On a project, if a user put a wrong sale order line, and after that he changes
this SOL, the timesheet line will not be moved.

Desired behavior after PR is merged:
On a project, if a user put a wrong sale order line, and after that he change
this SOL, all non invoiced timesheet line will be moved to new line.

TaskId: 2144703
2020-01-15 15:36:21 +00:00
Odoo's Mergebot 5f65d9c9fc [FW][MERGE] project, hr_expense: Fix several multi-company issues + tests
Purpose
=======

Fix multi-company access issues following the big changes that happened
(the 13.0). Make the usability better in order to avoid potential
multi-company issues for the user.

Specification
=============

Check the related commits to see the different fixes that have been
made. For more information about the technical/functional considerations,
check the related task.

closes odoo/odoo#43321

Taskid: 2088891
Forward-port-of: odoo/odoo#43230
Forward-port-of: odoo/odoo#42418
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-16 14:20:37 +01:00
Nicolas Martinelli 4775192027 [FIX] mrp: UOM on unbuild order
Keep the same UOM than the MO.

opw-2169377

closes odoo/odoo#43407

X-original-commit: 942154b3140cb3fc92e8aeff0241149e701581a7
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-16 11:48:22 +00:00
Barad Mahendra d16aa4cd39 [IMP] (hr, sale)_timesheet, pad(_project): improve project general UX
Purpose fo the task is to improve the UX of timesheet, project and task.

Done the chages for below point:
  - improve the stage demo data to unified the project stage
  - on the task timesheet 'sub-tasks hours spent' should be clickable
and on click, it will display the list of subtask timesheet.
  - display in warning tasks for which Remaining Hours < 0 if Planned Hours > 0 in task list view
  - improve the settings of collabrative pad and planning and project form view

Task-2129052

closes odoo/odoo#41092

Closes: #41092
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-16 10:56:05 +00:00
Benjamin Vray de4d7e14f8 [IMP] website: review snippet rating
Adding more control on the rating snippet. Choose the color, select
other icons in media dialog, no limit to add active or inactive icons,
display the rating inline or below the title.

task-2146209

closes odoo/odoo#41169

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-01-16 10:37:35 +00:00
fja-odoo 47441a9228 [FIX] web_editor: save all child text nodes of oe_structure elements
When saving the content of an oe_structure, the starting text nodes
were lost because only the internal *elements* were considered. Ending
text nodes were kept since they are considered as the last element's
tail by the etree library.

task-2040764

closes odoo/odoo#43375

X-original-commit: eb71d25ce965ecdb20c26517627aed5b43f8b990
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-01-15 17:46:02 +00:00
Goffin Simon d595337889 [FIX] point_of_sale: Print invoice in POS
Steps to reproduce the bug:

- Let's consider two sales taxes T1, T2
- Create Fiscal Position FP which maps T1 to T2
- Create Product P (Customer Tax: T1)
- Configure FP as default fiscal position and Invoicing to print invoice in POS.
- Create POS order with any customer, with P and FP
- Select Print Invoice in the payment window
- Process the payment
- Order Preview displays T2 as expected

Bug:

The printed invoice displayed T1 instead of T2 on the invoice line

opw:2171599

closes odoo/odoo#43356

X-original-commit: b26a8d1b8f5c8b700a4a48f3698ac2d109628db4
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-01-15 14:51:12 +00:00
Goffin Simon ffde4c8f89 [FIX] website_sale: Creating an account on the eCommerce
Steps to reproduce the bug:

- Go to Settings > General Settings
- Set "Customer Account" on "Free sign up"
- Go to Website > configuration
- Activate "Digital Content"
- Create a fiscal position FP with a coutry group CG and applied automatically
- Create a service product P with digital content DC at sales price = 0
- Publish P on the website
_ Log out and go to the shop with public user
- Add P in your cart
- Process the your Order in the shop
- When the order is confirmed, click on "Downloads"
- You will be redirected to the login page
- Click on "Don't have an account?"
- Fill in the form and sign up

Bug:

Nothing happened because in function sale_get_order in model 'website'
the partner on the confirmed SO was not the same as the new one and so
update_pricelist was set to True and a call to function _cart_update was
done on a confirmed SO. Inspired from function _cart_update in model
'sale.order'.

opw:2146902

closes odoo/odoo#43362

X-original-commit: 1f6a4e56442ba5531f87269ab032f99218fc45a2
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-01-15 15:26:59 +00:00
Luc De Meyer f08204c69c [FIX] account: don't overwrite statement_line_id when reconciling transfer account
Description of the issue:

Transfer between Bank1 (550001) and Bank 2 (550002) of the same company via the intercompany bank account (580000) :

Bank 1: minus 1000 EUR, we create the following accounting entry via the reconcile widget

account 550001 credit 1000
account 580000 debit 1000

Bank 2 : Plus 1000 EUR

When we select the counterparty 580000 entry of the Bank 1 statement via the reconcile widget
than the statement_line_id of the entry from Bank 1 statement is replaced by the one of the Bank 2 statement.
Hence this account.move.line is linked to the wrong statement line.

closes odoo/odoo#43371

X-original-commit: 3d74e7397e15311f1e9189589a435d9683376317
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-01-15 16:36:27 +00:00
Nicolas Lempereur b239201190 [FIX] *: avoid muting res.users().context_get return
Some code modify return of res.users().context_get, but this is a
cached method so this will unexpectedly affects totally unrelated code.

For example, changing the company with the company switcher could add
`allowed_company_ids` inside the cache, then it will be cached until the
server is restarted, even if we change company again inbetween.

Added test failed with:

"NotImplementedError: '__setitem__' not supported on frozendict"

on the line with `User = User.with_context(context)` where User already
contained `allowed_company_ids` in its context.

note:

in this forward-port, context_get is also changed to return frozendict
and prevent being able to have an unexpected issue by code that modify
context_get returns.

opw-2158340
closes #42465

closes odoo/odoo#42723

X-original-commit: 5d69885c1cd6921b3de00aae7e0ed6fff243ff95
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-01-15 16:19:03 +00:00
fw-bot fccaa703c4 [MERGE] project, hr_expense: Fix several multi-company issues + tests
Purpose
Fix multi-company access issues following the big changes that happened
(the 13.0). Make the usability better in order to avoid potential
multi-company issues for the user.

Specification
Check the related commits to see the different fixes that have been
made. For more information about the technical/functional considerations,
check the related task.

Taskid: 2088891
X-original-commit: 5c8df3a5e5f7960e5eab6439e0a32a06224ba826
2020-01-15 15:11:50 +01:00
yhu-odoo 4a1dfb50b7 [REF] stock_account: valuation layer and not admin user
missing bit from rev[0], [1], and [2]

[0] 7ef11e3
[1] d6c8c34
[2] 5096e72

closes odoo/odoo#43186

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-01-15 09:02:42 +00:00