Commit Graph
110184 Commits
Author SHA1 Message Date
Jérome Maes c124cb71c2 [FIX] phone_validation: type in field help message 2017-06-20 09:00:39 +02:00
Jérome Maes 5af4b36e2b [FIX] project_timesheet_holidays: refusing leaves delete timesheet
When refusing leave, we can not remove linked timesheet,
since they are attached to the leave.
We need to first detach it, then remove the timesheet
entries.

Also, add a test about the removal of linked timesheets.
2017-06-20 09:00:32 +02:00
Jérome Maes d36f8d478a [FIX] sale_timesheet: hide timesheet button on invoice if no timesheet related 2017-06-20 09:00:22 +02:00
Martin Geubelle c5f8f35747 [FIX] web: properly handle tab navigation in readonly
The tab navigation was only working in edit mode. Entering a readonly form
view with input fields was causing a traceback.

As the default browser behaviour has been overriden with custom navigation,
we need to specify which widget can be focused (e.g.: url, many2one, etc.).
2017-06-19 16:47:34 +02:00
Martin Geubelle 21fca784dc [FIX] web: Kanban: avoid ghost records when moving record
In an empty kanban view, when moving a freshly created record from
the second column to the first one, then moving it back again in to
the first one, the record was mysteriously duplicated.

When moving the record, it should be removed from the old column.
In this case, the second column was not found (and thus the record
not removed) because the iteration was on `parent.count` (which is
the count of records in this datapoint (1 in our case)) and not
parent.data.length (the number of columns).
2017-06-19 16:47:33 +02:00
qsm-odoo caa4cd2063 [FIX] web: use 'o_input' class on search view elements
Since the new views, the 'o_input' class has to be set explicitely on
<input/> and <select/> elements to have the proper styling.
2017-06-19 11:32:42 +02:00
David Monjoie b8c1571d94 [FIX] web: prevent crash when giving wrong id in url
The mock server had to be modified in order to test this behavior
since it used to throw an error for invalid ids, while the actual
server just ignores it and continues forth with the other ids.
2017-06-19 07:56:42 +02:00
David Monjoie 584c60f1ba [FIX] web: display buttons without icon in list view
Previously, the button was completely invisible when no icon
was given, which is a regression from saas-15 where the string
attribute is used to write the button label.
2017-06-19 07:56:41 +02:00
Aaron Bohy 8859d25bc5 [FIX] web: FieldWidgets: use correct format/parse functions
Field widgets must format and parse values according to the widget
type, not to the field type. For example, if a monetary field is
inserted in a form view with widget="float", the field's value must
be formatted with the float formatter, not the montetary one. This
wasn't the case before this rev.
2017-06-16 11:14:16 +02:00
Aaron Bohy 1fa67917ba [FIX] web: allow to move cursor in inputs with arrows
Commit 9966e4b added calls to preventDefault() on the keydown event
for left, right, up and down arrows, to prevent the page from
scrolling. However, it also prevents the cursor from moving inside
the inputs. Since the initial issue only concerned checkboxes, this
rev. moves the preventDefault() calls from AbstractField to
FieldBoolean.
2017-06-16 08:00:24 +02:00
Joren Van Onder f4200f376b [FIX] point_of_sale: avoid '414 Request-URI Too Large' on config form
Inspired by d7939282e9. Without this you
end up with a URI with a length of over 50000 characters. The default
template doesn't actually use any fields on pos.config so we could
theoretically get rid of everything. But because it's easy enough we
just get rid of relational fields and the customer_facing_display_html
field itself which make up the vast majority of the URI.
2017-06-15 21:33:57 -07:00
Joren Van Onder eb347e82f8 [FIX] web_editor: adapt web_editor to new views
set_value doesn't exist anymore. Instead use _setValue.
2017-06-15 21:29:31 -07:00
Joren Van Onder 83f1e28cc9 [FIX] web_editor,mass_mailing: adapt d7939282 to new views
Also adds body_html to the blacklisted fields. Because that tends to
be quite long as well.
2017-06-15 21:29:26 -07:00
Joren Van Onder b41a987767 [FIX] http: fix forward-port of eaa3682bb6
Forward-ported at
1b50c829ef. b4429c2a91
changed the import to allow for either urllib or urlparse.
2017-06-15 18:31:57 -07:00
Christophe Simonis acfebff880 [FIX] *: correct PY3 compatibility introduced by previous forward-ports 2017-06-15 19:24:03 +02:00
Christophe Simonis 2a008d5168 [MERGE] forward port branch saas-15 up to 2f6edfef49 2017-06-15 19:04:51 +02:00
Christophe Simonis 2f6edfef49 [FIX] resource: remove bad test introduced by previous forward-port 2017-06-15 19:00:54 +02:00
Christophe Simonis 1b50c829ef [MERGE] forward port branch saas-15 up to 9713dc2e1f 2017-06-15 18:44:16 +02:00
Christophe Simonis 9713dc2e1f [MERGE] forward port branch saas-14 up to 96595772e0 2017-06-15 18:39:59 +02:00
Christophe Simonis 96595772e0 [MERGE] forward port branch 10.0 up to dc8b473a03 2017-06-15 18:35:46 +02:00
Christophe Simonis dc8b473a03 [MERGE] forward port branch saas-11 up to dd7b2556c6 2017-06-15 17:52:49 +02:00
Christophe Simonis dd7b2556c6 [MERGE] forward port branch 9.0 up to 9e324c061c 2017-06-15 17:48:26 +02:00
Simon Lejeune cb73aaf71b [FIX] stock: inventory adjustment and negative quants
It is still possible to have negative and positive quants in the same
location because of returns: if you send something to the customer that
is not there and you return it, you will still be able to reserve the
returned goods to send to another client.

