Commit Graph
116651 Commits
Author SHA1 Message Date
Arnold Moyaux 64a219bd06 [FIX] stock: multiple orderpoints for a same location
commit 47654e98e0 modified a defaultdict by an OrderedDict.
When multiple orderpoints use the same location the key is the same and
location_data dict entry is removed for the new one.

This commit only call makedefault when there is not current entry for
the dict.
2018-08-06 15:51:25 +02:00
len-odoo c5ffca1511 [FIX] stock_account: copy the to_refund field when splitting a move
The to_refund attribute is set to copy=False.
However when splitting a move to create a backorder, a new move is created as
a copy with the remaining work to do.
This attribute is needed so that the backorder refund is consistently applied.

opw 1865324
2018-08-06 15:23:27 +02:00
Martin Trigaux 180a970e44 [I18N] remove outated translation with errors
Contained bad %s and are out of sync with the reference
2018-08-06 14:45:40 +02:00
Goffin Simon 7d50f2e902 [FIX] mrp_repair: Access Rights for stock user
Due to this commit: 6e93fe0de1
the stock user has the all rights on model 'product.pricelist'
As the repair order model has the field pricelist_id on it,
the stock user must have the right to read it.

opw:1865814
2018-08-06 13:50:22 +02:00
Nicolas Lempereur 84abc9d06c [FIX] purchase: Receive Products ok context F5
The `active_id` when clicking on "Receive Products" on a purchase order
is the one of the purchase order.

But the action used has a context with:

```
{
    'search_default_picking_type_id': [active_id],
    'default_picking_type_id': active_id,
    'contact_display': 'partner_address',
}
```

So the active_id should be a stock.picking.type and not a purchase
order, thus:

- we could get an error at some instance (eg. a refresh) when loading
  the facet of the stock.picking.type with the ID of a purchase order

- we could erroneously show a facet for a stock.picking.type with the ID
  being the same as the purchase order

So this commit uses the same action without the offending `active_id` in
context.

opw-1870687
closes #26160
2018-08-06 13:18:26 +02:00
Christophe Simonis b29e053436 [MERGE] forward port branch saas-15 up to 43eca3079e 2018-08-06 11:32:12 +02:00
Christophe Simonis 43eca3079e [MERGE] forward port branch saas-14 up to 1f92477cf4 2018-08-06 11:01:50 +02:00
Christophe Simonis 1f92477cf4 [MERGE] forward port branch 10.0 up to 2b7c525982 2018-08-06 10:29:57 +02:00
Christophe Simonis 4b19b84437 [FIX] web: better detection of non specify group_by in pivot views 2018-08-06 10:24:31 +02:00
Christophe Simonis efb896f915 [FIX] board: fallback to default view when not found in action
This can happen when action is modified after dashboard creation.
2018-08-06 10:24:31 +02:00
len-odoo 34d1ecd6f3 [FIX] stock, purchase: clean moves to merge
Purchase creates an activity when some stock move is deleted.
Howver when two moves are merged "behind the scenes", some moves may be deleted.
As a result it creates an activity "warning: some move has been deleted" for no
good reason.
We add a hook to clean moves before the merge.

opw 1826791
2018-08-06 10:17:25 +02:00
Andrea 85e8d13768 [FIX] sale: Amount Invoiced in Sales Analysis 2018-08-06 09:52:04 +02:00
Lucas Perais (lpe) 39f19d14f0 [FIX] crm: enable customizable pipeline action
On the pipeline action change the sequence of the view_ids to
change the order of the view_mode string
Put tree first instead of kanban for example

Before this commit, clicking on CRM menu app still displays the kanban
This was because the action window is wrapped around a server action that modifies it

After this commit, we recompute the view list to match what is on the original action

OPW 1863425
closes #26159
2018-08-06 09:41:49 +02:00
Lucas Perais (lpe) efa7f87cc8 [FIX] calendar: event from activity strip text from html
From a SO (for example), create an activity with type meeting
Create the calendar event

Access it as a guest with the route with the token

Before this commit, there was an error 500 because the description
of the event actually contained "\n" and was not parseable

