Commit Graph
140385 Commits
Author SHA1 Message Date
jvm-odoo edc4c093d8 [FIX] sale, purchase: fix empty partner lang
Issue

	- Create new db with language en_CA
	- Install Sales & Purchase
	- Enable fr_CA
	- Create a product & Save
	- Edit the name & Save
	- Create a quotation or RFQ
	- Do not select partner
	- Select your product

	The description is still the old name

Cause

	We try to browse a product with an empty
	partner language

Solution

	Use odoo.tools.misc.get_lang() in order
	to fallback to a language is the partner's
	one is empty

closes #44357

OPW-2196602

closes odoo/odoo#45620

X-original-commit: 4561b6bd4c2afab8ae29ced1a9085e6878a9921d
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-02-18 12:01:58 +00:00
David Beguin f9d34ec711 [IMP] survey, website_livechat: hide livechat in survey layout
Purpose
=======

Lighten the survey layout. Livechat button should not appear on survey pages.

Specifications
==============

Survey Layout inherits from web.frontend_layout, mainly to be able to use all
the styles rules defined in it and keep consistency between other frontend
pages and survey.

To avoid having the livechat button displayed on survey layout, 'no_livechat'
template variable has been introduced. The livechat button will be displayed
on all layout inheriting from frontend_layout (that is extended in
website_livechat to add that livechat button) only if 'no_livechat'
is False. By default, this variable is not set so will be considered as False.
In survey layout, no_livechat is set to True.

Links
=====

Task ID: 2195185
PR #45112
2020-02-13 15:29:00 +00:00
David Beguin 732cb7c254 [IMP] survey: remove header and footer for all survey mode.
Purpose
=======

Lighten the survey layout. it should be free of website footer and header.

Specifications
==============

Survey Layout inherits from web.frontend_layout, mainly to be able to use all
the styles rules defined in it and keep consistency between other frontend
pages and survey.

Instead of inheriting another layout, this PR sets no_footer and no_header to
True for all survey layout. The idea is to show only the survey itself without
having other web/website object in the layout.

Links
=====

Task ID: 2195185
PR #45112
2020-02-13 15:29:00 +00:00
David Beguin 6f2865e456 [IMP] im_livechat : set livechat inactive _onCloseChatWindow
If the visitor closes the livechat window, he is redirected on rating /
feedback / send_transcript screen but he cannot go back to the conversation,
except by reloading the whole page.

Conversation should then be considered as inactive after the first click on X.

This commit close the conversation (set as livechat inactive and send the
'has left conversation' message) at first time the visitor closes the
conversation.

Task ID: 2120210
PR #39939
2020-02-12 16:06:22 +00:00
David Beguin 20a7ae2657 [REF] im_livechat, website_livechat : move close livechat session to base module
In order to be able to flag the livechat as inactive when the visitor left the
conversation, livechat_active field is moved to im_livechat module, as it is
not linked to website_visitor.

This commit is also a preparation for next one, which will implement the close
conversation right after the first click on x button in livechat window (at
visitor side). We needed the livechat_active flag to be available without
website installed.

Task ID: 2120210
PR #39939
2020-02-12 16:06:22 +00:00
Meghna Jaswani 7b9e13e091 [IMP] account: sale or purchase receipt active from account settings
Purpose:
If the user is not using receipt functionality in his organization then it's can be hidden.

Current behavior before PR:
Sale and purchase receipt by default show when the account module is instaled.

Desired behavior after PR is merged:

Now users can activate Sale or purchase receipt from accounting settings.

closes odoo/odoo#44464

Task: 2028813
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-03 10:32:13 +00:00
yhu-odoo dc10774d52 [FIX] stock, mrp: inter company transit chained moves
Let's say we have a chain of move
wh1 - intercomp transit -> intercomp transit - wh2

The second move will be reserved according to what the first move
brought since they are chained. This behavior resulted in rev[0] which
tries to work around the ir.rule limiting the access of stock.move and
stock.move.line records in multi-company environment.

