Commit Graph
140847 Commits
Author SHA1 Message Date
Alexandre Kühn 66a0836974 [FIX] mail: odoobot onboarding canned_response_ids
Before this commit, when user follows odoobot chat onboarding and
sends a canned response at the canned response step, odoobot did
not validate the message with the canned response.

This is caused by RPC `message_post` that filters out values that
are not message fields, such as `canned_response_ids`.

This commit fixes the issue by adding a non-stored field
`canned_response_ids` to `mail.message`. This requires the reverse
relation too, `message_ids` in `mail.shortcodes` (= the model for
canned responses).

Task-Id 2058455

closes odoo/odoo#36411

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-09-04 13:03:20 +00:00
Alexandre Kühn e7aff236b8 [FIX] mail: no message attachment delete in discuss and chat window
Delete attachment from message makes only sense from chatter.

Task-Id 2058455
2019-09-04 10:29:07 +00:00
Odoo's Mergebot 3ec676be00 [IMP] hw_*: Remove "Shell=True" in subrpocess calls
In the IoT Box, most calls to subprocess used "Shell=True", which can
cause security issues.

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#36088

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-09-04 17:07:59 +02:00
Odoo's Mergebot 24c93d3f7f [IMP] Customer Display as IoT Device
Linked to odoo/enterprise#5266

Move all the logic that was inside hw_screen into an IoT Driver
in order to have consistency between devices.
Move the configuration of screen_url from the IoT Box form to
the IoT Device.
If an URL different than the default one is used, refresh the
page every minute.

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#36074

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-09-04 17:07:43 +02:00
Antoine Prieels 6cf30cb869 [IMP] hw_*: Remove "Shell=True" in subrpocess calls
In the IoT Box, most calls to subprocess used "Shell=True", which can
cause security issues.

TaskID: 1966417
2019-09-04 13:10:03 +00:00
Antoine Prieels 70006311d0 [IMP] hw_drivers, hw_posbox_homepage: get_ssid helper
Create a helper to get the ssid of the wifi to which the Box is
connected.
2019-09-04 13:10:03 +00:00
Antoine Prieels 5d0afddaf2 [FIX] point_of_sale: Too many display updates
Multiple updates were sent to the customer display for each
modification of the order lines.
2019-09-04 13:08:12 +00:00
Antoine Prieels c03d33b64a [IMP] point_of_sale: No new tab on url change
Change Firefox config to open external links in the active tab.
This avoids having multiple running tabs when changing the URL
showing on the Display device.
2019-09-04 13:08:12 +00:00
Antoine Prieels 98bebfbfa5 [IMP] point_of_sale: Per device screen_url
The screen URL is not linked to the Box anymore but to the Device.
We don't need to fetch a screen_url at the boot, it'll be done inside
each device.

TaskID: 1893493
2019-09-04 13:08:12 +00:00
Antoine Prieels f03026a3d7 [REF] hw_{drivers,screen}: Convert hw_screen into an IoT Driver
Move all the logic that was inside hw_screen into an IoT Driver
in order to have consistency between devices.

TaskID: 1933834
2019-09-04 13:08:10 +00:00
Antoine Prieels 75020a74e5 [REM] hw_posbox_homepage, hw_screen: remove unused code
Function get_hw_screen_message was still present but not called since commit 8b957b7e85
2019-09-04 13:07:35 +00:00
qdp-odoo f75fc4ed63 [FIX] account: journal items tree view not editable
Task 2008956

closes odoo/odoo#36205

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-04 09:00:03 +00:00
qdp-odoo 1b91747d05 [FIX] account: fixed view_mode on specialized journal items tree view
removed form,kanban from view_mode on specialized journal items tree views

Task 2008956
2019-09-04 09:00:03 +00:00
qdp-odoo 1eb931f84b [IMP] account: better display name for journal entries
Task 2008956
2019-09-04 09:00:03 +00:00
wan 0a5955bff6 [IMP] account: improve list and search view of account move line
Task 2008956

* Remove the sequence from the default order of account.move.line as it
  is only needed in the list view of the invoice form view; add it
  there.
* Allow to order by date on the grouped list view of account.move.line by
  setting an aggregate function
2019-09-04 09:00:03 +00:00
wan 737eaf9333 [IMP] account: add searchpanel on account.account and account.move.line
Task 2008956

