Commit Graph
116487 Commits
Author SHA1 Message Date
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
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
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
Christophe Simonis 650bc6419c [MERGE] forward port branch saas-14 up to eb56e6dcb3 2018-07-12 14:07:36 +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
Christophe Matthieu 6a5dc8bcd1 [FIX] mail: remove attachment feature in add followers modal
Before this fix, the attachments are don't save to the record and are
remove with the wizard. We can't add the attachments to mail.message
(like 'mail.compose.message') because it's auto_delete/unlink and the
attachments are removed before the recipient can read it.
2018-07-11 15:38:59 +02:00
Christophe Matthieu 50ab181762 [FIX] mail: add access_token for image from base64 and cid 2018-07-11 15:38:59 +02:00
Christophe Matthieu 3472a34e8a [FIX] mail: write all attachments only once
wrong indent.
2018-07-11 15:38:59 +02:00
Christophe Matthieu 0cf5987610 [FIX] web_editor: display record linked to the record when add followers 2018-07-11 15:38:59 +02:00
Christophe Matthieu f83f532237 [FIX] web_editor: send an image thumbnail for attachment link in mail
Before this fix attachmentThumbnailToLinkImg is not called for
style-inline options. The mail received does not have thumbnail and the
user can't click on the invisible link.

opw-1863659
2018-07-11 15:38:59 +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
Martin Trigaux 97dbb8c6af [I18N] l10n_*: correct bad %s
opw-1853119
2018-07-11 09:04:53 +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
gmarcon baf6b29d45 [FIX] web: build xls file with maximum size
An MS Excel file can have maximum 32767 characters

Fixes #25653 
Closes #25700 

https://support.office.com/en-us/article/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3
2018-07-10 16:25:04 +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
Alexandre Kühn 212ed85ac4 [FIX] mail: upload again a same file on the composer
Before this commit, it was not possible to upload again a file on the
browser from the composer, when it was added then removed from the attachments.

When a file is uploaded on the browser, it writes on a special input
some data to identify this file. In order to detect a new upload,
the code listens on the JQuery event `change` on this input. Since the
value of this input was not cleared after an attachment removal, the
user couldn't reupload the same file, because the value of the input
will be unchanged.

This commit solves this issue by clearing the special input when removing
an attachment, so that adding the same file again will trigger a `change`
on this input.
2018-07-10 15:30:30 +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
Goffin Simon 371a92fb30 [FIX] hr_timesheet: Removing task on a timesheet line
Steps to reproduce the bug:

- A product is configured as a service + invoicing policy as "Timesheet on task" + Create a task in an existing project.

- Create a SO with this product and confirm it.

- Go to the task, and create a timesheet on it, the delivered quantity on the SO is correctly updated.

- Now, go to the Timesheets app and remove the task from the analytic line.

Bug:

The Delivered quantity on the Sale Order was not updated.

PS: The case where so_line is in the values is already taken into account by the overwrite of
function write in addons/sale/models/analytic.py

But as task implies so line (as explained in addons/sale_timesheet/models/account.py in function _timesheet_preprocess),
the delivered qty of a so line must be recomputed when its task is modified.