This patch wasn't perfect since, if the first move brought a lot, the
second move will reserve this lot and it will result in another access
error since the lot will still have the company of the first move.

We fix this by implementing the following logic: receiving from another
company should behave the same as receiving from the supplier, no
reservation is applied. We fix this by marking the inter company transit
as `_should_bypass_reservation` and we break the move chain if the
pull/push rule create an intercompany chain.

[0] 6ff34073153767d449804669f31e26c04de0a670

closes odoo/odoo#45601

Task: 2160847
X-original-commit: 67b45da9d877a5a1bb9adb3ce14051e01f67045f
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-18 10:37:14 +00:00
Yenthe666 1477774582 [IMP] web: fix typo in datepicker
Before this commit the sentence was a bit weird as a date is not on the future but in the future. This commit resolves this.

closes odoo/odoo#45548

X-original-commit: b335c33655a707f71fbc01929f5eea2e659e7215
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-17 16:53:30 +00:00
Nicolas Martinelli 723d332339 [FIX] stock: MTSO with previous picking
- Set the rule 'WH: Stock → Customers (MTO)' with:
  Supply Method: Take From Stock, if unavailable, Trigger Another Rule
- Create product A
  Routes MTO, Buy
  Add 3 Units in 'Stock'
  Set a supplier
- Create a SO for 5 Units, validate => a RFQ for 5 units is created
- Create a SO for 2 Units, validate

2 Units are added to the RFQ, although there is enough in stock.

This is because we take into account the 'Forecasted Quantity' instead
of the 'Free To Use Quantity'.

closes odoo/odoo#45590

X-original-commit: 00993a136052487ea43bed0e59bb7bbc54113bac
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-18 09:38:37 +00:00
Nicolas Martinelli 0660a9c015 [FIX] mrp: MTSO as default
Set the MTSO as default for Manufacturing, similarly to `mto_pull_id`.

X-original-commit: 473e3ee607d318d624bb0117d14603af3ce4ecea
2020-02-18 09:38:36 +00:00
Nicolas Martinelli 1f68f33c97 [FIX] stock: MTSO in manufacturing
- Install MRP and Purchase
- Configure the rule 'Stock → YourCompany: Production (MTO)' with:
  Supply Method: Take From Stock, if unavailable, Trigger Another Rule
- Create a product AB with route 'Manufacture'
- Create products A & B with routes 'Buy' and 'Replenish on Order
  (MTO)', set a supplier
- Create a BOM for AB with:
  Product A: 2.0 Units
  Product B: 3.0 Units
- Create a MO for 1.0 Unit of AB, 'Mark as Todo'

No RFQ is created for A & B while there is no stock available and a
supplier is set.

This is because the 'MTSO' logic is located in `_run_pull`, which is
never called in this use case since no procurement is created.

We need to apply the same logic in `_adjust_procure_method`, which is
called at MO confirmation.

opw-2189694
opw-2194739

X-original-commit: 9ae3b3e8d2694f5560913682824fd10e60de14a4
2020-02-18 09:38:36 +00:00
Alexandre Kühn b1cee5cc66 [FIX] mail: no crash on receiving needaction on messaging not ready
Before this commit, when receiving a needaction message while messaging
was not ready (i.e. `/mail/init_messaging` not resolved), the web client
crashed with the following error message:

```
TypeError: Cannot read property 'incrementMailboxCounter' of undefined
```

This happens due to reception of needaction message incrementing counter
of mailbox Inbox, but this mailbox is only added after messaging is ready.

This commit fixes the issue by directly adding inbox mailbox on starting
the mail service.

closes odoo/odoo#45442

X-original-commit: 741acb9f48f2d3542549791a8fd7d6fb318bc862
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-02-18 10:03:01 +00:00
5676f8d411 [MERGE] website_event(_sale/question): improve event usability and frontend display
Purpose
===========