Before, if you would do an inventory adjustment, it would not take into
account these returned quants and their negative counterpart, which made
them difficult to get out of the system.

This fix takes them into account by creating two movements for one
inventory line: move the positive counterpart to the inventory location
before getting back from this location the same quantity.

This way, even if you have 0 as quantity on hand but you have those 2
quants, it will eliminate them. (if you are increasing the stock, part
of the process might have done it automatically already).

Test cases contributed by @jir-odoo

Cherry-pick of be9dce625c
2017-06-15 17:42:10 +02:00
Christophe Simonis 9e324c061c [MERGE] forward port branch saas-6 up to 88802b066c 2017-06-15 17:29:17 +02:00
Christophe Simonis 88802b066c [MERGE] forward port branch 8.0 up to 89eca96476 2017-06-15 17:26:15 +02:00
Olivier Dony 89eca96476 [FIX] anonymization: correct pickle protocol and import 2017-06-15 16:36:05 +02:00
Olivier Dony e40a4baf41 [FIX] anonymization: correct pickle protocol and import 2017-06-15 16:34:47 +02:00
Olivier Dony 625c0d5d8e [FIX] anonymization: correct pickle protocol and import 2017-06-15 16:25:25 +02:00
Olivier Dony 16714a7e71 [FIX] auth_oauth: correctly register token field 2017-06-15 16:23:44 +02:00
Olivier Dony eaa3682bb6 [FIX] http: force protocol when missing in URL 2017-06-15 16:23:35 +02:00
Olivier Dony 4acfe3577b [FIX] sql_db: port fix from psycopg/psycopg2#459
NUL characters must not be used in query parameters,
as they will be ignored by libpq, being end-of-string
characters.

Preventing NULs avoids unexpected results from
queries. It is only necessary with psycopg2
versions before 2.7, which includes the upstream
fix.
2017-06-15 16:23:35 +02:00
Olivier Dony 0527564463 [FIX] auth_oauth: correctly register token field 2017-06-15 16:21:32 +02:00
Olivier Dony 692f47da6e [FIX] http: force protocol when missing in URL 2017-06-15 16:21:22 +02:00
Olivier Dony e3a52a9966 [FIX] sql_db: port fix from psycopg/psycopg2#459
NUL characters must not be used in query parameters,
as they will be ignored by libpq, being end-of-string
characters.

Preventing NULs avoids unexpected results from
queries. It is only necessary with psycopg2
versions before 2.7, which includes the upstream
fix.
2017-06-15 16:21:22 +02:00
Olivier Dony 090d7a51be [FIX] auth_oauth: correctly register token field 2017-06-15 16:17:35 +02:00
Florent de Labarre acf7c1460a account: Backport of a5361605
[IMP] account: hide deprecated accounts

To be consistent with other domain added at ee97028

Closes #15432
2017-06-15 16:06:42 +02:00
Olivier Dony d655824028 [FIX] http: force protocol when missing in URL 2017-06-15 16:01:40 +02:00
Olivier Dony eb8d919015 [FIX] sql_db: port fix from psycopg/psycopg2#459
NUL characters must not be used in query parameters,
as they will be ignored by libpq, being end-of-string
characters.

