Commit Graph
110817 Commits
Author SHA1 Message Date
Olivier Dony fb31330451 [FIX] auth_signup: correct leftover from 6d16915d39
The /web/signup controller was also supposed to get the special frame
header, like all sign-in/up pages.
2018-07-26 23:48:58 +02:00
Christophe Simonis b8ab55319b [FIX] web: avoid traceback in case of failed login 2018-07-26 12:21:44 +02:00
Christophe Simonis ea53be492e [MERGE] forward port branch 10.0 up to f1ee633f26 2018-07-25 15:29:29 +02:00
Nicolas Lempereur f1ee633f26 [FIX] website_hr_recruitment: frontend creation ok
When creating a job position from the frontend, and we:

- are on the same language that the default website language,
- have the permission to write on ir.ui.view,

we have all conditions to adding branding used to edit a page.

But when creating a position by the frontend, we create a job that will
render this template:

 website_hr_recruitment.default_website_description

When we are in the above said condition, we will create a job position
that erroneously has the branding that should only be displayed on
website and removed when saving an edition.

This caused a lot of problem with the editor that would most often not
be able to edit the content.

In this commit, we use the "rendering_bundle" context key to prevent
branding.

opw-1868879
closes #25963
2018-07-25 12:01:05 +02:00
Christophe Simonis a34789c837 [MERGE] forward port branch 9.0 up to 2c5ec48f92 2018-07-25 11:09:30 +02:00
Christophe Simonis 2c5ec48f92 [FIX] http: only del existing attributes
Closes #25652
2018-07-25 11:01:07 +02:00
Lucas Perais (lpe) aa4ccef418 [FIX] account: fix planner extra features 2018-07-25 09:21:26 +02:00
Julien Machiels e9901d1422 [FIX] barcodes: barcodes working in button in dropdown
On mobile, some barcodes didn't trigger in the picking screens, notably
O-BTN.validate. This is due to the use of parent() to check if the
button is in a dropdown, as parent() only checks one DOM-level upwards.
The button being inside a <ul><li>, we need to check more levels than
one to pass the condition and trigger the button press.

By changing parent() to parents(), the entire chain will be checked, not
just one level, and the button press is correctly triggered.

opw-1860964
closes #25941
2018-07-24 14:45:57 +02:00
Jeremy Kersten f045186f23 [FIX] report: fix padding for ul in report pdf
Rendering in html was correct thanks to the webkit-padding-start 40px added
by the browser. But once printed with wkhtml, the padding was missing.

Now we force the padding manually.

This commit closes #7375
2018-07-23 17:02:09 +02:00
Christophe Simonis 9ee882564f [MERGE] forward port branch 10.0 up to 6e71cf8a71 2018-07-23 14:21:06 +02:00
Christophe Simonis 6e71cf8a71 [MERGE] forward port branch 9.0 up to af2e480e41 2018-07-23 13:41:04 +02:00
Christophe Simonis af2e480e41 [FIX] http: refresh request environment after authentication
This allow the `/web/session/authenticate` route to return correct
partner and company.

Closes #25652
2018-07-23 13:25:42 +02:00
Ivan Yelizariev 1e1d3ed9e6 [FIX] base: suggested default ACL should be safer
When there is no ACL for a model, the system emits a log with a sample
ACL entry that developers should consider adding. This proposed ACL
should be safe: a default read-only access for internal users
seems appropriate.

Closes #25919
2018-07-23 13:18:04 +02:00
Odoo Translation Bot 402aac89a7 [I18N] Update translation terms from Transifex 2018-07-22 00:27:21 +02:00
Ivan Yelizariev 592ee660a5 [FIX] doc: remove incorrect statement 2018-07-20 12:27:10 +02:00
Goffin Simon 67449ced66 [FIX] purchase: State 'bid' on PO doesn't exist
Since this commit: https://github.com/odoo/odoo/commit/cb01be235e73cf948418e41642d4906ff84906a6
the state 'bid' doesn't exist on model 'purchase.order'