Batch of improvements based on user testing/on site implementation with the
focus of improving the flexibility and usability of Event. This way the
application should be easier to use for small SMEs that organize events such
as local sport clubs, theater company, ...

Specifications
=================

Deactivate by default some filters in /event page top bar

Invert the behavior of is_individual field and rename it accordingly

Revamp the event list in front-end
Filter by month instead of week on /event page
Improve /event/<model: event.event>/register page design

Add tracking on name, email, phone fields on event.track

Links
===========

TaskID 2162438
Community PR #44476
Upgrade PR odoo/upgrade#771

Related: odoo/upgrade#771
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: David Beguin <dbe@odoo.com>
Co-authored-by: Quentin Mourier <qmo@odoo.com>
2020-02-18 11:43:15 +01:00
qmo-odooandDavid Beguin 54dd2cdd47 [IMP] website_event_track: track event.track name, email and phone
PURPOSE

Avoid losing contact information. Example :

  I set a company that should come and speak to OXP and they have
  an email address as well as a phone number set. To prepare the webpage
  someone then sets the real speaker who is the person, not the company
  => Contact details are lost on the track and one needs to find
     the contact in the repertory to set it back

SPECIFICATIONS

Track name, email and phone of event.track.

LINKS

TaskID 2162438
Community PR odoo/odoo#44476

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Quentin Mourier <qmo@odoo.com>
2020-02-18 09:24:26 +00:00
qmo-odooandDavid Beguin b8e33b2439 [IMP] website_event: improve front-end display
This commit makes a few design improvements in the Event list in front-end
after some feedback about its usability

- Make the 'configure your registration' alter not editable (for studio)
- Display the "is online" through a "tag" design, not just text
- Remove remaining seats count
- Some display cleaning and improvements (design)
- Put the event date just below event title on event frontend list
- apply some minor design improvements in the /register page.
- Filter by month instead of weeks :
    This commit changes the date filtering in website_event.
    Before this commit, users could filter events by weeks.
    After this commit, users will be able to filter by months
    and will be able to filter events up to two months in the future.

LINKS

TaskID 2162438
Community PR odoo/odoo#44476

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Quentin Mourier <qmo@odoo.com>
2020-02-18 09:24:26 +00:00
qmo-odooandDavid Beguin f652912398 [REF] website_event_questions: inverse is_indivual field behavior and default
PURPOSE

Questions asked to attendees are usually attendee specific according to
"statistics". It makes therefore sense to have a field activating the global
question mode that is False by default.

SPECIFICATIONS

Inverse behavior of boolean 'is_individual' and rename it to 'once_per_order'.
By default it is set to False, meaning all questions are individual.

LINKS

TaskID 2162438
Community PR odoo/odoo#44476
Upgrade PR odoo/upgrade#771

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Quentin Mourier <qmo@odoo.com>
2020-02-18 09:24:26 +00:00
qmo-odooandDavid Beguin 9444d25db9 [IMP] website_event: deactivate some custom views by default
Before this commit, in the "customize" menu on /event, custom views enabling
filters by "category, country" and the "show sidebar" were activated by
default. This commit deactivates them by default.

Reason behind this change is that most people don't have enough events to
justify having those filters on by default.

LINKS

TaskID 2162438
Community PR odoo/odoo#44476

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Quentin Mourier <qmo@odoo.com>
2020-02-18 09:24:26 +00:00
Andrea Grazioso (agr-odoo) a3f102db49 [FIX] l10n_it_edi: allow invoice edit after edi sent
Create an invoice, validate it, sending the data to the SDI.
Now reset to draft the invoice and re-validate it.

Action will be blocked because "You can't regenerate an E-Invoice when
the first one is sent and there are no errors".
This add the possibility to modify the invoice without re-sending it as
long as the first one is still in a sent-with-no-answer state

opw-2196956

closes odoo/odoo#45580

