Commit Graph
114126 Commits
Author SHA1 Message Date
Géry Debongnie e6146db88a [FIX] web_editor: make sure html editor does not ignore changes
For some reason, Summernote does not trigger a change event in some
cases.  It looks like it happens in 'codeview' mode, and when the change
in question is only a backspace key event.  Maybe it listen for keypress
and backspace do not trigger keypress event.

In any cases, the situation is that it is not easy to clear an html
field: going in edit mode, then selecting the content and pressing
backspace will not work before this commit.

With this commit, we specifically compare the value in the editor with
the current value to determine if the field is dirty.
2017-12-04 16:03:37 +01:00
Xavier Morel 5972969568 [FIX] base: encoding headers works better if we return the encoded value
Looks like a `return` was skipped/missed when the code was converted
to Python 3, and since there's a shortcut for pure-ascii values this
took some time to notice (and bubble up).

Fixes #20713
2017-12-04 15:57:04 +01:00
Lucas Perais (lpe) 067a241ea8 [FIX] product, web: many2one child of value
Before this commit, when a product category had a similar name than an other
e.g. ALL / Exp and ALL / Expenses

When entering the list view of its products, it displayed the product linked to the category with the similar name
e.g. When opening ALL/Exp products list, it displayed its products **plus** the products of ALL/Expenses

After this commit the list view just contains the active category's products

OPW 782905
2017-12-04 15:42:49 +01:00
Lucas Perais (lpe) 4aef443135 [FIX] product: product category smart button: sub categ too
Before this commit, the smart button on the form of product category
only displayed the number of product for the current category,
whereas the list view of products (when you clicked on the smart button)
displayed all sub-categories products.

After this commit, the behavior is harmonized: all sub-categories products
should be accounted for and displayed

OPW 782905
2017-12-04 15:42:06 +01:00
Christophe Simonis e0ea17990a [MERGE] forward port branch 9.0 up to 62fcf6a9fe 2017-12-04 15:33:24 +01:00
Christophe Simonis 62fcf6a9fe [FIX] project: only copy tasks when not explicitly set 2017-12-04 15:07:49 +01:00
Adrien Dieudonne ab42507d46 [FIX] web: datepicker: notify all datetime changes
Before this fix, there was an issue when you changed the value of
a datetime field by editing direclty the input (without using the
datepicker popup).
If this value was equal to the offset of your timezone,
the new value wasn't saved. The problem was that no event was
triggered by the 'bootstrap-datetimepicker' lib because it
considered that the old datetime and the new datatime were the
same...

In odoo JS, we always manipulate UTC moment objects and we
manually add the timezone offset at rendering (we mainly do that
for testing purposes). When the offset is added, calling format()
on the moment object doesn't convert the datetime to the browser
timezone because it's flagged as being UTC.

The datepicker lib creates moment objects in the browser timezone.
So comparing the ones it creates with the one given by Odoo is
like comparing apples and oranges, and it gives wrong results
when the datetimes differ by the exact timezone offset. So in this
case, no 'datetime change' is triggered by the lib.

We could fix this by wrapping moment objects into some kind of
OdooDate class and stop manually adding the timezone offset, but
this would involve a refactoring that can only be done in master.

Instead, we prefered to patch the lib to ignore the comparison
between UTC and non-UTC objects, as this is the safest way we
find to fix this issue in stable version.
2017-12-04 14:46:12 +01:00
Lucas Perais (lpe) 88ef8a1bde [FIX] website_sale: better address management portal
Before this commit, when editing the shipping id of a partner having a company_id,
an Error 500 was thrown because of recursive hierarchies.

On top of that, since no employees should be able to modify its company's address,
we hide the dit button in that case
BUT we display addresses type=other (the one that a child of a company has anyway)
meaning that the billing address appears also as a shipping one.

OPW 782524
2017-12-04 14:39:09 +01:00
Nicolas Martinelli e5075147cf [FIX] web: pie chart
Mixing positive and negative values in a pie chart is not possible.
However, in this case, a crash occurs instead of displaying an error
message.