After this commit, we strip the string at event creation, and no error occur

OPW 1867283
closes #25795
2018-08-06 09:31:06 +02:00
Odoo Translation Bot ea16b49e8c [I18N] Update translation terms from Transifex 2018-08-05 04:05:24 +02:00
Odoo Translation Bot 2b7c525982 [I18N] Update translation terms from Transifex 2018-08-05 00:28:35 +02:00
Luis González b623695ee7 [FIX] website_sale_digital: portal files as digital products
Currently, when a digital product is purchased, the list of attachments
is incorrectly computed. Product template's portal files are retrieved
correctly, but all product variant's attachments are taken into account,
not only its portal files.

This commit causes the portal attachments to be computed correctly,
taking into account only portal files from both the product template and
product variant.

Closes #25609
2018-08-03 10:41:02 +02:00
Andreas Perhab b3bcfbde1b [FIX] sale_stock: fix msg argument in assertion
third positional argument is places not msg (which expects a number not a str)
https://docs.python.org/2/library/unittest.html#unittest.TestCase.assertAlmostEqual

fixes errors like these:
 if round(abs(second-first), places) == 0:
 TypeError: 'str' object cannot be interpreted as an integer

and gives the intended message when assertion is errornous
2018-08-03 09:36:44 +02:00
Richard Mathot 47654e98e0 [FIX] stock: make orderpoints run in a deterministic order
In Python 3.5, items() on a dictionary return keys in a randomized order.

location_data can thus be processed in different orders, leading to
different quantities in the MO's created by the procurement scheduler.

This fix makes the output of the scheduler deterministic.

(thanks to @odony for his help in troubleshooting this issue)

opw-1865711
2018-08-02 17:00:14 +02:00
Goffin Simon ec7109c919 [FIX] account: Wrong payment amount in multi-currency
Steps to reproduce:

- activate the EUR currency

- set a currency rate 1 USD = 1.2 EUR

- create a Bank journal in EUR with a EUR account

- create a Vendor Bill in EUR for 1200 EUR in total

- go in the Vendor Bill list view (Accounting > Purchase > Vendor Bills)

- select the created Vendor Bill

- click "Register Payment" in the action menu

- select the EUR Bank journal you created

Bug:

The payment amount is 1000 EUR instead of 1200 EUR.

opw:1870351
2018-08-02 16:27:34 +02:00
Martin Trigaux 8c07fd3c5a [FIX] barcodes: remove untranslated content
Since 6a3324a7 and 0c489cf1fa, a translation can not contain a \n
Previous text was not correct rst anyway.

Reexport base translations to include all missing modules
2018-08-02 11:49:32 +02:00
pigna74 9a48f67863 [CLA] international business hub signs Odoo's CCLA
Closes #26098
2018-08-01 17:02:08 +02:00
Lucas Perais (lpe) e17bc4eb37 [FIX] base: set currency on a new db
Open the web/database/manager and create a db with a country set.

The country of the first company will be set to the country set on the form

Before this commit, the currency was not set, eventhough it is a field
on res.country

After this commit, we also set the currency of the first company

opw 1869435
closes #26097
2018-08-01 14:40:39 +02:00
Lucas Perais (lpe) e35a972639 [FIX] web: kanban progressbar css fixup
fixup of dc253ff1c6
2018-08-01 14:24:54 +02:00
Lucas Perais (lpe) 17e50b745d [FIX] account_assets: fallback sell or dispose button
Create an asset and confirm it.
Click on Sell or Dispose
The form view of the disposal move opens

With the breadcrums, back to the asset
Click again on sell or dispose

Before this commit, literally nothing happens
This is because there is no more business to do

After this commit, in the case there is no business to do
we fallback onto the smartbutton's action