X-original-commit: a315d7dde7ab4c1283c999c336284aeac86dbbbc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-18 08:16:57 +00:00
jerome hanke (jhk) 2ee19575be [FIX] sale: sale_tour selector fix
Steps to reproduce:
- install sales
- go into debug mode
- dev tools > start tour > sale_tour

Previous behavior:
tour would fail to see that the product has been selected
and time out if you do it multiple time

Current behavior:
the tour finishes properly (even if it runs multiple times)

opw-2187218

closes odoo/odoo#45461

X-original-commit: e7a78fd76e48fbaa895d786f699d22b2278c9301
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-02-17 14:10:24 +00:00
Andrea Grazioso (agr-odoo) 3ee9a9fbdc [FIX] web_editor: deny videos in mass mailing
Create a new mass mailing, add a video via youtube embed link, save.
Send email.

Embedding a video can't work because it embeds an iframe, which is not
supported by most email clients for security reasons.
Extending the noVideo flag also to mass_mailing

opw-2179665

closes odoo/odoo#45104

X-original-commit: f9f8c9cc4075fdc5fd4556aa49c914054469198a
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-02-11 14:44:01 +00:00
jerome hanke (jhk) 12c3fd2649 [FIX] account: reconciliation model buttons leak out of the screen
Steps to reproduce:

- install accounting
- go to accounting > accounting > reconciliation (you need at least
one unpaid invoice and one unreconciled payment for the proper screen
to show)
- manual operations > click the cog icon > create model
- create a model with a long name and duplicate it 5-10 times
- go back to the reconciliation tool > manual operations

Previous behavior:
the model buttons leak out of the right of the screen

Current behavior:
An horizontal scrollbar appears if necessary

opw-2185355

closes odoo/odoo#45431

X-original-commit: e24d971ad8d1bfdef8fc55710d99fc29c29a9c31
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-02-14 18:15:59 +00:00
Damien Bouvy 0ab7da57ab [FIX] sale, account: correct multi-company invoicing
During a forward port, a regression was introduced that broke the
multi-company invoicing flow in Sales.

Create a SO in company 1, use the web client with company 2 as the main
one. The invoice should be in company 1.

This commit fixes that by providing the journal_id in the invoice values
(the company of the account move comes from the journal).

While making this fix (and adding a test for it), I stumbled upon
another multi-company issue when fetching the accounts of the product
where the property field was not accessed with the correct company. I
fixed it as well.

closes odoo/odoo#45551

X-original-commit: 07dbc197007c78633decccef2200a628b7d4a363
Related: odoo/enterprise#8498
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-02-17 17:06:05 +00:00
Swapnesh Shah 695a1c8ada [FIX] auth_oauth: set values when necessary
If the record with the external id 'auth_oauth.provider_google' does
not exist in the database, 'google_provider' variable will contains
None.
Before this commit, calling get and set methods produced an error.

After this commit, trying to set a token for Google Authentication
will do nothing.
While this is not ideal, one can assume somebody that deleted an OAuth
provider rarely wants to configure it and can still upgrade the module
to get it back.

closes odoo/odoo#45566

X-original-commit: eca90a31d0d3667cf63994d34c5d2bb81bfd45c4
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-17 20:24:25 +00:00
Paul Morelle 98d5770e5d [FIX] tools: stop evaluating twice <function eval="..."> in _eval_xml
After a bad merge d785adba6c the eval code
was evaluated twice.

closes odoo/odoo#45554

X-original-commit: c0316bb807e6c2db9c3567cba1aeb52da946cae7
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
2020-02-17 17:35:19 +00:00
Simon Lejeune 858c2e4da0 [FIX] stock, mrp: move with zero as initial demand
Set the following product configuration:

Storable finished product with a flexible BOM made of storable
components in manufacture + MTO:
Component choice 1 Quantity = 0
with BOM made of component 1, quantity 1 with purchase mto route
Component choice 2 Quantity = 0
with BOM made of component 2, quantity 1 with purchase mto route

Create a MO for finished product, set the "to consume" quantity of
"Component choice 1" to 1, and try to mark it as to do. The following
issue is raised: The quantity to produce must be positive!

