Commit Graph
113904 Commits
Author SHA1 Message Date
Martin Geubelle 76ba56e60d [FIX] web: List: handle custom class on button
It should be possible to set a custom class on a button in the list view.

Closes #20620
2017-11-27 14:01:50 +01:00
Wolfgang Taferner 2fbbf0b1ff [FIX] sale_stock: cancelled moves should not block product modification 2017-11-27 12:50:10 +01:00
Yannick Tivisse d3efda05fd [FIX] (project_)pad: Don't create/copy pads on tasks that don't use them
Purpose
=======

Currently if a project doesn't use pads, the created and duplicated tasks will initialize/copy them. That could be a real issue when migrating customers if we create a task for all the existing issues, since the models have been merged.

Specification
=============

Avoid this falsy behavior. We're forced to crappy fix with a context key as the project.task model 'inherit' from pad.common.
2017-11-27 12:26:44 +01:00
Adrian Torres ac5ba4a2b0 [FIX] server: do not restart if phoenix is True (#21209)
Before this commit, saving a file being watched by watchdog
(--dev=reload) with vim (and possibly other text editors) would
crash the server via a KeyboardInterrupt error.

This happens because vim, emacs cause multiple filesystem events to
happen when saving a single file, the FSWatcher registers these events
as multiple SIGHUPs which in turn calls restart() multiple times in a
very small amount of time which makes the KeyboardInterrupts completely
shut down the server

This is fixed by only calling restart() if odoo.phoenix is False, since
catching a SIGHUP sets it to true.

Fixes #21178

Special thanks to @odony for the help :)
2017-11-27 11:12:27 +01:00
Xavier Morel b46830858f [FIX] web: excel export of binary fields
* In Python 3 xlwt apparently does not support writing bytes values ->
  try to decode assuming the value may be base64-encoded, this is more
  or less the behaviour for CSV exports.

  This will most likely not allow the export anyway as Excel cells are
  limited to 32k data characters, which accounting for base64
  expansion means ~24k worth of data, but that is a pre-existing
  issue.
* Also removed support for way outdated browsers from
  content_disposition: the Safari case is for Safari 5 (circa 2012)
  but versioning apparently changed since then and modern Safari
  report their "external" version number rather than the webkit
  version number => the current Safari reports version 11, and gets
  routed to the "does not support unicode file names", which is
  further bugged in Python 3 as it %s's bytes, leading to a resulting
  filename of e.g. `b'res.partner.csv'.csv` (with the prefix and
  quotes).
* The IE case is for IE8, which has long been unsupported by the web
  client.
2017-11-27 11:11:48 +01:00
Andrea Stirpe 63623cbdcb [FIX] sale: add force_save to make sure SO is correct
This commit implements the same fix already made in commit https://github.com/odoo/odoo/commit/a5ca63c83beafd9a060ac58d3b4c6a9a987b28df, but this time applied to the tree view of the sale order lines, instead of the form view.

Without this fix, if you add new lines in the sale order by using the tree view (instead of the form) you can get the following error:

```
Odoo Server Error - Validation Error
The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it
- creation/update: a mandatory field is not correctly set

[object with reference: product_id - product.id] 
```

The error is because the "product_id" value is not sent to the server. The "product_id" value is mandatory for sale order lines.

To reproduce the issue, you need to reproduce the following scenario:

- create a new sale order and save it
- edit the sale order; you should be able to edit inline the sale order lines (by the tree view)
- create a new product, being sure that the field 'product_id' is readonly (field 'product_updatable' is False).
- try save the sale order

See detailed explanation of the issue in description of commit https://github.com/odoo/odoo/commit/a5ca63c83beafd9a060ac58d3b4c6a9a987b28df.

PR  #21211
2017-11-27 08:58:25 +01:00
Odoo Translation Bot 31e574b153 [I18N] Update translation terms from Transifex 2017-11-26 04:25:05 +01:00
mreficent 4e9aa65c33 [FIX] stock_orderpoint_demo domain
Closes #21166
2017-11-24 15:42:05 +01:00
Pierre Masereel f59e96f014 [FIX] stock: packages and reservation
When the result packaged is changed on a move line, we should not change
the reservation of quants, because result_package is not related to
reservation, only package_id is used during the reservation.