opw-786137
2017-12-04 14:02:12 +01:00
Nicolas Martinelli 055f8e0fcd [FIX] project: archive project
Archive the associated analytic account when a project is archived. Once
a porject is archived, it is assumed that we don't want to use the
analytic account anymore.

Moreover, it might be tempting for a user to delete these "useless"
analytic accounts, and therefore it would delete the archived projects
and tasks without notification.

Closes #21224
opw-784685
2017-12-04 13:57:50 +01:00
Arnold Moyaux 9c4c51f417 [FIX] mrp: handle by_products
When creating by products during a workorder the move lines
for the final moves are not created and the user has to manually
create them on the manufacturing order view.

This commit adds an automatic action in order to create
the correct move lines with the consumed quantity for the
by products not tracked by lot or SN.

This commit also fixes a bug where the consumed move lines where
not linked to the by products move lines
2017-12-04 13:44:40 +01:00
Arnold Moyaux 2afedc99a6 [FIX] mrp: workorder SN required only when moves are consumed
When the user do a work order with a final product
tracked by lot or serial number. A serial number is
asked at the end of the first workorder. The purpose is
to link consumed products with the SN/lot produced.

However it could happens that no component are consumed
during the first and following work order.

This commit allows to by pass the lot/SN registration if
nothing is consumed.
2017-12-04 13:38:22 +01:00
Lucas Perais (lpe) 8b875e4dd4 [FIX] web: hide binary file download when new record
Let's have:
- on res.company a binary file field named x_file
- on res.users a related binary field to company_id.x_file, and make it readonly
On the res.users form view, display the new field

Before this commit in create mode, upon clicking on download the file, the server crashed, because the record id was empty.
Then, the JS crashed in turn because of the unhandled 404 from the server.

Since the id of a new record will always be unset, we choose to disable the download event in this very specific case

OPW 777042
2017-12-04 13:20:18 +01:00
Christophe Simonis 7b808982a0 [MERGE] forward port branch 9.0 up to 5e38bef5a5 2017-12-04 12:55:38 +01:00
qsm-odoo 5e38bef5a5 [FIX] website: review iframe video building
/!\ This commit *must* be "forced" forward-ported /!\

Recent commit(s) broke existing databases making website videos
disappear / not be saved / ...

Original code was broken then fixed by a succession of commits which
solved some errors to create new ones. Hopefully, this one is the right
stable one. Existing databases should be restored while allowing new
videos to be added correctly no matter the version. In master, a solution
must be found to smoothly migrate old videos to a new better system.

See:
https://github.com/odoo/odoo/commit/8749410b1033ddec1207ce1db42d1889a0d2ea33
https://github.com/odoo/odoo/commit/45e0cd564afdae71e9525193250744e88076da71
https://github.com/odoo/odoo/commit/6d2bf44fee76a8b73ebad206cd7a283c88b6c4ef (opw-783233)

opw-786165
2017-12-04 11:45:06 +01:00
Alex 424533f694 [CLA] signature for satriani-vai
Closes #21387
2017-12-04 11:40:47 +01:00
qsm-odoo 3a1c56f885 [FIX] point_of_sale: set correct label for start category setting
The label of the setting was linked to the invisible m2o field to
choose the start category instead of the start category setting
itself. The problem was that when clicking the label, instead of
checking the config checkbox, it opened the m2o's dropdown though
it was invisible.

opw-784599
2017-12-04 11:34:12 +01:00
Luc De Meyer ab52c636c3 [FIX] account: use proper return format for default_get
default_get expects ids, not recordset (e.g. called by webclient)

Closes #21358
2017-12-04 10:22:35 +01:00
Yannick Tivisse c423f9c209 [FIX] l10n_be_hr_payroll: Correct frenglish labels 2017-12-04 10:13:41 +01:00
Yannick Tivisse 878d44cf1c [FIX] l1On_be_hr_payroll: Compute correctly the brut2net if >20 holidays
Purpose
=======

Currently the wage reduced by a superior amount of 20 holidays is not taken into account in the brut2net computation.

Specifiation
============

