Commit Graph
116530 Commits
Author SHA1 Message Date
Xavier Morel 9f8eae34d1 [FIX] undefined variables (potential nameerror)
Backport 9ec0455abc and
6a601fe6dc as they fixed various
possible NameError but did so in later sub-releases.
2018-07-19 13:37:10 +02:00
len-odoo bc12428e17 [FIX] web: format value of statinfo widget
The value of the statinfo widget is rendered by the qweb after a t-esc.
Say if the python rounding returned 14.0000000001
(supposed to be a two digits precision number through the magic of floats)
then the statinfo widget would print it as-is.

We now format the value at assignation.

opw 1865426
2018-07-19 13:19:09 +02:00
Goffin Simon 487873f170 [FIX] purchase: Error when updating dropship order
Steps to reproduce the issue:

- change the demo user settings -> use Sales: User: All Documents only
- create a stockable product with dropship feature on and a supplier
- connect as the demo user
- create a sales order with this product
- confirm the order
- as the admin user, confirm the purchase order generated through dropship
- connect as the demo user
- open the confirmed SO
- add a line with this product
- save the SO

Bug:

An access rights error was raised.

opw:1866015
2018-07-19 11:12:09 +02:00
len-odoo 79ee0e2584 [FIX] web_editor: display a dialog if posting a translation fails
When editing a translation on the website, if the user copy/pastes directly in
the web editor, then the html formatting is also copied.
Since the translation matching takes the html code into account when matching
the translations, this breaks the pairing.
When trying to save, the backend function validating the new translation thus
fails and return a server error.
However nothing was done with this error, and the user just witnesses that
saving doesn't work (unless he opens the console to notice the rpc failure).

We now display an alert dialog that notifies which tranlation causes the error.

opw 1862784
2018-07-18 16:35:38 +02:00
Moises Lopez 27c017ad98 [FIX] requirements: improve python3.7 compatibility
Since af9d6b86a1 and
5a57c29ff2 , python3.7 can be used to run
Odoo. This commit ensures that python3.7 compatibles versions of gevent,
greenlet and lxml will be installed without breaking compatibility with
Debian Stretch packages versions when using the Debian packaged Python.

Closes #25841
2018-07-18 15:07:42 +02:00
qsm-odoo 2b470288f2 [FIX] portal, *: missing mobile menu toggler
* website

The mobile menu toggler only appeared when the 'website' app was
installed. This was a mistake which was made with portal split at
https://github.com/odoo/odoo/commit/c3c42658c529967f26c39f51b39059bf47078b57
2018-07-18 12:57:17 +02:00
Lucas Perais (lpe) 92fed4a51e [FIX] account: reconciliation widget: partial reconcile 2 inv 1 pay
Have two invoices
Make a bank statement with one line, which amount is:
Amount[Bank] < Amount[Inv1] + Amount[Inv2]
AND
Amount[Bank] > Amount[Inv1]

Click on on the reconcile button on the form view of the bank statement

On the reconciliation widget:
Click on the first invoice to fully reconcile it with the payment
Click on the second to partially reconcile it with the payment

Before this commit, there was no way to let the second invoice open
and partially reconciled.
The only possibility was to make a write-off

V10.0 allowed to to do such a flow

After this commit, this use case is dealt with again

OPW 1864689
closes #25721
2018-07-18 09:31:26 +02:00
Christophe Simonis 44b77d3702 [MERGE] forward port branch saas-15 up to 1de78253ff 2018-07-17 17:08:50 +02:00
Christophe Simonis 1de78253ff [MERGE] forward port branch saas-14 up to 7f7b705236 2018-07-17 16:37:07 +02:00
Christophe Simonis 7f7b705236 [MERGE] forward port branch 10.0 up to 633a65d231 2018-07-17 16:36:29 +02:00
Goffin Simon ae5c0b04c6 [FIX] l10n_in_hr_payroll: Printing Yearly Salary by Employee
Coding error.

opw:1866546
2018-07-17 16:13:51 +02:00
Christophe Simonis 633a65d231 [MERGE] forward port branch 9.0 up to e62e17d078 2018-07-17 16:11:20 +02:00
len-odoo d5baec40ab [FIX] web_forum: disallow tag editing of questions if karma is unsufficient
When editing his post, a user can modify the tags even if he doesn't have
sufficient karma to do so.
Since the backend raises an error, it sends the user to a 403 forbidden page.

opw 1866019
2018-07-17 16:02:01 +02:00
Christophe Simonis e62e17d078 [MERGE] forward port branch 8.0 up to 9e8f70e484 2018-07-17 15:45:25 +02:00
len-odoo a3fd6a2072 [FIX] web_forum: fix the comparison of tags ids
When checking if tags had changed, a missing .ids made it that a recordset was
compared to a set of ids (integers).
As a result, to make an edit the forum would always check that the user had
sufficent karma to retag, even if it was not needed.

opw 1866019
2018-07-17 15:27:35 +02:00
Sébastien Theys b6ed005e0a [IMP] doc: remove duplicate line
The same content is already there 2 lines above.

