Commit Graph
133996 Commits
Author SHA1 Message Date
Odoo's Mergebot b97d33db4e [FW][MERGE][FIX] (website_)event(_question/_track): provide fixes related to 13.2 event upgrades
Purpose
=======

Fix kanban state default value and display in community.

Fix question answers not correctly parsed from frontend.

Fix sale availability ACLs issue when having tickets.

Do not group the event tracks by location.

See sub commits for more details.

Task 2188857
PR #44545

closes odoo/odoo#45655

Forward-port-of: odoo/odoo#44545
Related: odoo/enterprise#8533
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-18 17:55:18 +01:00
Debauche Stéphane 50d1ac6263 [FIX] website_event_sale: reset sale when buying free tickets
When we buy a ticket on website, a sale order is automatically created and
confirmed if the ticket is free. When we buy a second ticket we will edit the
old SO, but we can't, because the SO was confirmed.

Solution
========

In `_create_attendees_from_registration_post`, reset the sale information.

Task ID 2188857
PR #44545

X-original-commit: d0e80ffdcc3a1ca2d872df66e1aee336f1777378
2020-02-18 15:59:13 +00:00
Debauche Stéphane 33630da5f1 [FIX] website_event_track: remove default group by location for tracks
Because it is counter intuitive for track managers.

Task 2188857
PR #44545

X-original-commit: 4fcbb83a067782b13da9c858628e90d869928345
2020-02-18 15:59:13 +00:00
Debauche Stéphane 62257ed5f2 [FIX] event_sale: compute sale_available using superuser
Indeed this field is notably based on tickets availability. Reading tickets
products is not necessarily granted to everyone. People reading events should
be able to know if the sale is available or not independently of their access
on product model. Let us therefore use a compute sudo.

Task 2188857
PR #44545

X-original-commit: cfabf12ef888a9dac48cbb19763740e2c65225d5
2020-02-18 15:59:12 +00:00
Debauche Stéphane 3721f49d4e [FIX] website_event(_questions): correctly parse frontend question answers
When user register to an event from website, they can answer questions
specific to a given registration or to all registrations. However they
are not correctly parsed and not saved.

Task 2188857
PR #44545

X-original-commit: e27d9b5c4f234f6ce64456c2f52e7cfb0331332f
2020-02-18 15:59:12 +00:00
Debauche Stéphane 9b55dfcc35 [FIX] event: fix and provide a default value to kanban state
In the event form view, when only community is installed, kanban state
is not on the right part of the form.

Moreover it should have a default value.

Task 2188857
PR #44545

X-original-commit: 1813f064bdcbc09131197484ed3c075dcba8bcb7
2020-02-18 15:59:12 +00:00
Patrick Hoste 71206f42f7 [IMP] event: improve event tree view
PURPOSE

Update tree view to add optional fields to make it easier to read.

SPECIFICATION

Modify the event_views files to add some fields (optional or not)
It add some more informations about the seats, the tracks and sponsors
and if the event is online or not.

LINKS

Task ID : 2192652
PR : #44938

Related: odoo/upgrade#801
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-18 14:14:46 +00:00
Patrick Hoste 1de3d44013 [IMP] event: remove seats_min and default_registration_min from event model
PURPOSE

This field is deprecated. Since its usage was to trigger a warning when
trying to confirm an event and confirming an event is not done anymore,
it has become obsolete.

SPECIFICATION

remove seats_min field and usage from event.event
remove default_registration_min field and usage from event.type

LINKS

Task ID : 2192652
PR : #44938
2020-02-18 14:14:46 +00:00
Katherine Zaoral 62516ae5ff [FW][FIX] l10n_latam_invoice_document: proper validate vendor bills
Formerly the vendor bills, customer invoices and regular journal items were
evaluated by the _check_unique_sequence_number method, but this is wrong
and also was overwritten Odoo original constraint error message.