opw:1864313
2018-07-10 13:52:31 +02:00
Martin Trigaux 96f01c08f8 [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
2018-07-10 13:49:41 +02:00
Christophe Simonis e354142ce7 [MERGE] forward port branch saas-15 up to c22e479246 2018-07-10 13:21:06 +02:00
Christophe Simonis c22e479246 [MERGE] forward port branch saas-14 up to 5d8076c842 2018-07-10 12:22:55 +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
Lucas Perais (lpe) 7384401e63 [FIX] website_sale_delivery: we shouldn't be able to pay if there is no delivery method
Have some delivery method that do not apply to the country of the customer

Before this commit, the customer could access the Pay now button and confirm the sale

In v10.0 this was impossible as the retrieval of errors in python wiped out the variables that would
make the xml element of the payment not to render
In v11.0 this has changed in a more modular manner

After this commit, we hide the element in html.

OPW 1864744

Two use cases are dealt with:
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 v10.0 PR #25692
closes #25679
2018-07-10 11:51:00 +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
Martin Trigaux 24e01664d4 [IMP] doc: add javascript example
Document changes like b87a95b6d6
2018-07-10 10:03:43 +02:00
Andreas Perhab 8b25099aea [FIX] auth_oauth: validate db against db_filter 2018-07-09 18:55:11 +02:00
Florent de Labarre 95990a31b4 [FIX] ir.autovacuum: should be executed by the admin
Closes #23453
2018-07-09 18:55:10 +02:00
Nicolas Lempereur 940246f583 [FIX] web: remove Work+Sans online font import
The Work+Sans font of google fonts was hotlinked and available in
reports since saas-14's 3d04e448.

There does not seem to be a reason to do it and:

- hotlinking may add resources usage / processing time,

- server need outside internet access or the font doesn't load,

- it has been reported to cause the header/footer of some pages to
  disappear, probably because of a problem with loading the content in
  a given delay to render it.

- it was always loaded for report, even if used only once among all the
  reports of Odoo

For these reasons, this commit removes the hotlinking of this font.

The ISR report of l10n_ch that used this font will thus fall back on
'Verdana', 'Geneva' then the default sans-serif font which doesn't
seem to be a drawback over 'Work Sans' font.

If at one time we should reintroduce it, it should be contained in the
given report and possibly have the font locally and not externally.

opw-1861368
closes #25683
2018-07-09 15:56:48 +02:00
Lucas Perais (lpe) c288830409 [FIX] website_gengo: adapt JS to v11 editor
Before this commit, the widgets of website_gengo were not adapted to the new translate and web editor

After this commit, they are adapted

Although, gengo_sandbox of res.config would need to be redefined as related to company_id.gengo_sandbox. It has been done in saas-11.2

OPW 1862013
closes #25647
2018-07-09 15:34:34 +02:00
Martin Trigaux dc0914b8a5 [FIX] web: allow getting session_info as non-authenticated
The call to /web/session/authenticate should return an empty session_info
in case of wrong login/password.
It was producing a traceback (due to self.ensure_one() and search)
Introduced at d1cd293ece and fdb250942

Fixes #24071
2018-07-09 13:35:14 +02:00
Lucas Perais (lpe) 5fc392e34a [FIX] account: revert reconciled payment with exchange difference entry
Company is in USD
Do an invoice in EUR with a specific rate (and post it)
Do a payment on this invoice with another rate (and post it)

revert the payment's move

Before this commit, the move_lines of the original/reverted move pair were not reconciled
to one another
This could cause problems in some reports (aged reports for example)

After this commit, the lines in the original/revert move pair are reconciled
provided that they *can* be reconciled
Which is either belonging to a reconciliable account, or to an account of type liquidity

OPW 1861273
closes #25592
2018-07-09 10:07:36 +02:00
Lucas Perais (lpe) 42e74aae51 [FIX] account: revert reconciled payment with exchange difference entry
This is essentially a backport of 7544c22de9
and
4f40c9da7b

Company is in USD
Do an invoice in EUR with a specific rate (and post it)
Do a payment on this invoice with another rate (and post it)

revert the payment's move

Before this commit, the move_lines of the original/reverted move pair were not reconciled
to one another
This could cause problems in some reports (aged reports for example)

After this commit, the lines in the original/revert move pair are reconciled
provided that they *can* be reconciled
Which is either belonging to a reconciliable account, or to an account of type liquidity

OPW 1861273
closes #25600
2018-07-09 10:05:18 +02:00
Lucas Perais (lpe) 67b5cde62b [FIX] point_of_sale: new session should open with user as cashier
Open a new session with user A, the cashier is A.
Close the session and post the entries.
The responsible for the session is user A and the salesman on the sale order is A.

Then log in to the database with user B.
Open a new session on the same pos.

Before this commit, the cashier on the second session was A

After this commit, the cashier on the second session is B

OPW 1864207
closes #25628
2018-07-09 09:04:20 +02:00
Odoo Translation Bot d6a71fae93 [I18N] Update translation terms from Transifex 2018-07-08 04:09:36 +02:00