Preventing NULs avoids unexpected results from
queries. It is only necessary with psycopg2
versions before 2.7, which includes the upstream
fix.
2017-06-15 16:01:40 +02:00
Martin Trigaux b144e09a10 [FIX] sale_margin: apply same logic than sale override
If some required fields are not present in the created values, they are computed
based on the onchange.
This was introduced at 5c4765130 to allow to import sale order lines without
specifying uom.

If sale_margin is installed, the same issue will occure as it assumes there is
a value for product_uom

Add test, courtesy of Mourad Elhadj Mimoune, Akretion

Closes #17613
2017-06-15 15:43:36 +02:00
Nicolas Martinelli 2bf6005e6a [FIX] point_of_sale: tax on line
Complement of commit f0f45c8fa2

The result of the onchange is incorrectly interpreted by the web client,
leading to taxes not saved.

opw-746827
2017-06-15 13:55:41 +02:00
Nicolas Lempereur b79b27c2b2 [FIX] website: browser lang > default lang revert 174d7e8
This reverts commit 174d7e8e49.

The default language is the language if no lang corresponding to
the current language is found. Thus the browser language if available in
languages has priority over the default language.

opw-746776
closes #17637
2017-06-15 13:39:05 +02:00
Martin Geubelle 0c2e018d4c [FIX] web: display dashboard graphs in full-width
With the new views, the class `o_field_widget` is added on every field widget
and is styled with `display: inline-block`.

The dashboards used to display graphs in full-width so this behaviour is
restored.
2017-06-15 13:22:08 +02:00
Martin Geubelle d88d1abcf0 [FIX] web: reimplement group_by_tooltip option in kanban
This option hadn't been implemented in the new views.
It allows to display informative explanations as tooltips on column over.

It can be set on a many2one field in the kanban view, e.g.:

```<field name="stage_id" options='{"group_by_tooltip":
    {"<tooltipFieldOnStageModel>": "<ABeautifulTitle>"}
}'/>
```

An extra RPC needs to be done on the many2one relation to fetch these additional
fields and the data are stored in the datapoint under the key `tooltipData`.
2017-06-15 13:22:07 +02:00
qsm-odoo 89fdd259ac [FIX] web_kanban: restore elements which broke over 2 lines
Since commit https://github.com/odoo/odoo/commit/577311c0e11edca5740b232881a16dda2ffd32dc,
some elements are now put in a <span/>. This broke the layout in some
cases as the <span/> elements are displayed as blocks in dashboards since
https://github.com/odoo/odoo/commit/a86d6a7df980d55dd0af007f77c6bb039771525a#diff-4b309c73c7896544c509c1374cc3b682R58

As there is no apparent reason for this, this commit fixes the
problem by making these elements have the `inline-block` display.

opw-747119
2017-06-15 12:13:35 +02:00
qdp-odoo b5eec3414b [FIX] l10n_fr_certification: don't copy hash strings and sequence numbers.
copy() was created corrupted data since copied moves already had the parent's info
2017-06-15 12:11:43 +02:00
Martin Geubelle 46751de506 [FIX] web: correctly style o_status class
The `o_status` style has been moved in a previous rev. in `fields.less` which
is only for `o_field_widget` nodes.

This class however is used in other context than a field (e.g. on a label in
the project.task.type form view) so its style needs to be placed at an upper
level.
2017-06-15 10:59:35 +02:00
Nicolas Martinelli baad8f934e [FIX] mail: format amount
Similarly to functions `format_date` and `format_tz`, we add a function
in order to format amounts in the mail template.

It can be used, for example:
`${format_amount(object.amount_total, object.pricelist_id.currency_id)}`

opw-746088
2017-06-15 10:27:38 +02:00
mourad-ehm f75667bba9 [CLA] Update akretion CCLA
add mourad-ehm

Closes #17605
2017-06-15 10:20:59 +02:00
Nicolas Martinelli 261aa927b6 [FIX] point_of_sale: add_payment
Ease the extension of `add_payment`.

From work of @benwillig

Closes #17598
opw-747348
2017-06-15 10:13:53 +02:00
qdp-odoo df4a81c697 [FIX] l10n_fr_certification: fix wrong xpath.
Bug introduced with the latest forward-port. Since the invoice's workflow has been removed in bc8d5dbf2c, the button name to cancel an invoice changed also.
2017-06-15 10:12:00 +02:00