This is because a procurement with 0 quantity will be solved in a MO
producing 0 quantity. We fix this issue by ignoring procurements with 0
quantities.

Also, this MO without initial demand is not considered assigned. We fix
this issue by considering 0 move as assigned.

task-2159374

closes odoo/odoo#45552

X-original-commit: dffb3a1f2762d6e1517eb9b7d225521f99d874d5
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-17 17:11:11 +00:00
Jared Kipe 6d90d20ee9 [FIX] delivery: always assign the value
In order to prevent `CacheMiss` errors.

Closes #45242

closes odoo/odoo#45550

X-original-commit: 6b5c5124c34245ca93716131c6496d1d4dea72a2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-17 17:02:36 +00:00
svs-odooandNicolas Martinelli 667112ad3a [FIX] stock: package location dest with putaway
0.  Create 2 Products A & B
1.  Open Inventory > Configuration > Settings and flag the following
    checkboxes:
    Delivery Packages
    Product Packagings
    Storage Locations
    Multi-Step Routes
2.  Go to Inventory > Configuration > Warehouses and open YourCompany WH
3.  Set 'Incoming shipments' to 'Receive goods in input and then stock
    (2 steps)'
4.  Go to Inventory > Configuration > Operations types.
5.  For 'YourCompany: Delivery Orders' and 'YourCompany: Internal
    Transfers”, flag the following checkboxes:
    Show Detailed Operations
    Move Entire Packages
6.  Go to Inventory > Configuration > Locations and open 'WH/Stock'
7.  Edit and create a new 'Put Away Strategy' called 'Stock'
8.  Add a new rule:
    Product A, with Location 'WH/Stock/Shelf 1'
    Product B, with Location 'WH/Stock/Shelf 2'
9.  Go to Inventory > Operations > Transfers to create a new picking.
10. Select 'YourCompany: Receipts' as 'Operation Type'
11. Under Operations, add a new line with product A and an 'Initial
    demand' of 20
12. Save and 'Mark as to do'
13. Enter in edit mode and under 'Detailed Operations', set a quantity
    of 11.0 on 'Done' and click on 'Put in Pack'
    => A new pack is created
14. Repeat 13 with a quantity of 9 to create a new pack
15. Save and click on 'Validate'
16. An existing 'Internal Transfers' with the two created Packages
    having following properties:
    From: 'WH/Input
    To:   'WH/Stock/Shelf 1'

At this point, the behavior is expected.

17. Cancel the picking created
18. Create a new picking:
    Operation type: 'YourCompany: Internal Transfers'
    Source Location: 'WH/Input'
    Destination location: 'WH/Stock'
19. Under Operations, add two new lines using the packages os step 16.
20. Save and 'Mark As To Do'. The two packages have the following
    properties:
    From: 'WH/Input
    To:   'WH/Stock'

We can see a difference in behavior. The picking created from a 'Pull'
mechanism applies the putaway strategy to the package, while the picking
created from the 'Push' mechanism doesn't apply it.

We make the behavior consistent. Moreover, in case the package contains
products having different destination locations, the destination of the
picking is kept.

opw-2146583
task-2148494

closes odoo/odoo#45549

X-original-commit: 705bdaa4ae5251b05bc2bbba02f2ca561ca00bbc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Co-authored-by: Nicolas Martinelli <nim@odoo.com>
2020-02-17 16:55:27 +00:00
Josse Colpaert 47eff65afd [ADD] account_debit_note: Debit Note functionality
You might think that if the debit note is like the inverse
of a credit note, that it is just a regular invoice.

Well, it is, except that we had several localizations
adding a link with the original invoice for the debit note.
This way, we can share that many2one and add a wizard that is
similar as the one for the credit once and for all.

In order to keep things simple, we always create a
draft debit note.  The only option we give, is to copy
the original invoice lines or not.

