Commit Graph
104649 Commits
Author SHA1 Message Date
qsm-odoo d32e275ad1 [FIX] web: force red color for invalid form elements
When an input is saved with an invalid value, it gets the
`o_form_invalid` class. This makes the border red. In enterprise, there
was a bug as required inputs have also a different border color and the
rule was more important. Unfortunately there is no avoiding
the !important rule here. Indeed, other solutions would require to make
more rules in enterprise or to change the order of files (which would
create many problems).
2017-03-14 14:47:17 +01:00
Martin Geubelle 5b4f7c13f3 [FIX] web_kanban: use string when group by selection
In the kanban view, if we try to group by a selection field that is
not defined in the arch, the key will be used as column name (instead
of the string).

A fix has already been pushed to load all the fields in this case
(see 0e6eb96) but these fields were not correctly used in this
particular case.
2017-03-14 13:23:44 +01:00
Christophe Simonis 2e972578b9 [MERGE] forward port branch 9.0 up to 73d6f9023a 2017-03-13 14:49:12 +01:00
Christophe Simonis 73d6f9023a [MERGE] forward port branch saas-6 up to 31474efec2 2017-03-13 13:53:54 +01:00
Christophe Simonis 31474efec2 [MERGE] forward port branch 8.0 up to 7a15e52cea 2017-03-13 13:38:04 +01:00
Christophe Simonis 7a15e52cea [FIX] base: check ir.ui.view recursion 2017-03-13 13:27:53 +01:00
Odoo Translation Bot 70cac4d474 [I18N] Update translation terms from Transifex 2017-03-12 02:54:51 +01:00
Odoo Translation Bot dcd78c2c39 [I18N] Update translation terms from Transifex 2017-03-12 00:30:59 +01:00
Denis Ledoux 4e95474ca1 [FIX] website_event_track: Tracks in the wrong room in the agenda
When setting an event tracks like this:
- Track 1, 10:00 to 10:30 Room A
- Track 2, 10:30 to 11:00 Room B
- Track 3, 11:00 to 11:30 Room A

In the agenda of the event, on the website, the Track 2
was displayed as in the Room A, while it should be in the Room B

opw-715480
2017-03-10 17:09:11 +01:00
Denis Ledoux 466e2b8c9f [FIX] mail: URL regex to make links clickable in chatter messages
The former URL took way too many steps to resolve
`www.odoo.com(odoo-odoo-odoo)`, more than 1 minute
according to the case, and it stucked the web client
(the entire browser actually),
and it ended matching the whole sentence as a link,
included `(odoo-odoo-odoo)`

This new regex is much simpler, resolve the above case,
and does not match `odoo-odoo-odoo` as part of the link

opw-715797
2017-03-10 17:09:11 +01:00
Nicolas Martinelli e6e6a8889f [FIX] account: typo
The context is created as a set, not a dict.

opw-716141
2017-03-10 10:28:23 +01:00
Goffin Simon e6d790e340 [FIX] account: _onchange_partner_id not matching fiscal position
When changing partner_id on an invoice, the fiscal positions with auto_apply=True,
must be checked to apply the right one.

To have the same behavior as in 10.0

Backport of this commit: 4b11e3e3a5

opw:715511
2017-03-09 16:21:37 +01:00
Goffin Simon bb0b4cb8f2 [FIX] fleet: return_action_to_open
The 'group_by' must be poped from the context in function return_action_to_open
because the act_window can call another model.

opw:710363
2017-03-09 13:54:33 +01:00
Denis Ledoux a8efeffbf2 [FIX] pos_mercury: support for Inernet Explorer / Edge
In the method `xml_node_to_string` in `qweb2.js`,
which is used when extending XML templates,
such as this extend of the template `PaymentScreen-Paymentlines`

the method `(new XMLSerializer()).serializeToString(node)`
magically escapes the double quotes `"` in Internet Explorer and Edge,
while this is not the case in other browsers,
therefore converting, for instance,
`this.removeAttr("class");`
to
`this.removeAttr(&quote;class&quote;);`
whhich made the rendering of the template fails.

As this method is quite critical, we do not dare
editing it to use an alternative to `XMLSerializer.serializeToString`
in a stable release

Instead, as a workaround, we just avoid the use of the double
quotes.

opw-708296
2017-03-08 18:07:07 +01:00
Christophe Simonis f9fa39a8c0 [FIX] board: correctly handle invalid actions
This may happen when a dashboard contain references to deleted actions.
2017-03-08 16:31:03 +01:00
Denis Ledoux 4d440caafd [FIX] mass_mailing: mailing users requires write on utm.source
Since revision
731356a155

and the fact `mail.mass_mailing.campaign` inherits (with s)
from `utm.source`, and the name of the mass mailing
is took from this `utm.source` linked to the mass mailing,
a mass mailing user requires the write access on the model `utm.source`
to be able to change the subject of a mass mailing.