Take also the wage deduction into account
2017-12-04 10:13:41 +01:00
Yannick Tivisse 671b9172e2 [FIX] l10n_be_hr_payroll: Hide editable holidays field 2017-12-04 10:13:41 +01:00
Yannick Tivisse ee999ce609 [FIX] l10n_be_hr_payroll: Extend default leave days amount to 35 2017-12-04 10:13:41 +01:00
Yannick Tivisse 99c79ef71b [FIX] l10n_be_hr_payroll: Fix typo in string attribute 2017-12-04 10:13:41 +01:00
keylor2906 61847490f2 [CLA] add keylor2906 to Vauxoo's CLA
Closes #21383
2017-12-04 09:50:36 +01:00
Alexander Olivares 524e631490 [CLA] update Vauxoo's CLA
Add Alexander Olivares

Done at #21385
2017-12-04 09:47:57 +01:00
Maximilien Tantin a9add3b9a8 [FIX] website_sale: translate buttons
Log In and Sign Up was not translatable

Closes #21333
2017-12-04 09:36:27 +01:00
Nicolas Martinelli d6984069c3 [FIX] base: activate currencies
Complement of 4b92f914de

opw-785831
2017-12-04 09:35:29 +01:00
Adrien Dieudonne e15e6fe32e [FIX] web_editor: support of SVG elements in snippets
Before this commit, it was not possible to save a page
containing a snippet with a SVG tag.

To support SVG elements, we need to use 'Element.getAttribute'
and 'Element.setAttribute' as mentionned in the documentation:
https://developer.mozilla.org/en-US/docs/Web/API/Element/className

For more information, see GH-14485
2017-12-04 09:24:35 +01:00
Géry Debongnie d2815c474d [FIX] payment: return widget reference
This file, like many others, does not return a reference to its main
widget, which implies that it cannot be modified/extended.  This may be
fine for Odoo itself, but some other may (and do) need to extend/include
this widget.
2017-12-04 09:18:04 +01:00
William Henrotin b62bab6992 [FIX] hr_expense: missing exception import
In hr_expense.py, a ValidationError exception can be raised in some
cases but it's not imported from odoo.exceptions
2017-12-04 09:10:18 +01:00
Nicolas Martinelli 73f7567627 [FIX] point_of_sale: default fiscal position
- Create 2 FPos (1 & 2)
- Create 3 customers:
  Customer A has no FPos
  Customer B has FPos 1
  Customer C has FPos 2
- Set-up the POS so that FPos 1 is the default FPos (FPos 2 is not
  accepted in the POS)

Issue 1
- Select Customer A

The FPos is set to blank, while one would expect to keep the default
FPos.

Issue 2
- Select Customer B
- Deselect Customer B

The FPos is set to blank, while one would expect to keep the default
FPos (as it was before selecting B).

Issue 3
- Select Customer C

The FPos is set to blank, while one would expect to keep the default
FPos since his FPos is not accepted.

opw-782855
2017-12-04 09:07:34 +01:00
Odoo Translation Bot f34d4d33a0 [I18N] Update translation terms from Transifex 2017-12-03 04:27:19 +01:00
Odoo Translation Bot 60801e5375 [I18N] Update translation terms from Transifex 2017-12-03 00:41:36 +01:00
Adrien Dieudonne dbb9338a95 [FIX] web: search_filters: avoid to apply UTC offset for date fields
Due to a previous commit (@d2e1a1de), if a date was selected in
search filter, the time was converted to UTC to the server.
For negative offset, the search was then executed for the day before.

Now, we avoid to convert the searched date to UTC.
We only need to convert datetime fields.
2017-12-01 15:36:33 +01:00
Atchuthan f03437ae00 [FIX] payment: display error message
The error message was not displayed as out of the paragraph block

Closes #21342
2017-12-01 15:33:08 +01:00
Adrian Torres 3d1e23aaba [FIX] *: Reset module states on registry init error
Commit 763d714 introduced cron job locking for databases which had
modules with states set to 'to x', however if an
installation/uninstallation/upgrade fails, the state will stay at 'to
x', and it may stay in that state for an indefinite amount of time,
meaning that cron jobs could stay locked forever.

