Commit Graph
107426 Commits
Author SHA1 Message Date
Goffin Simon a7cd820fc1 [FIX] account: Duplicates a refund customer invoice
When clicking on button "Invoices"(below "Print") on a refund
customer invoice, it prints "Refund  + number". But when clicking
on button "Duplicates" it printed "Duplicate + number". Now it prints
" Duplicate refund + number" if the customer invoice is of type out_refund.

opw:708440
2017-03-07 12:06:06 +01:00
Martin Trigaux ee78aa7d6a [FIX] web: avoid undefined options
options is not mandatory, crashed when navigating with tabs
Complete 2bf6e69e
2017-03-07 11:24:23 +01:00
Goffin Simon 69d6c37456 [FIX] web: prepare_dropdown_selection
Steps to reproduce the bug:
1.Create a new company
2.Set a user in this company
3.Go to Helpdesk > All tickets > Create

It raised a traceback because stage_id was not defined

opw:710084
2017-03-07 00:35:58 +01:00
Denis Ledoux cde8668034 [FIX] web: IE <= 11.0 doesn't support ChildNode.remove
IE 11.0 doesn't support `Childnode.remove`:
http://caniuse.com/#feat=childnode-remove

As a workaround, we use `Node.removeChild`,
which is more widely supported.

opw-710617
2017-03-06 18:21:06 +01:00
Atte Isopuro 6458210250 [FIX] sale_stock: don't link groupless backorders to all sales
When a backorder is created from an outgoing picking, a message is posted,
linking to the related sale orders as source of the original picking.

If the initial picking was not created from a sale, the resulting backorder
group was `False`.
The domain ('procurement_group_id', '=', False) matches many unrelated
(e.g. unconfirmed) sale orders.

Avoid trying to find the origin SO for pickings with no SO

Closes #15693
2017-03-06 16:41:14 +01:00
Denis Ledoux a14cf34327 [FIX] im_livechat: Add the livechat on an external site
The file
`/web/static/src/js/services/session.js`
is not required for the livechat to works,
and with it it fails on external websites because it makes
RPC calls to the relative URLs:
`/web/webclient/bootstrap_translations`
`/web/webclient/qweb`

opw-710049
Closes #15518
2017-03-06 16:37:35 +01:00
Nicolas Lempereur 2d10c5eb43 [FIX] website: use public user for sitemap making (up to s14)
The current user was used to generate the sitemap. So if a user with
more permissions than `public user` goes on the sitemap, he could
generate it (if he is the first to see it or the last generation was
more than 12 hours ago (by default)) and have pages unavailables for
a user with lower permission in the sitemap (until the sitemap is
generated again).

The issue was solved in 8.0 with d08facdcb but was introduced back in
10.0 with fd09ddb6f because the `uid` argument was dropped from
`generate` method on `ModelConverter`.

From 10.0 up to saas-14 the fix introduced is to use a `use_public_user`
key in `request.context` but in master we will keep the fd09ddb6f fix
by adding uid to the `generate` method.

opw-708456

note: to forward-port only up to saas-14
2017-03-06 16:11:19 +01:00
Denis Ledoux 3d2841aac0 [FIX] crm: New / opportunity in the dashboard opens an opp form
Up to now, it opened the lead form view instead
of the opportunity form view.

Most-likely, a new / lead should be added to
the dashboard in addition to the new opp,
as this is the case with the view lead/opportunity
but it doesn't seem it was expected up to now
so I leave it like it is.

opw-710583
2017-03-06 16:03:54 +01:00
Jeremy Kersten 4edbd15845 [IMP] website_sale: disable zoom on xxs device by default
This is a cherry-pick of 44911af6fd

opw-710491
2017-03-06 14:24:49 +01:00
Denis Ledoux 1279f82e12 [FIX] sale: sales order email template without portal_sale
When disabling the customer portal
in the general settings
(or uninstalling the `portal_sale` module directly),
the model `sale.order` no longer has a method
`get_signup_url`, and it therefore leads
to the fail of the email template rendering which is
still referencing this method.

Besides, the `access_url` is actually used only if
`is_online` is True,
(see the `% if is_online:` few lines later)
and in this case `get_signup_url`
was not used at all.

Therefore, we can assume `None` is a good alternative,
as the resul of `get_signup_url` was actually no longer
used.