OPW 1864318
closes #26086
2018-08-01 14:16:21 +02:00
Christophe Simonis f9e0f6663f [MERGE] forward port branch saas-15 up to c2f220f977 2018-08-01 12:49:01 +02:00
Christophe Simonis c2f220f977 [MERGE] forward port branch saas-14 up to 7836c41763 2018-08-01 12:06:06 +02:00
Christophe Simonis 7836c41763 [MERGE] forward port branch 10.0 up to e372ca5cd8 2018-08-01 11:52:45 +02:00
Lucas Perais (lpe) e372ca5cd8 [FIX] account: aged partner balance report consistent return
Before this commit, the function that computes the aged partner balance
could return a list instead of a dict if no partner were found

After this commit, we make the function's signature consistent
closes #26095
2018-08-01 11:23:31 +02:00
Adrian Torres 60353cf463 [FIX] server: do not restart if phoenix is True (#21209)
Before this commit, saving a file being watched by watchdog
(--dev=reload) with vim (and possibly other text editors) would
crash the server via a KeyboardInterrupt error.

This happens because vim, emacs cause multiple filesystem events to
happen when saving a single file, the FSWatcher registers these events
as multiple SIGHUPs which in turn calls restart() multiple times in a
very small amount of time which makes the KeyboardInterrupts completely
shut down the server

This is fixed by only calling restart() if odoo.phoenix is False, since
catching a SIGHUP sets it to true.

Fixes #21178

Special thanks to @odony for the help :)
2018-08-01 10:43:44 +02:00
Olivier Colson 1686ef8c04 Revert "[FIX] account: set 'multi' field to False for payments generated when choosing to register payment for multiple invoices with distinct partners"
This reverts commit 11a0dd58a7. It was made in wrong version.
2018-08-01 09:42:07 +02:00
Jothimani 06de947b6b [CLA] signature for jothimani-r
Closes #26079
2018-08-01 09:27:18 +02:00
Christophe Simonis cc0baa086a [FIX] base: adapt test expectation to python 3.7
Compare exception message to the exact one raised in all versions.
2018-07-31 20:31:46 +02:00
Christophe Simonis 8c81eaabe6 Revert "[FIX] models: make onchange return a smaller diff"
This reverts commit 2054b59285 which
already has been fixed multiple times [0].

However this change does not correctly handle successive onchange calls on
ony2many fields which alter existing rows.

i.e., in saas~11.4, an onchange has been added on move lines [1] in
order to create and/or update lines containing taxes amounts.
However, with diff-only onchange, a second call to onchange will discard
changes made by a first one as nothing change between the 2 calls.

Scenario: On an existing account.move, add a new credit line with a tax set.
The first onchange will update the tax line with new amount. Add a
second line (with debit amount balanced). The onchange will not change
the tax line, resulting as it value being reset to initial value. As a
result, the move is not balanced and cannot be saved.

[0] cd2ccc4110, 5e58ac16c3, 07023137cd
[1] d49ab568a2
2018-07-31 19:36:30 +02:00
Christophe Simonis 96de6756ab [MERGE] forward port branch saas-15 up to 42e5b322af 2018-07-31 19:11:33 +02:00
Christophe Simonis 42e5b322af [MERGE] forward port branch saas-14 up to 0265884608 2018-07-31 18:52:40 +02:00
Olivier Colson 11a0dd58a7 [FIX] account: set 'multi' field to False for payments generated when choosing to register payment for multiple invoices with distinct partners
This field is used by the multiple payment wizard; the payments it generates are always individual and should never have multi=True. Before this commit, they did, because of the values given in context when calling the payment wizard.
2018-07-31 17:16:47 +02:00
Christophe Simonis 0265884608 [MERGE] forward port branch 10.0 up to 65ad60665e 2018-07-31 17:03:04 +02:00
Holger Brunn 65ad60665e [FIX] base: fix users' groups assignation
Avoid sharing of users'groups when writing on multiple users.

When changing groups of multiple users, all implied groups were shared
between written users.

Oversight of new-api rewrite.

Fixes #26036
2018-07-31 16:22:26 +02:00
len-odoo e57a1a8e6f [FIX] web: fix 'drag and drop' test function to work in both directions
The 'drag and drop' function defined in test_utils should be aware of four
different cases, moving up or down, above or below another row.
We need an offset of one pixel for the function to work when moving down
(this is a case of broken symmetry because of <=)