This commit fixes this in part by adding a cleanup function to loading.py that
will be executed whenever load_modules fails, the function will change
every 'to x' module to their original state, effectively unlocking the
execution of cron jobs.

This however only works to prevent "zombie" transient states for
brand new databases, however for existing databases which already
contain some modules in a zombie state it won't do anything unless
a module is installed/uninstalled/upgraded, which may never happen.

This is where the second part comes in (ir_cron.py), when failing to
execute crons, we check if the failure was due to bad module state
and if an arbitrary amount of time (5 hours as of this commit) has passed
since the last time it was supposed to be executed, if it is the case, it means
that the cron execution failed around 5 * 60 times (1 failure per minute for 5h)
in which case we assume that the crons are stuck because the db
has zombie states and we force a call to reset_module_states.
2017-12-01 14:15:42 +00:00
qsm-odoo a13843758c [FIX] web: rainbow man followed by error dialog
The rainbow man should not be marked to be on top of every modal,
just the modals that were opened before its apparition.

opw-781102
2017-12-01 13:56:58 +01:00
qsm-odoo 4974f8edb7 [FIX] web: make submodals backdrop appear on top of parent modals
Commit https://github.com/odoo/odoo/commit/7dcb8fea642858e0bb1d68cea9707cb3c8d4328d
(and https://github.com/odoo/odoo/commit/e64cf3d606bd94f7e0d82ec907ce7d1d66222287)
were supposed to make submodals backdrop appear on top of parent modals.

The feature was however broken by another commit before it was released:
https://github.com/odoo/odoo/commit/f997c128c7295b5e76d7f77d79c4a82898debbcf
2017-12-01 13:56:58 +01:00
Nicolas Martinelli 673b9e6a4a [FIX] pos_discount: missing part in forward-port
From 5548b2ff7a

opw-783101
2017-12-01 13:51:56 +01:00
David Vidal 441b2bf894 [FIX] website_event: add missing translation term
Was added at 78014ff

Closes #21372
2017-12-01 10:59:58 +01:00
stefanorigano c201cf2b77 [IMP] doc: revamp documentation design
A comprehensive theme’s revamp, details:

=== New features ===
- Show titles permalink markers on hover
- “Scrollspy” effect for the sidebar

=== Fixes ===
- Solve an issue causing the sidebar to flicker on scroll
- Hide the sidebar if less then two links

=== Design ===
- Improve typography vertical rhythm and line height
- Visually increase separation between sections
- Review alerts and <dl> design
- Reduce cover’s size
- Reduce overall paddings/margins.

Closes #21304
2017-12-01 10:51:53 +01:00
Christophe Simonis 676c982eda [FIX] stock{,_picking_batch}: correct public method return value 2017-12-01 10:49:32 +01:00
Odoo Translation Bot 19fda52a53 [I18N] Update translation terms from Transifex 2017-12-01 02:53:01 +01:00
Christophe Simonis 42264d8dcb [MERGE] forward port branch saas-16 up to 5d7ad2b16c 2017-11-30 18:43:08 +01:00
Christophe Simonis 5d7ad2b16c [MERGE] forward port branch saas-15 up to 863fad1b53 2017-11-30 17:17:16 +01:00
Christophe Simonis 863fad1b53 [MERGE] forward port branch saas-14 up to be64ba6069 2017-11-30 17:15:51 +01:00
Cedric Snauwaert be64ba6069 [FIX] account: reconciliation of payment with statement should not ta…
…ke lock date into account

If we have a payment in october and a statement in november and the lock date is 1st november, we can't reconcile both because we try to write statement_id on payment but there is the lockdate constraint. This is not correct and we should be able to reconcile both even after lock date as it is the case for other moves.
2017-11-30 16:50:54 +01:00
Martin Trigaux e4a281b5a5 [I18N] export source terms 2017-11-30 16:03:58 +01:00
Christophe Simonis ab084d580f [MERGE] forward port branch saas-15 up to 98539336a5 2017-11-30 15:27:59 +01:00
Christophe Simonis 98539336a5 [MERGE] forward port branch saas-14 up to b780e4a0e4 2017-11-30 14:44:49 +01:00