opw-710481
2017-03-06 13:28:14 +01:00
Christophe Simonis 6b3a80862c [MERGE] forward port branch saas-11 up to 503227838d 2017-03-06 13:23:38 +01:00
Christophe Simonis 503227838d [MERGE] forward port branch 9.0 up to eaddb7caff 2017-03-06 13:09:17 +01:00
Denis Ledoux eaddb7caff [FIX] uninstall: unlink of many2one fields having one2many dependencies
The revision
ea9ef7c39d
introduced a regression:
many2one fields having one2many depending on it declared before
the declaration of the many2one itself were not unlinked
during a module uninstall.

As a result, the column in the table was not dropped,
and the table itself was not deleted either, not even truncated.

Therefore, when you tried to reinstall the module, you had data
left.

The check of the one2many dependencies must not be performed
during an uninstall. Anyway, this wasn't blocking the uninstall
of the modules,
it was just preventing the field  to be deleted, that's all.

opw-710291
2017-03-06 13:02:39 +01:00
Christophe Simonis be0c9596c8 [MERGE] forward port branch 9.0 up to 8092ee8c6a 2017-03-06 12:21:27 +01:00
Denis Ledoux 8092ee8c6a [FIX] purchase: taxes in price difference accounting entry
Setting the taxes in the accounting move entries
is important for the taxes report.

When a price difference occures in a purchase
with a product set in a perpetual inventory valuation,
the taxes set on the price difference move line should be the same
than the move line from which this price difference
is computed. Otherwise, the taxes report
do not have the whole purchase amount

opw-710228
2017-03-06 11:42:18 +01:00
Christophe Simonis ea527cc3fc [MERGE] forward port branch saas-6 up to 9ff0eb0586 2017-03-06 11:29:04 +01:00
Christophe Simonis 9ff0eb0586 [MERGE] forward port branch 8.0 up to 1246680756 2017-03-06 11:24:16 +01:00
Denis Ledoux 8ecec2bfbb [FIX] payment_paypal: prevent the IPN feedback to return an HTTP error code
When you enable the IPN notifications in your Paypal account configuration,
the default IPN URL is mandatory.

You are therefore obliged to put the IPN feedback URL of Odoo
in this default URL, even if this is not used because
each transaction done by Odoo specifies the URL to which the IPN
notifications must be sent.

Because of this, if you use your Paypal account
for something else, e.g. Ebay, you receive
notifications of payments for these other transactions,
that have nothing to do with Odoo.

In such a case, Odoo returned an HTTP error status code (e.g. 500),
because Odoo couldn't find the given transactions, and
then Paypal sent emails to the Paypal owner
to tell the IPN feedback was failing. Eventually, after
several fails, Paypal automatically disabled the IPN
notifications of the given account.

With this revision, we now avoid to raise the Validation errors
in the case of the IPN feedback, and just logs it,
to avoid Paypal to sent emails to
the owner and to automatically disable the IPN notifications
if it receives transactions from other services than Odoo.

opw-702403
2017-03-06 10:37:49 +01:00
Odoo Translation Bot c0f0d49542 [I18N] Update translation terms from Transifex 2017-03-05 04:32:11 +01:00
Odoo Translation Bot 1246680756 [I18N] Update translation terms from Transifex 2017-03-05 02:55:35 +01:00
Odoo Translation Bot 1b6d91b5c3 [I18N] Update translation terms from Transifex 2017-03-05 00:30:41 +01:00
Denis Ledoux ec2929fbfc [FIX] website_sale: disable the checkout confirm button on submit
On the checkout page, the page loaded after clicking on the
confirm button can take a while, for instance
if you have delivery carrier API requests to perform
(Fedex, USPS, UPS, ...) in order to get
their price according to the shipping weigth
and destination.

As it took a while, the end user was therefore tempted to submit the form
again, multiple times, which caused the requests to the delivery
carriers API to be performed multiple times, and it was
monopolizing multiple workers and the overal performance of the
server was impacted. It also leaded to concurrent update due
to the fact the sale order was being updated multiple times.

opw-710963
2017-03-03 15:58:05 +01:00
amoyaux c0dffa3433 [FIX] Website_Sale: State / Province doesn't appear when needed.
Use case when it happens:
* Go to billing for a product in website
* Modify or create an address
* Select a country without state
* State field disappear
* Select a country with states
* State field doesn't appear -> Bug