cherry-pick of 57676dc7d1
2018-07-17 15:14:28 +02:00
Christophe Simonis 4bd58029f4 [FIX] base: avoid duplicated translation entries
For records having multiple translated terms per field (like html fields),
it was possible to have duplicated entries when synchronizing existing
entries with new ones.
2018-07-17 14:39:32 +02:00
Martin Trigaux af9d6b86a1 [ADD] tools: add new 3.7 opcodes
Python 3.7 introduced two new opcodes LOAD_METHOD and CALL_METHOD.
https://docs.python.org/3/whatsnew/3.7.html#cpython-bytecode-changes
https://bugs.python.org/issue26110

Basic QWeb rendering was failing on operations like
      request.csrf_token()
ValueError: forbidden opcode(s) in 'request.csrf_token()': LOAD_METHOD, CALL_METHOD

Closes #25783
2018-07-17 13:42:50 +02:00
Martin Trigaux 5a57c29ff2 [FIX] base: do not use async reserved keyword
In python 3.7, async is a reserved keyword.
Using it in a method signature produces a syntax error.
Replace by an argument async_load and catch the previous calls in a kw for
backward compatibility.
Log a warning on public methods.

The **kw can be removed in v12 and officially deprecate the 'async' parameter.

Fixes #25578
Closes #25783
2018-07-17 13:25:33 +02:00
Akim Juillerat 5705e3e5d2 [FIX] website_event: correct inverse method
To work on multiple records at the same time.
Worked on a recordset but left some `self` calls.

Closes #25788
2018-07-17 11:56:39 +02:00
Wolfgang Taferner e239cd810f [FIX] stock: comparing apples and oranges it is for category_id
We need to split this magical one-liner in order to not compare apples
and oranges.

opw:1865614
2018-07-17 11:28:13 +02:00
Joren Van Onder 32f5b8c034 [FIX] point_of_sale: support non-company currencies
Multiple currencies in the same POS have never been
supported. However, before ac89783d2f it
was possible to load a POS with a currency different from the
company's currency through the sales journal.

This re-introduces that option by manually converting to the default
pricelist currency if it's different from the company currency.

The currency conversion implemented here is based on (and should be
identical to) _convert on res.currency.

opw-1863047
2018-07-17 11:01:12 +02:00
Goffin Simon eb2f104e44 [FIX] stock_account: Automated FIFO error on MO
When trying to click on "Mark as Done" on a MO with raw materials in a category
with automated fifo valuation, it raised in some a case (in function called
"_prepare_account_move_line")  a user error saying:

"The cost of the product P is currently equal to 0. Change the cost or the
configuration of your product to avoid an incorrect valuation"

This problem coming from the fact that in some cases, self.price_unit was
equal to 1.04166666666667e-06 instead of 0

opw:1862153, 1866692
2018-07-17 10:20:12 +02:00
Christophe Simonis 3656999f5e [MERGE] forward port branch saas-15 up to f0e280e5eb 2018-07-16 17:53:02 +02:00
Christophe Simonis f0e280e5eb [MERGE] forward port branch saas-14 up to ed99894ac6 2018-07-16 16:40:46 +02:00
Christophe Simonis ed99894ac6 [MERGE] forward port branch 10.0 up to 13e321325b 2018-07-16 16:25:59 +02:00
Martin Trigaux 095e8bd7b1 [FIX] doc: remove duplicated section
Was already present in the Internationalisation section
2018-07-16 16:07:25 +02:00
Christophe Simonis 13e321325b [MERGE] forward port branch 9.0 up to 476207e9a4 2018-07-16 15:41:27 +02:00
Lucas Perais (lpe) c8c5bc2c1b [FIX] account: test: prevent aged report to crash on july, 16th and after
Before this commit, the test aged report crashed on date Year/07/16 (and probably after, too) because:
- we create a partial reconcile today (create_date = Year/07/16)  when making the payment to the invoice
- the report date is set as Year/07/15, so, the partial reconciliation, if tested after that date, always appears in another period,
which is not the use case we test, hence the crash of the test

After this commit, we force the create date of the partial reconciliation to *before* the report is called,
thus, no error occurs

closes #25785
2018-07-16 15:22:05 +02:00
rwfnf ef8f16feb2 [CLA] signature for rwfnf
Done at #25776
2018-07-16 13:45:36 +02:00
Goffin Simon 943e45ba3d [FIX] sale_stock: float division by zero
In some case, qty_delivered can be equal to 0

opw:1863726
2018-07-16 09:20:39 +02:00
Hbto [ Vauxoo ] df14b387e4 [IMP] l10n_mx: new tag for non-creditable taxes
Adding a new tag to allow the reporting of non-creditable taxes, in enterprise PR https://github.com/odoo/enterprise/pull/2273