You can also create a debit note from a credit note,
in which case the type needs to change, but we don't
copy the lines in that case (for now).

opw-2181586

closes odoo/odoo#45542

X-original-commit: f1af011d0966fa6e436168879b7f18fabb955934
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-02-17 16:33:22 +00:00
Andrea Grazioso (agr-odoo) 8de07a8aa5 [FIX] purchase: add source document to vendor bill
Create a purchase order, confirm it and create the vendor bill. The
source document will be not filled.

Fixing the related variable and changing also the missing reference to
the partner

opw-2197272

closes odoo/odoo#45534

X-original-commit: 8498dbe10db87f718b9287f69188c627e36f98a3
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-17 15:48:37 +00:00
oco-odoo 4dd36a86e9 [FIX] account: fix bank account requirement on account.payment form
When making a payment for multiple vendor bills at once, it is possible that payments will be generated without any recipient bank account for payment methods normally requiring one. In such cases, the user needs to be able to correct the payments by cancelling them. It was not possible.

closes odoo/odoo#45082

X-original-commit: 9aec95dccef48a9ec89691f5721619ffc0e4da56
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-02-17 16:12:48 +00:00
Martin Trigaux ec4f4d0704 [I18N] *: translate NIT in es_BO
VAT, NIF in Spanish, is translated NIT in Spanish from Bolivia
Clean and translate the files with the correct translation.

opw-2197155

closes odoo/odoo#45533

X-original-commit: 641c14f08435b1df1d89184cc00855416bf40bc5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-17 15:47:16 +00:00
Swapnesh Shah f69fa0af63 [FIX] base: paperformat_id is required on settings
Not setting a value for paperformat_id on 'Company Document Layout'
will also make paperformat_id False on the company but it is required
in the settings.

Without this commit, you can get in the weird situation of being able
to set a value on the document layout but having an error in the
general settings as a required field is missing.

Apply the same logic as in the other views

closes odoo/odoo#45527

X-original-commit: e518063e48936a3f8f9f921950cdae209e67ab47
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-17 15:07:15 +00:00
fw-bot 0494e6763f [FIX] stock: immediate transfer
Create an immediate transfer for a receipt, add a move, set a quantity
done and due to rev[0], an initial demand is set, then
_autoconfirm_picking is called and action_confirm of picking calls
_action_assign if the location source bypasses the reservation. Set
again an inferior qty_done, the initial demand is also updated due to
rev[0] and somehow the system tries to write on a now unlinked move
line.

fixes
- never reserve an immediate transfer
- never update the initial demand if the move is reserved to fix the
existing databases.
- adapt _compute_state so that immediate transfer moves considered
reserved so that they're always "ready"
- adapt the test that was working on an immediate transfer picking and
setting the initial demand while it's not possible through the
interface, the user can only set the done quantity.

[0] 8303b1a

closes odoo/odoo#45317

X-original-commit: 357e0a862744f1bc23a9643a1822d2ee4a2eb7a2
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-17 14:55:04 +00:00
Goffin Simon 260b6f0731 [FIX] sale: Default Downpayment on Invoice
Steps to reproduce the bug:

- In debug mode, create a SO
- Confirm the SO
- Click on "Create invoice"
- In the wizard, click on the debug logo
- Set a User default value V for Downpayment amount
- Close the wizard
- Re-click on "Create invoice"

Bug:

The default value V was not suggested.

Fine tuning of c258b8a0427bd5aface891ed1f4420174f4afde4

opw:2184367

closes odoo/odoo#45512

X-original-commit: f95550d59ddeb8a77cb7b72592cc4aafb210aa25
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-02-17 14:17:07 +00:00
yhu-odoo fb7adbe3d3 [IMP]stock: add user and delivery contact as follower
=======
PURPOSE
=======

Avoid communication being lost on transfers due to the fact that nobody is following.

=============
SPECIFICATION
=============

When setting a delivery address, add the contact in question as a follower of the transfer.
When a user validates a transfer, he should be automatically added as a follower of this transfer.