If you confirm, it raises an error asking you to fill the state
field and this one reappear.

The bug come from this forward port 1ef4061e68

This fix removes :visible from the jquery selector on state tag selector
since the logic is different in version 10.

opw-707402
2017-03-03 15:38:11 +01:00
bluesoft83 3513151e57 [FIX] product: wrong default datetime
On model product.price.history the default value for datetime field was evaluated at server start

Closes #15707
2017-03-03 14:14:25 +01:00
bluesoft83 2bf6e69e28 [FIX] web: keep focus field when navigating with keyboard
When moving with keys up or down on editable list view, jumping of line was
bringing the cusor back to the first cell.
The cell focus is stored in the option dict (e.g. {'field_focus': 'name'}.
Previous code was discarding the content of the given option dict to create
a new one.

Closes #15703
2017-03-03 14:12:53 +01:00
Martin Trigaux 0c3659e14b [I18N] translation correction for nl_BE
Regional languages are not on Transifex
2017-03-03 11:39:31 +01:00
Denis Ledoux df5f0f2570 [FIX] sale: The order lines weight must change when the quantity change
This is a regression of
1cedcf6abb
and a following of
9a9720ac14

opw-709700
2017-03-03 10:57:46 +01:00
Leonardo Rochael Almeida 2b5e879957 [IMP] web: Enhance registry.js tests
Make sure we're really setting and getting registry values instead of
just `undefined` values.
2017-03-03 10:17:46 +01:00
Leonardo Rochael Almeida 6eb15a6263 [IMP] web: Remove tiny code duplication 2017-03-03 10:17:41 +01:00
Leonardo Rochael Almeida bf8cc11e7e [FIX] web: QUnit context in js tests
Previously, the context for `options.{before,after}Each()` functions was
isolated from the context created by the odoo `test` function, making
it impossible to save attributes in the test during
`options.beforeEach()` that are accessible from the test itself, or to
clear resources created in the test in `options.afterEach()`

Moreover, the odoo test infrastructure was set up completely inside the
test wrapper, after `options.beforeContext()` had already run, making
it impossible for `options.beforeContext()` to use this infrastructure.

Here we use the QUnit context directly in the test, but move the
initialization previously done in the test wrapper to a `beforeEach`
wrapper (and, symetrically, on `afterEach`), making it possible to use
the odoo infrastructure in the javascript test setup, including
declared section dependencies.
2017-03-03 10:17:33 +01:00
bluesoft83 2580a6d04d [CLA] signature for bluesoft83
Done at #15705
2017-03-03 08:15:06 +01:00
Denis Ledoux 9f62be8387 [FIX] point_of_sale: sale details datetime in user UTC and lang format
The time in the sales details were in the UTC timezone,
instead of the user timezone, which confused the user

Besides, the datetime was formatted in the database
format, rather than in the language format

opw-710290
2017-03-02 18:47:07 +01:00
Denis Ledoux 95d3263338 [FIX] web_editor: change of iframe URL on record loaded
When changing of record, through the pager or the breadcrumb, the URL of the iframe
must change, as the model and id of the record is included in the URL

This wasn't done before this revision, and it could
lead to an INTERNAL SERVER ERROR in case of a deletion
followed by the loading of another record: the URL
of the iframe was still set to the former record,
and this URL crashed as the record no longer existed.

e.g.
- Create a new mass mailing, subject 1, add a random block in the content then save
- From this newly created mass mailing, Create a new mass mailing
  (directly with the create button)
  Subject 2, add a random black in the content and save
- Delete the second mass mailing
- Return in the mass mailing kanban view through the breadcrumb
- Open the mass mailing 1
- You had an internel server error, due to the fact the URL of the iframe
  was still the one of the second mass mailing.

opw-710239
2017-03-02 17:59:22 +01:00
Denis Ledoux a9b8bbac48 [FIX] point_of_sale: re-print order invoice for pos users only
If a user has as access right the POS User only,
it wasn't possible for him to re-print the invoice of
a pos order, through the "re-print" button in the
"Extra Info" tab of the pos orders.

opw-710163
2017-03-02 15:16:19 +01:00
Denis Ledoux 28ea1bcb5a [FIX] product_visible_discount: recursive show discount
If a pricelist PL1 set with the discount policy
`Show discount in the sale order` was based on another
pricelist PL2 with the same discount policy,
the discount applied by the second pricelist PL2
was set directly in the price, rather to be displayed
as a discount.

e.g.
PL 1: 10% on all products, show discount
PL 2: 15% on all prices of the PL1 pricelist, show discount

The discount displayed on the sales order should be
100 − (100 × (1−0,15) × (1−0,10)) = 23.5%

And the unit price of the product must remain the initial
price of the product, not the discounted price.

opw-709708
2017-03-02 12:40:45 +01:00
Martin Trigaux 2d199ed460 [FIX] stock: do not compute unrelevant inventory quantity
The total quantity of an inventory only makes sense if the same product is
counted.
This commit avoids useless recompute of the field when a ligne is changed.
The trigger were missing meaning it was recomputed after any change, slowing
down already unefficiant large inventory.
2017-03-02 10:37:57 +01:00
Goffin Simon 2971ffb70e [FIX] website_slides: Unpublished slides not visible
The rules "Channel: public: published only" and "Slide: public: published only"
must also be applied on portal user.

The portal user doesnt have to be allowed to create or write on slide.slide
records(introduced by 51be5bb).

opw:708499
2017-03-02 09:45:15 +01:00
Christophe Simonis 2b8605c6e2 [FIX] google_drive: show icon via css instead of injecting html 2017-03-01 18:39:34 +01:00
Nicolas Lempereur 987b54fde3 [FIX] base: create user not from company_id=1
In new API conversion (7eab8e26d3) a SUPERUSER_ID was dropped hence
we could get an error instead of the default groups_id of a res.users (if
the user has no read permission for `default user`).

opw-687521
2017-03-01 18:28:11 +01:00
Goffin Simon 8c55e57c7f [FIX] product_margin: _compute_product_margin_fields_values
All the fields defined in model "product.product" from module product_margin
are computed and not stored with the same function which is _compute_product_margin_fields_values.
This function has a deprecated argument which is field_names and this agrument is only used in
function read_group overwritten in this module in model "product.product. This overwrite of
read_group uses a variable "fields_list" with almost all the fields defined in "product.product"
in this module (excepted: date_from, date_to and invoice_state which are read from the context).

Each time, the fields total_margin, expected_margin, total_margin_rate, expected_margin_rate,
date_from, date_to, invoice_state were needed, nothing was returned due to the empty argument
field_names passed to this method. For example, when opening product.margin.form.inherit form
view.

In old API, it works because the compute was called with the list of the fields and in new API, it is not the case.

Closes #15604
opw:709962
2017-03-01 15:50:56 +01:00
Goffin Simon 5d27b3d6c0 [FIX] hr_attendance: Wrong timezone
The timezones are already managed in the JS.
So on the attendance check in/out screen when a user clocked out
after 8 hrs he got a message saying that he has been in for more than 12 hrs.

opw:710161
2017-03-01 15:39:48 +01:00
Christophe Simonis 7abeace770 [MERGE] forward port branch saas-11 up to 5c4744cd1f 2017-03-01 15:17:55 +01:00
Christophe Simonis 5c4744cd1f [MERGE] forward port branch 9.0 up to 5f9f4f4d9d 2017-03-01 14:07:15 +01:00
Christophe Simonis 8efd51acd3 [FIX] website: check request existence before use 2017-03-01 13:07:57 +01:00
Christophe Simonis 5f9f4f4d9d [MERGE] forward port branch saas-6 up to 7eaa9f767a 2017-03-01 12:23:57 +01:00
Christophe Simonis 5655b43929 [FIX] base: clear cache through model instead of method
This allow cached method to be overwritten.
2017-03-01 12:21:11 +01:00
Christophe Simonis 7eaa9f767a [MERGE] forward port branch 8.0 up to 775022e01f 2017-03-01 11:26:31 +01:00
Odoo Translation Bot 775022e01f [I18N] Update translation terms from Transifex 2017-03-01 02:54:50 +01:00
Christophe Simonis 42de3f8e26 [FIX] website: use CDN for assets 2017-02-28 19:20:53 +01:00
Martin Trigaux 18fd9fe0a8 [FIX] server: avoid cron thread death
In case an exception (programming, out of memory or any other unexpected
failure), the cron_thread would crash and not recover until server restart.

Issue #15666 was an example of failure.

Courtesy of Nils Hamerlinck
2017-02-28 18:00:50 +01:00