* Add the root of an account (first 2 digits/char) as a searchable model.
* Create a custom searchpanel for this account root on account.move.line
* Add the account_root searchpanel to the account.account view too.
2019-09-04 09:00:03 +00:00
Antoine Prieels 16c32f0c25 [FIX] hw_drivers: Kill MPD server on start
The MPD server was not correctly killed when the IoTBox started without
six payment terminal configured. A warning was displayed.

closes odoo/odoo#36415

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-09-04 11:58:48 +00:00
lejeune quentin fd32139b0d [FIX] point_of_sale: Fix to execute eftdvs file for MPD server
We have a traceback when we put a wrong terminal id for SIX because
MPD server can not execute the eftdvs file.

Now we change the permission for this file

closes odoo/odoo#36355

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-09-04 11:43:39 +00:00
lejeune quentin f03a6cc7d4 [FIX] hw_posbox_homepage: Fix dead link in IoT Box home page
In home page of IoT Box the link "Manual" send to a 404 page.
Now we send to IoT Box documentation

closes odoo/odoo#36354

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-09-04 11:48:48 +00:00
Odoo's Mergebot 0387cfc8c5 [IMP] hw_{drivers, posbox_homepage}: Automatic load of drivers
Automatically load the IoT Drivers when Odoo starts on the IoT Box or
when the connection to the Odoo instance is done.

Allow to deactivate the automatic load to avoid overriding
modifications made on the Box.

TaskID: 2009683

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#36073

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-09-04 13:52:36 +02:00
Jairo Llopis 34cbbff7b3 [IMP] sale: Show untaxed and tax totals in tree views
This is **very** useful for B2B customers. 😊

closes odoo/odoo#36366

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-09-04 09:24:50 +00:00
Thibault Delavallée 4af08fad6e [FIX] crm: allow (again) phone widget to display SMS sending icon
Phone widget enabling SMS capabilities on lead / opportunities form views
seems to be lost. Option of this widget has probably be removed by mistake
when merging lead and opportunity views.

Task 2060220 (testing SMS integration)

closes odoo/odoo#36404

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-04 08:35:16 +00:00
Thibault Delavallée 3d034dafc6 [FIX] test_mail: fix some ordering issues in tests
In resend wizard tests

In some cases tuple comparison of states seems to fail. Indeed order seems
to change in some cases depending on installation order. With this commit
we correctly check partner / notification status one by one, avoiding
to rely on order / set length that is not guaranteed.

In mail gateway tests

Add a specific order on name to be clearer about what we mean when fetching
users as a fallback, until better heuristic. Using name is sufficient as
we have no need to rely on complex partner display_name.

Task 2060220 (testing SMS integration)
2019-09-04 08:34:24 +00:00
Julien Mougenot eea560060a [FIX] web: list width should not be calculated when invisible
Before this commit, the width of the headers in a list were frozen
only when the list was seen, but the calculation of the width might have
happened while it was invisible (thus giving the headers 0px).

Now, the freeze AND the calculation only occur when the list is visible
and can actually be evaluated.

Task 2061848

closes odoo/odoo#36175

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-09-04 08:19:32 +00:00
Julien Mougenot 52bd5fa461 [FIX] web: list view: allow buttons width
Before this commit, when entering an empty editable list with buttons,
their width would be set to 0px.

Now, they are considered as fields and given a name, allowing the renderer
to give them their proper width (if any) or a default one.
2019-09-04 07:11:01 +00:00
Julien Mougenot 7329014796 [FIX] web: editable list: ignore empty headers
Before this commit :
- resize handles were all attached at the right side of the list
- empty columns were given a resize handle, causing them to be larger than expected

Now :
- resize handles are attached to their corresponding header
- only non-empty columns are given a resize handle

Fix 2060807
2019-09-04 07:11:01 +00:00
Julien Mougenot 5718861b91 [FIX] web: editable list: invisible list width computed on interraction
Before this commit, if an x2many was in an inactive tab of the notebook,
its column headers widths were all set to 0px

Now, inactive x2many lists do not compute their width until they are visible
and interracted with (e.g. add/delete a record, sort columns, etc.)

Fix 2060418
2019-09-04 07:11:01 +00:00
Antoine Prieels 772e375553 [IMP] hw_posbox_homepage: Hide clear drivers
When no server is set, it probably means that the Box is used in
Community and the user won't be able to redownload the drivers since
there is no connected server. We then hide the "Clear Drivers" button.
2019-09-03 13:53:19 +00:00
Antoine Prieels 2a7454ea6c [IMP] hw_{drivers, posbox_homepage}: Automatic load of drivers
Automatically load the IoT Drivers when Odoo starts on the IoT Box or
when the connection to the Odoo instance is done.