Related to opw 1867049 regarding sequences of resequence moves.
2018-07-31 16:18:26 +02:00
Goffin Simon c75f4fbcd1 [FIX] stock: Source and Destination on pickings
Steps to reproduce the bug:

- Go on a picking with an operation type of type "vendor" (e.g. a receipt) :
the field source location appears while it should be the destination location.

- Go on a picking with an operation type of type "customer " (e.g. a delivery) :
the field destination location appears while it should be the source location.

opw:1869145
2018-07-31 15:07:53 +02:00
Goffin Simon e1da65841a [FIX] stock: Display issue on product categ
This text is not written at the right place and it's useless.
So it's confusing for the users.

opw:1870443
2018-07-31 15:04:03 +02:00
Can Tecim bf332e2e08 [FIX] purchase: P3-style super call
3869cdf7d8 merged a fix which used a
P3-style super call, which is not compatible with Python 2.

While 11.0 is not really exactly officially supported on Python 2,
we originally decided not to break compatibility unless there were
very good reasons to do so.
2018-07-31 10:05:30 +02:00
Goffin Simon 47acea1523 [FIX] website_sale_wishlist: Wrong displayed currency in the wishlist
Steps to reproduce:

1. Activate multi-currency and associate a price list "Other list" with secondary currency as an alternative for "Public Price List".

2. Enable the price list to be selectable on the website.

3. Enable wishlist functionality on Website module

4. Navigate to website without logging in

5. Add a product to the wishlist (with the default price list)

6. Switch price lists.

Bug:

The wrong currency was displayed in the wishlist for the new price.

PS: In function "compute_new_price", price_new = website_price

opw:1867314
2018-07-31 09:44:03 +02:00
Romain Derie e11908d429 [FIX] website_sale: _get_pl_partner_order
With 60300fc, people can use promo code on website.
But the condition leads to a side effect, if a partner has a pricelist set for
him, he will never be able to see the dropdown list of pricelist since he will
enter the else condition with show_visible set to true.

Now, user is able to see selectable pricelists.

opw-1869371
2018-07-31 09:25:26 +02:00
Lucas Perais (lpe) 93e71d181e [FIX] account: reconciliation widget: Don't loose pager on adding last line
Have a statement line with multiple pages of propositions
Go to the last page
Add everything

Before this commit, after clicking on the last item of the list,
a write-off creation was displayed, without any means to come back to the other
propositions

After this commit, we display the page before
2018-07-31 09:18:31 +02:00
Lucas Perais (lpe) aa7bc410f0 [FIX] account: reconciliation widget: empty line should open write off
In manual reconciliation, have an accound with no direct proposal.
An empty line should be present

Click on it

Before this commit, there was a traceback

After this commit, a write-off creation appears
2018-07-31 09:18:31 +02:00
Lucas Perais (lpe) ebca7c3d37 [FIX] account: reconciliation widget: remove prop to attain balance
In manual reconciliation (but probably automatic too)

Have 3 lines for one account
2 of them are balanced
the third is of an amount X

Add the three lines to the reconciliation
A write-off proposal of -X should appear

Now, remove the third line by clicking on it
Click on Reconcile

Before this commit, the values sent to the server were wrong, as the write-off
was still included

After this commit, we make sure we don't send lines that are not displayed
2018-07-31 09:18:31 +02:00
Lucas Perais (lpe) 862c245576 [FIX] account: default_get aml compute balance
Create an account.move, create a line, then add an item to start to add a second aml
The current balance of the move is put in debit (or credit) to help automatically making the second line

Save the move.
Edit the move
Delete a line
Add a new line

Before this commit, the balance was not correctly computed because the default_get did not compute
the balance on deleted lines
The move ended up with wrong unbalanced new lines

After this commit, the balance is computed with deleted lines taken into account
2018-07-31 09:18:31 +02:00
Nicolas Lempereur 5dc180a3ea [FIX] im_livechat: double click on :) => 1 message
Prevent sending multiple messages when multiple clicks on one feedback
icon.

opw-1863312
closes #26047
2018-07-30 17:03:57 +02:00