We also changed the copy of move_line when we split a move line to put a
part of it in a package. By copying the move line and set the
product_uom_id in the default values of copy function, we mess the
reservation, because there is no quant reservation made for the move
line even if the move_line has a product_uom_qty. So we set the
product_uom_qty to 0 when copying the line, and then write the
product_uom_qty which will call the quant reservation

Fixes #20784
2017-11-24 15:34:53 +01:00
Christophe Monniez 72799e1f02 [FIX] project_timesheet_holidays: add default project and task on status
When using this module, the default behavior is to generate timesheet.
This timsheet is linked to a project and a task and there is a
constrain that verify that the task and project are set on model.
If another module (like l10n_fr_hr_payroll for example) tries to
create holidays.status without a project and task, it causes a
traceback.

This commit adds default values for these fields in order fullfill
the constrains.

Notice that the order of the imports in the __init__ is important
because the columns have to be created on the res.company before the
status is initialized.
2017-11-24 14:16:33 +01:00
Jordi Ballester Alomar eb6233ae44 [FIX] l10n_es: Account 129 as unaffected earnings
Was PR #21170. Courtesy of jbeficent
2017-11-24 13:16:57 +01:00
Nicolas Martinelli f347865161 [FIX] base_import_module: decoding error
In P3, `url_path` is already decoded in UTF-8, and therefore cannot be
decoded.

opw-783978
Closes #20912
2017-11-24 08:01:28 +01:00
Arnold Moyaux b2f6814160 [FIX] mrp: Update quantity traceback
Usacase to reproduce:
- Plan MO with 2 unit to produce.
- Produce 1 unit
- Update the quantity to 1
-> Traceback

active_move_lot_ids should have been changed to
active_move_line_ids during the forward port to 11.0
from this commit d62b307597
2017-11-23 17:09:58 +01:00
Arnold Moyaux 1a125f765e [FIX] mrp: use reserved SN for quality steps.
Use case to reproduce:
- Create a BOM with a component product tracked by SN
- Create a MO for this product and reserve it.
- Plan WO and process it.
- Register the same lot than the reserved one.
-> Error message: you can't use twice the same serial number

It happens because WO use temporary move line that should not
be considered as a real object. However it exists is a constraint
that trigger if two move lines share the same SN for the same product.
It's a wanted behavior that a real move line share the same SN that
temporary move lines.

This commit prevent real and false move lines comparaison.
2017-11-23 17:09:48 +01:00
Nicolas Martinelli 3e44ceb927 [FIX] fleet: typo
opw-783760
2017-11-23 10:39:47 +01:00
Victor Tabuenca Calvo edd23afb70 [FIX] pos_cache: P3 compatibility 2017-11-22 15:25:11 -08:00
Victor Tabuenca Calvo c3ce1d4f13 [FIX] pos_cache: Adapt JS code to ac89783d2f.
Otherwise, when rendering the 'Product' template it crashes when calling
the 'get_price' method.

Indeed, we need to add products as a Product model instead of as a plain
JS object.
2017-11-22 15:25:01 -08:00
Nicolas Martinelli fae85df8f7 [FIX] account: report alignment
Complement of b0a75b8fcd
Related to #21078
opw-782556
2017-11-22 17:51:14 +01:00
Wolfgang Taferner 712b008709 [IMP] stock: Give a clear error message
Use case(stock_picking.py):

- Sell a product which has tracking enabled
- Reserve the stock on the delivery order and assign to all stock.move.line a lot/serial, but leave the qty_done zero
- You will get an error message which is not correct

(stock_quant.py)

Give more information about the source of failure

opw:783828
2017-11-22 16:50:55 +01:00
Martin Geubelle aad9a1593f [FIX] web: correctly display modifiers in tooltip
Since odoo/odoo@da136d8 the modifiers in the widget attrs are parsed.
`stringify` thus needs be to used when displaying them in the debug tooltip (to
avoid to display [Object object]).
2017-11-22 16:47:29 +01:00
Martin Trigaux b0a75b8fcd [FIX] sale: correctly align the sale report
Same as purchase order report