With courtesy of @rim-odoo

opw:1867594
2018-07-19 11:28:32 +02:00
Lucas Perais (lpe) ee746b52cd [FIX] product: fallback onto name for product.partner_ref
Have a product with a partner A as a seller, without any description whatsoever

Do a vendor bill with partner A as the partner.

Add the product onto the lines

Before this commit, the description on the line was "False"

After this commit, we fallback onto the product name if no other reference is set

OPW 1865969
closes #25857
2018-07-19 09:25:33 +02:00
Lucas Perais (lpe) 1409421b26 [FIX] account: payment cashbasis' move posted once
Make an invoice with a line having a cashbasis tax
Make a payment at a future date compared to the invoice's date

Before this commit, the cashbasis move attempted to post many times
which could lead to errors when posting is forbidden
(in the case of the french localization)

After this commit, the cashbasis move is posted only once

OPW 1865179
closes #25832
2018-07-19 09:19:47 +02:00
Christophe Simonis 7f7b705236 [MERGE] forward port branch 10.0 up to 633a65d231 2018-07-17 16:36:29 +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
Christophe Simonis ed99894ac6 [MERGE] forward port branch 10.0 up to 13e321325b 2018-07-16 16:25:59 +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
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
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 7e44d8f6fc [I18N] Update translation terms from Transifex 2018-07-15 00:26:48 +02:00
Josse Colpaert 9e8f70e484 [FIX] hw_escpos: small fix to avoid error on throwing error 2018-07-13 13:45:13 +02:00
Alexis de Lattre 6f68beb0dc l10n_fr: add reconcile=True on several accounts 2018-07-13 09:46:43 +02:00
Christophe Simonis be9378709c [FIX] sale: correctly setup currency rates in tests 2018-07-12 20:03:47 +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 eb56e6dcb3 [MERGE] forward port branch 10.0 up to 755081cbf4 2018-07-12 14:07:08 +02:00
Lucas Perais (lpe) 755081cbf4 [FIX] account: reconciliation widget rounding
Set the rounding method to Round Globally

Create a tax A with rate = 1.1040 %
Create a bank statement with one line having amount = 1153.960

Go on to reconcile that bank statement

Reconcile with a new line on which the tax A applies
Create the write-off

Click on Reconcile

Before this commit, an error was thrown by the server (Move unbalanced)
This was because the amount of the write-off line sent by JS (which is the tax amount)
was 12.7397
The server though computes the taxes by forcing the rounding and gives off a tax amount of 12.74
Hence the error

After this commit, the JS will fetch the amount of the taxes by forcing the rounding there also
And the reconciliation process goes well

This fix is already present in v11.0 at 6fce298d70

OPW 1859939

closes #25733
2018-07-12 13:07:56 +02:00
Goffin Simon dad19a769a [FIX] sale: Price on SO not working with different uom
Steps to reproduce the bug:

- configuration on sale:
   - Unit of measure: Some products may be sold/purchased in different units of measure (Advanced)
   - Sale Price: Advaced pricing based on formulas (discounts, margins, rounding)
   - Discount: Allow discounts on sale order lines
- kg as the Reference UOM for weight
- create an uom 10 kg
   - Category: Weight
   - Type: Bigger...
   - Bigger ratio: 10.0
- create a product P
   - Sale price: 100
   - Unit of measure: kg
   - Purchase UOM: kg
- create a pricelist "My pricelist"
   - Discount policy: Show public price & discount to the customer
   - Items : All products - 10% discount
- create a SO with "My pricelist"
- create a SO line with P, the unit price is automatically 90 with 10 % of discount
- change the uom of the line with 10kg

Bug:

The unit price of the line didn't change and the discount on the line disappeared.

In function product_uom_change, the uom of the SO line has been set in the context
of the product(like in function product_id_change). So in funciton _get_display_price,
the function _get_real_price_currency must be called with the uom of product in the context.
In this way, the lst_price will be fetch on product with the right uom without any bad conversion
(because uom.id == product_uom with uom from the parameters and product_uom from the context).