===========
LINKS
===========

task 2172675
pr #44350

closes odoo/odoo#45498

X-original-commit: d6a981039005080e4803cb9c75287dfa4ada712b
Related: odoo/enterprise#8483
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-17 13:07:55 +00:00
alt-odooandJorge Pinna Puissant 86b9106482 [FIX] account: prevent group payment if multiple receivable/payable accounts
When creating a payment, we are expecting only one destination account.
However, when grouping payment by customer, it can happen that there are
more than one receivable or payable accounts, which can create
reconciliation issues afterward.

opw-2188632
opw-2166551

closes odoo/odoo#45396

X-original-commit: 779699297b9767438797ae3678eb9da1db0ce609
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2020-02-14 12:48:20 +00:00
fja-odoo 7a000acffd [FIX] website: fix website vistor concurent update
When requesting multiple tracked content at the same time with the same
visitor concurrent updates happen.

The best way I got to consistently reproduce the issue is to open 2
tracked pages with chrome command line:
google-chrome http://pcodoo:8069/contactus http://pcodoo:8069/

The first tracked page will update the visitor and lock it.
When the second will try to create a track which has a FK referencing
the visitor PSQL will try to SELECT FOR KEY SHARE the visitor but it is
locked => Concurrent Update Error. Using FOR NO KEY UPDATE instead of
FOR UPDATE performs a weaker lock that will not block
SELECT FOR KEY SHARE. By doing that we garantee that we will not
Update/Delete the PK while we lock the record.

closes odoo/odoo#45491

Fixes: https://github.com/odoo/odoo/pull/38372
X-original-commit: 33d0f0bc6b4c84de61ad876311690f26476c32f9
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-02-17 12:43:47 +00:00
Nicolas Martinelli a02e426669 [FIX] web: 404 response even if placeholder
- Open any product kanban view with missing images

A 404 status code is returned for missing images, while they are
replaced by a placeholder.

This can cause issues when configuring a specific 404 page in a reverse
proxy: the proxy will serve the custom page instead of the placeholder.

opw-2192663
opw-2192340

closes odoo/odoo#45157

X-original-commit: 2719c8a0e40f318787b4d7a46626de46a8fd33f0
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-12 09:56:12 +00:00
Baptiste Vergote d4808210bd [FIX] stock_account: reverse move w/o move from transfers
Missing context key in case of reverse of a vendor bill
it was then adding the anglo-saxon move lines.

opw-2172562

closes odoo/odoo#45432

X-original-commit: 48809f0c1b848142441063371d762a435836b6ec
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-02-14 18:22:04 +00:00
Nicolas Martinelli 9d0c32d326 [FIX] l10n_it_edi: do not use inactive mail server
Do not use an inactive mail server to send the requests.

opw-2197011

closes odoo/odoo#45375

X-original-commit: ecc4759c03534ccb37ebf9eea202abdf387adca9
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-14 10:00:59 +00:00
fja-odoo 90bd53a204 [FIX] website: fix partner google map's url
Fixes de590816d8

closes odoo/odoo#45316

X-original-commit: 4118a6cf1adef04a799afa80faec78bcf44cf56b
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-02-13 15:18:45 +00:00
Yannick Tivisse fd9b08c70f [FIX] timer: Fix wrong type for res_id field
Purpose
=======

Having a char field referring to an Integer could lead
to unwanted behavior if not managed correctly.

closes odoo/odoo#45393

X-original-commit: d73a86fd682495c034dfde678442f37689ecb759
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-02-14 12:27:01 +00:00
Swapnesh Shah 9b87228c1e [IMP] base,web_unsplash: Add set up message
Before this commit, There was no Instrustion to Setup this feature like other Integrations.

Now we display message when we enable this feature for the First time from settings.

closes odoo/odoo#44439

Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-13 17:29:10 +00:00
Rémy Voet (ryv) 3a935af85a [IMP] stock,mrp: change icon of json popover
The icon of the json popover become a warning icon
when there is a issue. Also, create a
field show_json_popover in mrp_production
to avoid using d-none to put in invisible the popover.

