Commit Graph
117156 Commits
Author SHA1 Message Date
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
Odoo Translation Bot 67279c87f8 [I18N] Update translation terms from Transifex 2018-07-15 04:08:55 +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
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
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 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
Martin Trigaux 97dbb8c6af [I18N] l10n_*: correct bad %s
opw-1853119
2018-07-11 09:04:53 +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
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
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
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
Martin Trigaux 24e01664d4 [IMP] doc: add javascript example
Document changes like b87a95b6d6
2018-07-10 10:03:43 +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
Odoo Translation Bot d6a71fae93 [I18N] Update translation terms from Transifex 2018-07-08 04:09:36 +02:00
Olivier Dony cf1ec5d316 [FIX] website_blog: fix typo in 83bfdb0d21 2018-07-06 16:55:31 +02:00
len-odoo dc5e0e5833 [FIX] base: allow to give a name attribute to the res.groups copy method
Before, the name given to the copy method was always 'the old name (copy)'
(even bypassing what might have been given to the default values dict).

opw 1862214
2018-07-06 14:47:51 +02:00
len-odoo a58ffb9e78 [FIX] mail: use ids parameter in the process_mail_queue method
If the parameter ids is given to the process_mail_queue method, it is supposed
to only process the ids it was given, not all mails.
Commit https://github.com/odoo/odoo/commit/4b122ad41d873febe288ab1f8c6cdc078ca2a479
replaced ids by self.ids, and thus default filter was always applied.

fix suggested by @suganthikarunanithi, Sodexis team

opw 1860484
2018-07-06 09:47:44 +02:00
len-odoo 6a3b2b94d0 [FIX] base: allow to give a name attribute to the res.partner copy method
Before, the name given to the copy method was always 'the old name (copy)'
(even bypassing what might have been given to the default values dict).

opw 1862214
2018-07-06 08:45:40 +02:00
len-odoo c8474c8ab4 [FIX] web: trigger a warning modal when deleting a line while editing in a one2many
In a one2many, if the user clicked the trash button while editing another line,
the row was not unselected.
Thus the modal was not triggered, which entailed that the currently edited line
was always saved.
In particular, it allowed to give empty values to required fields.

opw 1834346
2018-07-06 07:52:52 +02:00
Olivier Dony 896e3f4c1e [DOC] deploy: add brute-force detection advice, warn about DB manager 2018-07-05 17:21:40 +02:00
Christophe Simonis 84210074e5 [MERGE] forward port branch saas-15 up to b06c09db60 2018-07-05 16:23:47 +02:00
Martin Trigaux a978a3647a [FIX] mail: multi-company access to TZ
- Create 2 Companies A & B
- Set User B in Company B
- Record some `mail.activity` for User B on a lead belonging to Company
  B.
- With a manager user in Company A, go to Kanban view of leads and
  remove filters => all leads, including leads in Company B, are
  displayed

An access error occurs.

`read_progress_bar` method, tries to access the field `activity_state`
which is: `states = record.activity_ids.mapped('state')`. The state of
a `mail.activity` is using the tz of the partner. To read the
`activity_state` of a lead, one needs to access
`record.activity_ids.user_id.partner_id.tz`
=> multi-company security rules raised

opw: 1850984, 1859470
2018-07-05 15:29:34 +02:00
len-odoo 7764db7a34 [FIX] web: handle onchange on a on2many with an embedded one2many on multiple pages
Suppose there is a one2many field embedded in a one2many,
(say we are viewing record A with one2many field B itself with a one2many C).
Furthermore, there is a second page of the one2many field B.
If an onchange is applied on B, then the server replies with a 1 command for all
B records attached to the currently viewed object A.
This includes a list of commands [[5], [4, C_id]*] for each B record,
in particular B records that are on the second page.
Since they are on the second page, they might not have been fetched by the
frontend; in that case the corresponding C_ids are thus unknown.
As a consequence, on save the frontend sends a command 0 to create the records
for all unknown C_ids.
Since it doesn't have any value to give to the 0 command, the row creation
usually crash in the backend.

Another wrong behaviour is fixed at the same time: if the server sends an update
on the list of C ids with 4 commands.
In that case, if the record has not been prefetched, we have no way to know
if the list changed or not.

To solve this, when we receive the 4 commands by the server, we send back 4
commands.

coauthored by @aab-odoo

opw 1835936
2018-07-05 15:03:37 +02:00
Alexandre Kühn 7af09db878 [FIX] web: no concurrent reload on basic model
Before this commit, there was a traceback in the following scenario:

Let's have a kanban view with groupby and a domain.
If we clear the domain then clear the groupby, there could be a crash.

This crash occurs because when we clear the groupby, it performs a `reload`,
and assumes that the datapoint contains grouped data. However, if this
computation takes some time, it is possible to overwrite the datapoint so that
there is no longer grouped data.

This commit fixes the issue by enforcing at most 1 execution of the method
`reload` active at any time. Consequently, successive reloads operations are
now much slower.