But with function get_product_price_rule, no need to call this function with the uom in context as
it is already set in the product(check "if uom_id: ... else ..." in this function).

The same logic has been applied in function _onchange_discount

opw:186385
2018-07-12 11:45:15 +02:00
Christophe Simonis 1926b40212 [MERGE] forward port branch 10.0 up to 718a5b76b8 2018-07-12 11:29:22 +02:00
Christophe Simonis 718a5b76b8 [MERGE] forward port branch 9.0 up to 189e0088e0 2018-07-12 11:28:29 +02:00
Stéphane Bidoul (ACSONE) 189e0088e0 [FIX] account: preserve deactivated taxes on move lines
Similar to cd3f52ba10 that was made for invoices.

Was PR #25655. Courtesy of Stéphane Bidoul (ACSONE)
2018-07-11 16:56:59 +02:00
Christophe Simonis 12a97cc7ad [MERGE] forward port branch 9.0 up to 2d0621da05 2018-07-11 16:42:42 +02:00
Alexandre Moens 6e8f1fcc63 [FIX] Stock : deliveryslip report - prioritize partner_id (#25709)
Display the address  of the partner_id when available rather than using the partner id  of the movelines. Important when the partner  is changed after the movelines are created.

support ticket :  1857582
2018-07-11 14:43:33 +02:00
Luis González 2d0621da05 [CLA] fix date format of Vauxoo's agreement
According to the CLA signing instructions, the date of signature must be
expressed in the following form:
> `<date>`: current date in the form `YYYY-MM-DD`

However, the date was wrongly expressed as "9-2-2015". That date not
only was following an incorrect format, but also it was ambiguous,
because it was not clear if the format was following M-D-YYYY or
D-M-YYYY (the latter one being the case).

This fixes the format, so it now fits the required one.

Closes #25665
2018-07-10 17:35:09 +02:00
Martin Trigaux 00a55f4428 [FIX] service: properly invalidate session of deteled users
If a user A deletes the res.users record of user B while B is connected,
the verification of the session token fails with a comparison of a boolean and
bytes values.
While the check should obviously fail, this patch gracefully inform the user B
its session has expired and redirect him to the login page.

Without the patch, the session is never invalidated in the user browser,
redirecting to a forbidden error page as long as the session has not been manually
cleared from the browser.

Fixes #25530
Closes #25654
Closes #25682

Cherry-Pick of 96f01c08f8
2018-07-10 16:03:23 +02:00
len-odoo ddb68eb1bb [FIX] crm: handle selection fields correctly while merging leads
When merging two or more leads, a traceback was generated when attempting
to merge some selection field, if any.

closes https://github.com/odoo/odoo/issues/25644

opw 1864870
2018-07-10 15:05:56 +02:00
Lucas Perais (lpe) cd5c10a47f [FIX] website_sale_delivery: we should be able to pay if the order only contains services
Two use cases must work:
Should hide payment AND display errors when order contains deliverable product

Should show payment AND not display errors when order contains only services (event tickets)

Linked OPW 1864744
Linked PR v11.0 #25679
closes #25692
2018-07-10 11:54:01 +02:00
Christophe Simonis 5d8076c842 [MERGE] forward port branch 10.0 up to 5e682451cb 2018-07-10 11:30:59 +02:00
Christophe Simonis 5e682451cb [MERGE] forward port branch 9.0 up to 8b25099aea 2018-07-10 11:25:27 +02:00
RomainLibert e08f999468 [FIX] calendar: add onchange on start_date and stop_date
When creating an event using the list view, no value is set in the
fields start and stop.

If selecting all day, we could only change the value of start_date and
stop_date which does not change the value in start or stop.

This makes it impossible to create an event from the list view.

This problem is not present in the calendar view since this view sets a
value in start and stop, and the start and stop are recomputed via the
inverse fields.

Closes #25680
2018-07-10 11:14:16 +02:00