task-2178494

closes odoo/odoo#45420

X-original-commit: 270e8d34b2adec07e8ae3b8952514184d2a00b59
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-14 16:23:03 +00:00
Ankita Raval 67402bc5ec [FIX] stock: Alert should disappear when picking done cancelled
In this commit, added a restriction on "json_popover" field so,
Alert should disappear when picking is done or cancelled state on
list, kanban and form views.

task-2178494

X-original-commit: 12ada1bfa3e85c636f5ea85af675dedad3e7e0e4
2020-02-14 16:23:03 +00:00
wan f56c74c434 [IMP] account: hide the readonly group
The recently added group "Show Full Accounting Features - Readonly" was
shown in the selection of groups of accounting, but the "Show Full
Accounting Feature" wasn't. It was inconsistent and allowed to see the
features too easily (not debug mode needed)

closes odoo/odoo#45419

X-original-commit: ed3adb320c6680bb213965c84b6b7fd5654c8121
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-14 16:22:41 +00:00
wan cddbd7bf94 [FIX] account: no next activity on invoice for OdooBot
We don't want a next activity for an invoice to be created for OdooBot
if he is the Salesperson. We also don't want a traceback if the
salesperson and the next activity user are not set.

closes odoo/odoo#45417

X-original-commit: 8bf1b72e2b2bdf026b8eff28a554301a598012be
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-14 15:12:09 +00:00
aab-odoo f0a0cf5a6f [IMP] web: add odoo version to frontend session_info
This information is necessary for tours going from the backend to
the frontend (or the other way around) to run properly:

Some tour steps may be flagged with 'community' or 'enterprise',
meaning they must only be executed in the corresponding edition.
The TourManager filters the steps according to the edition. When
a tour is executed (either in test mode, automatically, or in an
onboarding situation, manually), the index of the current step is
stored in the local storage. So, the list of filtered steps must
be the same in the backend and in the frontend, which couldn't be
guaranteed as the frontend didn't have the information (thus always
considered being in community).

Part of task 2180175

closes odoo/odoo#45398

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-02-14 13:01:57 +00:00
Thibault Francois ed3e0b51ad [FIX] mail: don't raise access error on register_as_main_attachment
When you read a record with the document viewer on the right side
that you don't have write access to this record
and the message_main_attachment_id was not yet set on the record

the document viewer try to set a value for message_main_attachment_id
that raise an access error

Set the value is not important but the popup
Access error can be really annoying

closes odoo/odoo#45378

X-original-commit: 74c36e6bc59af241ea162f042015f637880f1911
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-14 10:15:12 +00:00
Romain Derie 028774fd35 [FIX] website_sale_coupon: prevent race condition
2 lasts steps are:
  - Click on go to checkout
  - Ensure checkout total is correct

But the last condition was already true before landing to the checkout, thus
the last step would succeed while the page is transitionning to the checkout.

The following would happen every time:
  - Click on go to checkout
  - Last step succeed directly after the previous step click on Go to checkout
Then, the following would happen rarely:
  - The tour is considered successful
  - The checkout page is loaded
  - Some GET requests are performed
  - The tour is killed (cookies & local storage)
  - Some other GET requests are crashing, such as:
    `Error loading file http://127.0.0.1:8069/web/webclient/locale/en_US`

The fix simply wait for the checkout page to be loaded as it was supposed to at
first, before checking the last step.

Forward-port of https://github.com/odoo/enterprise/pull/8322

X-original-commit: https://github.com/odoo/enterprise/commit/67686b697c866a5e5ad141a85b3589f1f1598d73
(coupon was moved from enterprise to community in Odoo saas-12.3)

Closes #45097

closes odoo/odoo#45395

X-original-commit: 6768d87969f30e40b2e13a32c15330832afb780e
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-14 12:45:57 +00:00