Note that it uses the single non-reentrant mutex on the basic_model to enforce
this rule, which means:

  - No more concurrent `reload` and `save`.
  - If an execution having the mutex in `reload` come accross the same mutex,
    it is blocked forever. This is hopefully not the case at the moment,
    however a reentrant mutex should be considered in the future.
2018-07-05 14:04:33 +02:00
Nicolas Lempereur b27d009ab4 [FIX] barcodes: documentation in description
The barcodes modules had documentation only available on apps.odoo.com,
following a recent change, odoo modules are not displayed on
apps.odoo.com anymore.

Thus this commit merges the documentation onto the module description so
it is available on the module page.

opw-1846035
closes #25621
2018-07-05 13:00:28 +02:00
Romain Derie 21f1a593a1 [FIX] website: new content links not triggered
Clicking outside the new content options should close the overlay.
Every options are triggering a JS event (mostly opening a modal) that works
fine.

But the 'New Job offer' options is simply a href link which is not going
through anymore since there was a call to `preventDefault`.

opw-1860196
2018-07-05 12:42:01 +02:00
Shubham Johar 26d384ef61 [FIX] website: leave 'create screen' when click outside
The purpose of this commit is to hide the Create menu when the user click on
any area other than the link icons.

Note: It was already the case in V10.0 since the options were inside a modal.
      Natively bootstrap would close the modal when clicking outside of it.
      We lost that behavior while refactoring in V11.0 with 297297696 that
      replaced the modal by a pseudo-dropdown

opw-1860196
Closes #25389
2018-07-04 16:04:00 +02:00
Goffin Simon ab5fcb2965 [FIX]purchase: A duplicated shipment is not associated with the original PO
When duplicating a shipment, the shipment was not linked to the original PO.

opw:1854387
2018-07-04 11:42:41 +02:00
Maulik Raval 578edc0458 [CLA] signature for maulik-raval
Closes #25489
2018-07-04 10:08:44 +02:00
Lucas Perais (lpe) daedcd92e3 [FIX] web: mock fieldsViewGet don't delete raw attrs
Have a view with a field as:
<field name="stuck_in_the_middle" attrs="{'readonly': [('with_you', '=', False)]}"/>

Before this commit, the contents of attrs were parsed and merged into the modifiers
and the attrs attribute of the node was deleted
which might cause divergence between reality and tests

After this commit, the mock server does what the server does in this case

closes #25583
2018-07-04 09:28:04 +02:00
Cedric Snauwaert 775fbcda35 [FIX] account: fix select partner problem in reconciliation widget
Problem: create a bank statement with a line that has a positive amount
and a line that has a negative amount. Both line does not have a partner
Then click on reconcile to open the reconciliation widget, notice the
message stating that we have to select a partner or choose a counterpart.

Select a partner on both line, behavior is different for the line with
credit > 0, the message still says "select partner or choose counterpart"

This commit fixes this problem.
2018-07-03 13:42:49 +02:00
Florent de Labarre d3b42bd98f [FIX] account:with -0.0 amount_total it raised
Steps to reproduce the bug:

- Create an invoice with positive lines and negative lines and with a total equal to zero

Bug:

In some cases total amount is equal to -0.0 and it raised:
"You cannot validate an invoice with a negative total amount"

The field amount_total is a monetary field, so it's computed in the precision
of the currency of the invoice.

opw:1862439
2018-07-03 10:37:10 +02:00
Goffin Simon af36063de3 [FIX] web: Email attachment issue
Steps to reproduce the bug:

- Go on a SO and click on "Send by email"
- Remove the attachment and click on "Add an attachment"
- Choose an attachment A and remove it by clicking on the cross
- Click on "Add an attachment" and choose the attachment A

Bug:

The attachment didn't appear in the modal.

opw:1862482
2018-07-03 09:46:42 +02:00
Martin Trigaux 055a8828c4 [FIX] base: remove oudated filter
There is no reason to prevent creating a menu linked to a top menu
It does work to have only one parent level as a menu

Error reported during technical training
2018-07-02 15:47:49 +02:00
Goffin Simon de61d17252 [FIX] mrp: Adding a stock move line when creating a raw material
In stock.move.lots.form view, the field product_uom must be readonly like
the field product_uom_qty.

Fine tuning of this commit: 2ab3fa86fe

opw:1861321
2018-07-02 12:37:55 +02:00
Xavier Alt 21b2617d6f [FIX] account: show statement line info popover on reconciliation widget
This popover is the only way to get extra information like the note or the reference of the bank statement line.

Was PR #25543
2018-07-02 09:40:45 +02:00
Goffin Simon 2ab3fa86fe [FIX] mrp: Adding a stock move line when creating a raw material
In stock.move.lots.form view, the field product_uom must be readonly like
the field product_uom_qty.

When creating a raw material, it was not possible to add a stock move line
with a finished product for a product which is not tracked.

The consumed field must be readonly in mrp_production_form_view view to avoid
to send to the server wrong value manually set.

opw:1861321
2018-07-02 07:32:15 +02:00