Courtesy of Graeme Gellatly
Fixes #21078
2017-11-22 15:03:36 +01:00
Alexandre Kühn 732f176fe1 [FIX] web: readonly monetary field onchange currency
Before this fix:
    A readonly monetary field was not updating
    its currency symbol when selecting another currency.

Scenario:
    1. Activate multi-currency with $ (default) and €
    2. In hr_expense, go to My Expenses to Submit
    3. Create a new expense
    4. Select 'EUR' as currency
        => Unit Price is correctly updated with €, but not Total.

With this fix:
    Total displays the correct currency in edit mode.

Explanation:
    Monetary fields in readonly are relying on _formatValue() to
    display their value.
    _formatValue() uses this.formatOptions.currency, which stores
    the currency at loading of the field. We must update its value
    whenever there is a change of currency.

opw-783378
2017-11-22 14:16:00 +01:00
Goffin Simon f414b4227a [FIX] payment: Cannot add a new card from My Account portal
Steps to reproduce the bug:

Setup Authorize.net test account, then go to My Account from portal
and select "Manage your Payment Methods" and add a new card.

Bug:

It raised "Please fill all the inputs required."

opw:782716
2017-11-22 13:39:23 +01:00
Martin Geubelle 10175daeaf [FIX] web: add tooltips for buttons
The rev. odoo/odoo@952c17b added tooltips for buttons but only header buttons.
These tooltips can also be present on other buttons.

Closes #18790
2017-11-22 12:01:14 +01:00
Martin Geubelle 0593fd8954 [FIX] *: correctly display grouped dashboard
The rev. odoo/odoo@93bf26a modifies the way kanban record defines their size.
Kanban dashboards used to define a fixed size and reset it when grouping.
This fixed size should in fact only be set for ungrouped kanban as the column
size is fixed.
2017-11-21 16:41:09 +01:00
Arnold Moyaux 6b3fefcdbb [FIX] stock: use float tools in order to compare
float are used in quants thus we should use the
float utility tools in order to compare them.
2017-11-21 16:10:42 +01:00
Adrien Peiffer (ACSONE) 28cf1a046a [FIX]account: Selecting all the taxes on "account.reconcile.model"
As we can select all the taxes on bank statement reconciliation,
we apply this logic on account.reconcile.model