Allow to deactivate the automatic load to avoid overriding
modifications made on the Box.

TaskID: 2009683
2019-09-03 13:53:19 +00:00
6ddfe775a3 [FIX] sale: fix invoicing of orders with section line
This commit fixes an error being raised when it was attempted to create the invoice of a sales order containing a section line.

task-id: 2052537

closes odoo/odoo#36326

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>


Co-authored-by: Damien Bouvy <dbo@odoo.com>
Co-authored-by: Antoine Vandevenne <anv@odoo.com>
2019-09-03 12:15:17 +00:00
Lucas Perais (lpe) cbe04c4df1 [FIX] account_voucher: force receivable/payable on payment
Create a voucher in pay_now mode
set another account that the one of the partner
Validate

Before this commit, the automatic payment and payment entries
were done in the account receivable/payable of the partner
which means that the voucher and the payment were never reconciled

After this commit, the payment and its entries occur in the same
payable/receivable than the voucher's

OPW 2056240

closes odoo/odoo#36232

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-29 12:32:17 +00:00
odoo 25e881d629 [FIX] base: prevent error when no attachements and report edited with
studio

opw2062025

In some cases, when there is no attachment (on an invoice for example)
and reports have been modified with studio, the self.attachement value
is false and an error appears

closes odoo/odoo#36291

Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2019-08-30 14:57:09 +00:00
Goffin Simon b3c345cf28 [FIX] sale_purchase: Access rights error
Fine tuning of https://github.com/odoo/odoo/commit/6236ed1a5b138c5165929aa3f5c1d1f4f6aa061c#diff-2f6cca7f38255368e4a54b0a19406aa4

Steps to reproduce the bug:

- Install Sales and Purchase modules
- Create a user U with access rights to Sales
- Try to open an existing SO or try create one with U

Bug:

An access right error was raised because the non stored field purchase_line_count must be computed

PS: the compute_sudo had no effect on field purchase_line_count because it's a non stored field.

opw:2056746

closes odoo/odoo#36247

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-08-29 15:44:54 +00:00
Odoo Translation Bot 72fff6ae7e [I18N] Update translation terms from Transifex 2019-09-01 01:39:46 +02:00
Fanny He df85ddc28f [FIX] website_sale_digital: download file.extension when name has no extension
When selling a digital file on the web shop, if the file 'name'
has no extension (e.g. the pdf "Free Booklet"), the buyer
will download "Free Booklet" even when the mimetype is application/pdf).
This causes issues on Mac, as pdf files without extension are renamed
with .dms extensions.

We follow what is done in ir_http's binary_content for the extension management,
using the new one if provided in the name, then the original filename extension
if it exists, and we fallback on guessing it from the mimetype.

OPW 2057302

closes odoo/odoo#36294

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-08-30 14:29:09 +00:00
Christophe Simonis d61873ac4a [MERGE] forward port branch saas-15 up to 10d88083a0 2019-08-29 13:37:39 +02:00
Jairo Llopis 481ad586cc [FIX] website_blog: Saner crawler instructions
The fixes that this patch includes are:

- The tag URL for tags printed in short and expanded blog posts had no slug, thus producing a brand new URL. Now they have the slug.
- Any request landed without that slug is slugified with a 301 code, as with the rest of Odoo.
- The `<a>` elements in right column archives have now `rel="nofollow"`.
- The `<a>` elements in right column tag cloud, where more than 1 tag is used, have now `rel="nofollow"`.

closes odoo/odoo#30832

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-29 11:27:56 +00:00
Richard Mathot b294333e94 [FIX] doc: explanation for pg_path
opw-2060249

closes odoo/odoo#36223

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-08-29 10:44:17 +00:00
Christophe Simonis 10d88083a0 [MERGE] forward port branch saas-14 up to ca34ae4329 2019-08-29 12:16:44 +02:00
Christophe Simonis ca34ae4329 [MERGE] forward port branch 10.0 up to 7c99310b23 2019-08-29 12:14:47 +02:00
Christophe Simonis c40236eb16 [FIX] account: adapt test to new version
Oversight of previous forward-port.