Was PR #25198
2018-07-16 09:13:31 +02:00
len-odoo 02afc0e0aa [FIX] web: groupby product on package types triggers a js error
On a database where many modules are installed (e.g.  runbot all), with
the option "manage available packaging options per products", doing a groupby
"product" on the "package type" list view triggers a js error.
It comes from the fact that the fixed_group variable contains a "length"
attribute; the _().each function uses this to determine (erroneously)
that the object is an array.
It thus uses fixed_group[0] to get an undefined, and then tries to access
a method of undefined.

We replace the each by a simple js loop.

opw 1863576
2018-07-16 08:47:06 +02:00
Odoo Translation Bot 67279c87f8 [I18N] Update translation terms from Transifex 2018-07-15 04:08:55 +02:00
Odoo Translation Bot 7e44d8f6fc [I18N] Update translation terms from Transifex 2018-07-15 00:26:48 +02:00
Josse Colpaert 9903e7ae30 [FIX] hw_posbox_homepage: update posbox version
Image uploaded in nightly master repo
2018-07-13 17:46:12 +02:00
lejeune quentin 9a3b0d70be [FIX] point_of_sale : fix popup for bad VAT number
When an error occured server side, it was not properly displayed to the user.
A popup with "Your Internet connection is probably down." appeared and behing
it, a second, unstyled error contained the real error message.

Prevent the server error to be displayed.
Switch the order of parameters, the error data is contained in the first
argument (to be able to diplay the real error).

Fixes #25446
Closes #25753
2018-07-13 15:23:09 +02:00
Josse Colpaert 7d34f0218b [IMP] point_of_sale: posbox upgrade to stretch / python3
- transform odoo.py -> odoo-bin / recent branches + pip3 packages
- deactivate wpa_supplicant when starting dhcpcd automatically
- postgresql create clusters manually
- latest stretch raspbian image / add versatile-db.ptb for kernel-qemu
- ifconfig output change
- upgrade hw_-modules:
    hw_escpos: to python3
    hw_posbox_homepage: to v11: csrf does not work as it needs a database
    hw_posbox_upgrade: to python3 decode utf-8
    hw_scale: to python3
    hw_proxy: to python3

With the commit, the posbox will also work on the new Raspberry Pi 3b+
2018-07-13 15:10:12 +02:00
Olivier Dony e8821f0519 [DOC] setup/update: explain typical update procedure
+ fix some typos in install.rst
2018-07-13 14:32:24 +02:00
Josse Colpaert 9e8f70e484 [FIX] hw_escpos: small fix to avoid error on throwing error 2018-07-13 13:45:13 +02:00
Nicolas Lempereur 8c1c7ec23e [FIX] board: open form view of given action
It is possible in a dashboard item to open a form view of a record.

The view did not take into account the action used to display the item,
so for example: from a customer invoice clicking on a record would
display the "Vendor Bill" instead of "Customer Invoice" view.

With this fix, when a view is being loaded to be displayed in the
dashboard, we save a reference to a possible form view and if the form
view is displayed, we use this reference.

opw-1865454
closes #25718
2018-07-13 11:42:15 +02:00
Nicolas Lempereur 05a00fa9d4 [FIX] product: variant num w/o prefetch pollution
When getting:

- product_variant_count,
- sales_count,

of a product.product, we would pollute the records to be prefetched by
all the variants when counting the number of variants.

Thus if this happened before sales_count, we would possibly compute the
sales_count for up to 1000 records when it could have been needed for
just one.

By using `.with_prefetch()`, a recordset will have its own records to be
prefetched list and will not pollute the original one.

opw-1865111
fixes #25649
closes #23112 (PR with similar fix)
closes #25741
2018-07-13 10:52:33 +02:00
Alexis de Lattre 6f68beb0dc l10n_fr: add reconcile=True on several accounts 2018-07-13 09:46:43 +02:00
Christophe Simonis 6e6e3d4c96 [MERGE] forward port branch saas-15 up to 51d1fd6948 2018-07-12 21:19:02 +02:00
Christophe Simonis 51d1fd6948 [MERGE] forward port branch saas-14 up to be9378709c 2018-07-12 21:18:13 +02:00
Christophe Simonis be9378709c [FIX] sale: correctly setup currency rates in tests 2018-07-12 20:03:47 +02:00
qsm-odoo 7d63434680 [FIX] website, *: make datepicker properly behave in page property modal
* web_editor

Note: the <body/> element had to be explicitely 'position: relative;'
for the library to work.
2018-07-12 17:15:13 +02:00
Christophe Simonis 52e28c903c [MERGE] forward port branch saas-15 up to 650bc6419c 2018-07-12 16:06:19 +02:00
Martin Trigaux 476207e9a4 [FIX] point_of_sale: display traceback
Since ffda023295, the error is not 'OpenERP Server Error' but 'Odoo Server
Error'.
In case we change of name once again, check based on the name

Avoid "traceback not available" error in PoS when there is a traceback.
2018-07-12 15:47:47 +02:00
Christophe Simonis 650bc6419c [MERGE] forward port branch saas-14 up to eb56e6dcb3 2018-07-12 14:07:36 +02:00