Now the _check_unique_sequence_number evaluate the account.moves that are
not vendor bills that use documents because this kind of bills uniqueness
depends on the vendor: we can have same name of vendor bill from different
partners. This is evaluated in the already existing
_check_unique_vendor_number method

closes odoo/odoo#44813

closes odoo/odoo#45643

Original-signed-off-by: Josse Colpaert <jco@openerp.com>
X-original-commit: beaa3bbacd4bd35ed11962a7466f111e5e85f0d8
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-02-18 14:09:25 +00:00
Romain Derie 7dd70438e1 [FIX] website: list real url endpoint, not 301 url
Sitemap uses `generate()` results, which were using `_rec_name` as slugified
URL.
Routing map has endurl using slugified `display_name` which is checked against
during `dispatch()`, that will redirect 301 to that url.

For instance:
  - `/shop/product/acoustic-bloc-screens-23` is listed in sitemap while this
    URL is not the correct endpoint. Reaching this URL will 301 redirect you to
    `/shop/product/furn-6666-acoustic-bloc-screens-23`.
  - `http://localhost:8069/event/design-fair-los-angeles-1` in sitemap which
    redirect to `/event/design-fair-los-angeles-2020-02-14-2020-02-18-1`.

Sitemap should contains endurl, not 301 URL.

task-2119086

closes odoo/odoo#45642

X-original-commit: f4c60bd55920d4e24de817634032649b3c3caff0
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-18 14:08:02 +00:00
Kirill Sudnikovich cc7f89bee7 [CLA] signature for 0311snitch
closes odoo/odoo#45632

X-original-commit: cc817f54a02c834f4c151e3191cc479ee348ecf0
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-18 13:19:16 +00:00
Thibault Francois bd7b36aa5a [FIX] account: allow salesman to send and print posted invoice
Issue: as salesman you want to send and print the invoice of your customer
but you don't have the access to write on the invoice
and thus you don't have access to create a mail.message and
set the flag invoice_sent to True

Allow to post message on an invoice when you have read access

closes odoo/odoo#45629

X-original-commit: d23d872f885f34bbbd747471e35e6914ac79b6cf
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-18 13:15:04 +00:00
Nicolas Martinelli a232f56312 [FIX] point_of_sale: refund in multi-currency
- Create a POS in a currency different from the company currency
- Open a POS session
- Do a refund (negative quantity)
- Close the session

An incorrect journal entry is being created, blocking the process.

This is because the sign of `amount_currency` is changed, while it
shouldn't.

opw-2191664

closes odoo/odoo#45619

X-original-commit: 1ac17f5d05dc4dd82db4a622229ba1ca2a7f31aa
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-18 11:58:36 +00:00
Joseph Caburnay dc980e9448 [FIX] point_of_sale: anglo saxon and tax lines in different currency
The problem occurs when the pos session has currency that is different
from the company's currency. Additionally, product that is tracked in
accounting is also sold in this session.

This situation results to anglo saxon move lines that are incorrectly
converted.

The current implementation considers the value from the stock valuation
layer to be in the session's currency. However, that is not the real
case because values in the valuation layer are always in the company
currency.

With regards to tax line, the tax_base_amount is not converted to the
company's currency. It's value should always be in company's currency.

This commit fixes the behavior of pos in generating anglo saxon lines
and setting the correct tax_base_amount in the pos session's accounting
entry.

X-original-commit: 2bdbea3bbf87a921ed3b343f5146a519f10e0add
2020-02-18 11:58:36 +00:00
Nicolas Martinelli 38151f42c6 [FIX] hr_recruitment: strip emails
- Create 2 applications with the following emails:
  'test@test.com'
  'test@test.com   '

The 'Applications' stat button doesn't match the 2 applications.

Since `_compute_application_count` uses a `read_group` for performance
reason, we choose to strip the value at create and write for the sake of
simplicity.

opw-2189965

closes odoo/odoo#45613

X-original-commit: 00cfc324134b289417ba25373d472ba7cce4c78f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-18 11:32:10 +00:00
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
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