opw:779940
2017-11-21 15:25:58 +01:00
Martin Trigaux 454febcc7f [FIX] website_quote: typos
Courtesy of the translators
2017-11-21 11:35:18 +01:00
Adrian Torres 31ba0fb41b [FIX] ir_module_module: unlink uninstalled modules (#21111)
Before this revision, unlinking a module which has been uninstalled at
least once would raise an Exception because base_module_uninstall
contains a field model_id which is required. The unlink method of
ir_module_module would try to set this field to NULL which is of course
a constraint violation.

This is fixed by manually unlinking the respective base_module_uninstall
records before the unlinking of the ir_module_module record itself

Fixes #20720

DO NOT FORWARD-PORT
2017-11-21 11:13:24 +01:00
Yenthe V.G 0831610d6a [FIX] base: P3-compatible base64 decoding
Closes #21050
Closes #21021
2017-11-21 10:01:52 +01:00
Wolfgang Taferner 483c9bb7eb [FIX] portal: internal server error if name is boolean 2017-11-21 09:38:47 +01:00
Goffin Simon 40a9eca39e [IMP] account: Choosing a tax
It's more easy to select a tax without the widget selection.

opw:779940
2017-11-21 09:24:13 +01:00
Simon Lejeune 5e48193654 [FIX] purchase: _anglo_saxon_purchase_move_lines
Since the stock valuation refactoring, the price_unit on out move are
negatives. This brought an issue when _anglo_saxon_purchase_move_lines
tried to get the amount of the accounting entry in the stock received
account when validating a credit note for a return: as the price_unit
total resulted in 0, the entry was taken from the price difference
account.

Fixes #20840
opw 781836
2017-11-20 17:08:25 +01:00
Goffin Simon 2d5ae3c4ff [FIX] l10n_fr: TVA déd. s/ acq. intracommunautaire not set completely
tag_ids of TVA déd. s/ acq. intracommunautaire were not set in completely.

opw:779286
2017-11-20 16:48:47 +01:00
Christophe Simonis 7a976df0ec [IMP] web: also check for presence of QUnit.only in mobile suite 2017-11-20 16:46:27 +01:00
Christophe Monniez 1779fc123a [FIX] packages: include missing data for l10n_mx
When building the enterprise packages, some data files were ignored.
With this commit, the demo data and missing xslt files are packaged.

This fixes #21045 and fixes #21015
2017-11-20 14:53:56 +01:00
Wolfgang Taferner e5aea5e78f [FIX] sale: remove duplicated field in tree view 2017-11-20 13:47:03 +01:00
Pedro M. Baeza 92cb780051 [FIX] account/sale: remove unused Qweb variable
That variable seems a remaining piece of old code that now doesn't
have any use and makes to compute twice the tax table each time
you print the report.

Closes #20569
2017-11-20 10:28:06 +01:00
Odoo Translation Bot 08bdd06542 [I18N] Update translation terms from Transifex 2017-11-19 04:26:17 +01:00
Nicolas Lempereur ca3390fd05 [FIX] web_editor: forward-port typo on click
event variable has been renamed to ev in 11.0 and the code was
duplicated.
2017-11-17 14:13:58 +01:00
Christophe Simonis 179abc3c5e [MERGE] forward port branch saas-16 up to 11ff01af9b 2017-11-17 13:40:18 +01:00
Simon Lejeune 49c3f64369 [FIX] mrp: workorder: use the reserved move lines
Rev [1] was intended to be applied when changing the lot of the produced
product on the manufacturing order, somewhere along the line the code
was also called when setting the lot_id on the work order. When used in
this context, it broke the reconciliation between the reserved move
lines and the temporary move lines because a lot_produced_id was wrongly
set.

We fix the issue by only applying the code on prod move. This is done by
checking if the move is a production one through the stock move, because
there we are able to differenciate the raw material and production move,
not on the move line where production_id is always set.

[1] 471115b06a

Fixes #20964
2017-11-17 13:32:04 +01:00
Simon Lejeune 179071bb50 [FIX] stock_account: UOM handling
Error introduced by rev 48f4ce4afa
2017-11-17 13:32:04 +01:00
Alexandre Kühn 11ff01af9b [FIX] web: delete attribute on list view
Before this fix, when adding the attribute delete=0
on a listview, it was still possible to delete records
via the menu 'Delete' in the sidebar.

After this fix, this should not be possible to delete
records when delete=0.

The attribute delete was hard-coded to true, as there was
a traceback when it was set to false. It was simply due
to a misplaced closing brackets that was hiding an
assignment, which resulted to calling a method on undefined.
2017-11-17 12:34:25 +01:00
Alexandre Kühn 056fe805a1 [FIX] web: delete attribute on list view
Before this fix, when adding the attribute delete=0
on a listview, it was still possible to delete records
via the menu 'Delete' in the sidebar.

After this fix, this should not be possible to delete
records when delete=0.

The attribute delete was hard-coded to true, as there was
a traceback when it was set to false. It was simply due
to a misplaced closing brackets that was hiding an
assignment, which resulted to calling a method on undefined.
2017-11-17 12:16:59 +01:00
Jeremy Kersten a0a5443e8f [FIX] auth_signup: properly display the error message
Was "Internal Error 500"

Introduced at c3bf161

This closes #20941
2017-11-17 12:02:05 +01:00
Yannick Tivisse 76e75be02f [FIX] l10n_be_hr_payroll_fleet: Increase max unused car limit 2017-11-17 11:25:25 +01:00
Yannick Tivisse bf7ee31105 [FIX] l10n_be_hr_payroll: Remove ucm_insurance from employer cost
This shouldn't be taken into account when evaluating the employe cost.

Furthermore, this value is stupid and should be removed in master
2017-11-17 11:25:25 +01:00
Yannick Tivisse 8c03616fb8 [FIX] l10n_be_hr_payroll: Put the car ATN after the ONSS cotisation on payslip
Purpose
=======

The ATN for a company car is not subject to the ONSS cotisations.
2017-11-17 11:25:25 +01:00
Yannick Tivisse ed28cbd7ef [IMP] l10n_be_hr_payroll: Add a name on view element to allow xpath 2017-11-17 11:25:25 +01:00