As a side node, I notice there is no group applied on the
base `access_utm_source` access rule of the module UTM,
meaning a portal user can create `utm.source`.
I am not sure if this is wanted or not.

opw-710525
2017-03-08 12:52:10 +01:00
Denis Ledoux 8428910a74 [FIX] mail: format_date with falsy date
If the date passed is falsy, return
an empty string instead of crashing.

opw-704260
2017-03-08 12:52:10 +01:00
Nicolas Martinelli 218a21a37e [FIX] sale: do not run procurement twice
When procurements are created, they are automatically run. Avoid this
behavior, to run all procurements at the end of the process and used the
optimized JIT behavior.

opw-710007
2017-03-08 10:47:19 +01:00
Nicolas Lempereur 629d80c3c2 [FIX] mail: fix typo in attachment managment
Fix some dead code. This is a fallback for linking mail attachment with
its data. The issue was not reported since a long time since this just
disable a fallback which in my tests was not used anyway.

opw-710502
2017-03-07 18:05:53 +01:00
Christophe Simonis 0a2b99f985 [FIX] product_visible_discount: use defined variable
Oversight of a previous forward-port
2017-03-07 16:55:05 +01:00
Nicolas Martinelli 4ce309dfab [FIX] web: deactivate buttons
To reproduce:
- Get a slow connection, e.g. activate throttling in debug mode of the
  browser.
- Create an invoice with at least one tax.
- Change a price unit.
- Click on 'Save' then repeatedly on 'Validate'

The tax lines are duplicated.

The issue comes from two identical `write` calls whose purpose is to
delete the existing tax line and create a new tax line.

The two calls are issued by the click on 'Save' and the click on
'Validate', which triggers a 'Save' since it doesn't consider the form
as being saved yet.

There were several issues:
- The buttons from the statusbar were not disabled
- The buttons were enabled too soon. They should be enabled again when
  the form is reloaded, otherwise the call to 'Validate' doesn't
  consider the form saved.

This is an extension of commit
https://github.com/odoo/odoo/commit/bbbf3db581b5cf883

opw-710642
2017-03-07 11:57:14 +01:00
Nicolas Martinelli fb35132bc6 [FIX] sale_stock: incorrect return
- Create a SO with both 'service' and 'consu' products
- Depending on the order of the lines, the 'Delivered qty' might not be
  editable consistently.

This is because of an incorrect `return` statement in the
`_compute_qty_delivered_updateable` method.

opw-710561
2017-03-06 14:35:20 +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 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
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
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
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
Christophe Simonis 5c4744cd1f [MERGE] forward port branch 9.0 up to 5f9f4f4d9d 2017-03-01 14:07:15 +01:00
Christophe Simonis 5f9f4f4d9d [MERGE] forward port branch saas-6 up to 7eaa9f767a 2017-03-01 12:23:57 +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
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
Martin Trigaux 69e91f6a7c [FIX] base: recover thread from down postgresql
If postgresql database is temporarly down, the cron thread may fail.

The cursor creation fails when trying to connect to the server which leads to
the cron thread to die (uncatched exception) and will not restart when postgres
is back.

Fixes #15666
2017-02-28 18:00:00 +01:00
Florian da Costa e0392500dc [FIX] l10n_fr_fec: evaluation of unaffected earning line
Change the condition from
  [...] and debit != and credit != 0
to
  [...] and (debit != or credit != 0)

as at least one of debit or credit may have an unaffected value

Without this patch a past unpaid entry will not be included in the report.

Closes #15550
2017-02-27 17:00:28 +01:00
Florian da Costa 433f295b94 [FIX] l10n_fr_fec: unaffected earning sign and separator in FEC
The separator in the debit/credit columns of the report must contains coma
instead of dots for decimal separator (fr).
All the other columns (cf SQL query) contains coma but not this one.

Inverse the currency sign of the credit column. Otherwise the credit is negative
and sum of the balance is wrong (sum credit != debit)

Closes #15550
2017-02-27 17:00:28 +01:00
Isaac Gallart Bochons 48cebafdaf [FIX] mrp: call message_post separately
message_post accepts only one id

CLA signature for igallart done at #15625

Closes #15625
2017-02-27 12:26:42 +01:00
Goffin Simon d612daae71 [FIX] product_visible_discount: product_id_change
When computing the discount in product_id_change, before the fix

discount was equal to (new_list_price - line.price_unit) / new_list_price * 100

But line.price_unit was already rounded so the discount computed was not the
discount set in the pricelist due to rounding error.

opw:709704
2017-02-27 11:08:43 +01:00
Odoo Translation Bot 333e7d1f9e [I18N] Update translation terms from Transifex 2017-02-26 02:55:24 +01:00