closes odoo/odoo#36181

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-29 10:04:28 +00:00
Florimond Husquinet (fhu) 55d1c66c8e [FIX] mail: parse message with invalid html as content
Before this commit, when a message contains invalid HTML, it crashed
with error such as: "TypeError: Cannot read property 'childNodes' of
null".

This commit fixes the issue by wrapping the content of messages with
invalid HTML in a `<pre>` tag.

OPW-2048140

closes odoo/odoo#36196

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-08-29 08:19:57 +00:00
Joren Van Onder 3a2eee5c8f [FIX] website_blog: speed up loading blog posts when there are many
Doing filtered on all_post is problematic in case there are many
blog.post records (>5000 were observed). It will trigger prefetching
which will run the content fields through html_translate which can
take many seconds to complete.

Instead replace the filtered call with a more precise search domain.

opw-2060704, opw-2060706

closes odoo/odoo#36207

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-28 17:29:05 +00:00
Olivier Dony 0159d71ec1 [FIX] website_blog: encode URL for social sharing
Like in other places where we have social sharing buttons, when we pass
a URL or title as a parameter it needs to be properly encoded.

closes odoo/odoo#36197

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-28 14:26:36 +00:00
Juhil Somaiya d1ee54450a [FIX] web: dashboard_graph disappearing issue on kanban record reload
When we try to change the color of kanban, the kanban record is re-renders,
kanban record is replaced with kanban-box and subWidgets are re-rendered,
reset of all subWidgets are called which will re-render widget but it is not
rendered in DOM as DOM element is destroyed and hence  dashboard_graph widget
can not computed proper height of the canvas element and disappear

Call on_attach_callback after widget reset is called on kanban record, as widget
element is removed from DOM and new element is added in DOM so
on_attach_callback should be called again.

task-2036256

closes odoo/odoo#35254

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-08-28 12:04:59 +00:00
Lucas Perais (lpe) e9837fcc09 [FIX] purchase_stock: typo tax in anglosaxon
Have a product valued in real time
make a PO to a vendor with that product, with a tax
validate

Before this commit, it crashed because of a typo

After this commit, the invoice is validated

OPW 2061472

closes odoo/odoo#36216

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-29 09:05:27 +00:00
Nicolas Martinelli 6d8e5efa84 [FIX] purchase: default user_id on bill
On top of leading to AccessError in multi-company (if the PO was created
by OdooBot), it might also assign a user without Accounting rights to a
vendor bill.

This reverts commit 392f6f2b2b.

opw-2056061

closes odoo/odoo#36173

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-28 10:01:06 +00:00
Nans Lefebvre 3df5c5dd56 [FIX] product: filter out archived pricelists from candidate pricelists
Have a pricelist Pl set as property_product_pricelist on some partner Pa.
Archive Pl, so that the public user Pu use another pricelist Pl'.
Go to the shop, create some order.
The prices are obtained from Pl'.
Log in as Pa; prices are updated using Pl.
However since Pl is archived, it is not visible on the pricelist views,
so the end user cannot explain why the prices changed.

When the pricelist is archived, nothing is done regarding the ir.property
storing the partner/pricelist mapping, so the pricelist is retrieved as default
nonetheless.

We filter out the active pricelists when getting the property.

opw 1946476

co-authored with JKE-be

closes odoo/odoo#36389

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-09-03 14:24:58 +00:00
Nans Lefebvre 19b17365d7 [FIX] stock_landed_costs: do not (incorrectly) use float_compare to mean float_is_zero
Take a landed cost with an amount_total of 2464788.5
in a currency with no decimals, so precision_digits is 0.
Now let the sum of the lines 2464788.499999999.
Additionally, we have that 2464788.5 is rounded up to
2464789 and 2464788.499999999 is rounded down to 2464788.
So float_compare returns a nonzero value.
However, it turns out that the docstring of float_compare contains:

Warning: ``float_is_zero(value1-value2)`` is not equivalent to
``float_compare(value1,value2) == 0``

So the intended use was to use float_is_zero.

opw-2048388

closes odoo/odoo#36208

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-09-04 06:46:12 +00:00
Hardik Prajapati 80132ad9a6 [FIX] account: 'Auto-Validate' entries are not linked to it's reconcile model
'Journal Entries' stat button on 'Configuration/Accounting/Reconciliation Models'
do not consider entries which are automatically validated.

closes odoo/odoo#36169

Task: 2056926
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-08-28 09:06:14 +00:00