Commit Graph
110869 Commits
Author SHA1 Message Date
Christophe Matthieu cf03a74c32 [IMP] account: reconciliation widget: add a test for load more button 2017-08-23 14:45:46 +02:00
Cedric Snauwaert 1de418aa7a [ADD] account: reconciliation widget, add load more button in widget to load more statements 2017-08-23 14:45:46 +02:00
Martin Geubelle 65ecd109a5 [FIX] web: reimplement conditions in the "Set Default" dialog
The rev. https://github.com/odoo/odoo/commit/49f0413290821cb123e75b4546873cf98edf1d25 reintroduced
the "Set Default" dialog but forgot the conditions part.

This rev. reintroduces the missing part.
2017-08-23 13:53:18 +02:00
Christophe Simonis 59f8b849fb [MERGE] forward port branch saas-15 up to d5f2a38b50 2017-08-23 11:23:08 +02:00
Olivier Dony dbdf994df8 [FIX] account: do not show payment data to non-billing users
Users will generally not have the right to read Journal Items unless
they are members of one of the Accounting/Invoicing groups.

Removing the payment-related fields & widgets from the view should let
those users view relevant customer invoices (e.g. for Salesmen) without
getting an AccessError, due to the underlying access to Journal Items.
2017-08-23 03:03:49 +02:00
Jeremy Kersten 2850612d37 [FIX] sale_timesheet: update test comparaison
Use float_repr to get the comparison value into the log

Add this log to debug why this test make runbot red randomly.
2017-08-22 17:38:20 +02:00
Jeremy Kersten f2cc28268c [FIX] website_crm_partner_assign: fix signature escaping
| safe was applied on '' and not user.signature
So the mail was send with the signature in text plain
2017-08-22 17:38:20 +02:00
Christophe Simonis d5f2a38b50 [MERGE] forward port branch saas-14 up to 6956ad54de 2017-08-22 17:20:15 +02:00
Christophe Simonis 6956ad54de [MERGE] forward port branch 10.0 up to 6dc0f31415 2017-08-22 16:45:43 +02:00
Christophe Simonis 6dc0f31415 [MERGE] forward port branch saas-11 up to 92ec666f8d 2017-08-22 16:28:10 +02:00
batuto feef39aee0 [IMP] doc: add warning about constrain method trigger
It may be confusing that a constraint is not triggered in a name_create call.
Testing the absence of value should be done in an override of create, not in a
api.constrains.

Closes #18382
2017-08-22 15:46:48 +02:00
Holger Brunn 8a4a232e54 [FIX] project_issue: use issue_count instead of counting issues
It is costly to compute all issues, return the full list of all issues, only to
compute the length and display it.
Use proper issue_count field.

Closes #18858
2017-08-22 15:25:12 +02:00
Martin Geubelle dbab6f7417 [FIX] web: advanced use of widget reference
The reference widget is also meant to be used on a char field, not only on a
reference field.

The rev. https://github.com/odoo/odoo/commit/a4e30a1b43d0b9acd76508d9e6c466cd1dbdffab removed
the use of `field_utils.format.many2one` and replaced it by `_formatValue` to
support this use case.

The replacement wasn't complete as some occurences was remaining (in reset),
which led to traceback when the widget was reset (impossible to create an
External Identifier anymore).

Also, the reference `_formatValue` wasn't correct as it was displaying the
record `display_name` and not the reference field value ; this only makes sense
for the External Identifier as its display name is the reference field value but
it doesn't make any sense for other reference field.

Last but not least, this commit implements the `onchange` and `default_get` for
the reference field.
2017-08-22 14:18:14 +02:00
amoyaux 92ec666f8d [FIX] stock: change delivery method on a supplied warehouse
Use case to reproduce:
- Create multiple warehouse
- Select a warehouse to ressuply on a warehouse form view
- Go to the supplied warehouse form view
- Change the delivery method -> Traceback can't adapt stock.location type

This happens because there is a write method using a stock
location instead of its id.

This commit use the location id instead of location
2017-08-22 14:15:46 +02:00
Adrien Dieudonne 717b472ef9 [FIX] web: calendar: first day of the week
Before this commit, the calendar view showed Sunday as the
first day of the week.
Now it depends on the user lang.
This is the same behavior that we had before the refactoring
of views.
2017-08-22 14:03:12 +02:00
Christophe Simonis e68da600de [MERGE] forward port branch 9.0 up to caf78d22e1 2017-08-22 13:55:05 +02:00
Lucas Perais (lpe) e38de9dfa4 [FIX] website_portal: modify user details should inherit from portal
before this commit, when a portal user edited its details, the State field was not updated on change of country_id
This was because a CSS class was missing.

We make the details template calling portal_layout as it should to get every resource we need in the rendering of details

OPW 767041

Closes #18984
2017-08-22 13:33:35 +02:00
Christophe Simonis 902fc764d5 [FIX] mail: only set header value for emails (not comments) 2017-08-22 13:32:34 +02:00
David Vidal 04cddc447b [FIX] website_sale: Avoid compute tax for every company
When a product has multiple company taxes and b2c prices is enabled, price is
not computed properly and adds to the base price every company tax present.

This patch filters the company set on the company so taxes are computed just
for that company.

This closes odoo/doo#18840
2017-08-22 13:18:05 +02:00
Jairo Llopis 48fe0a5953 [FIX] website: get website-specific view ids if available
In a multiwebsite environment, (de)activating some theme views produces
undesired results if the same view exists in different ways for different
websites.

With this patch, we search before for a website-specific view with the provided
 key, and fall back to the XMLID-found one if there is no specific view.

This commit closes odoo/odoo#17970
2017-08-22 13:18:05 +02:00
Jairo Llopis 7c6714d7fe [FIX] website: check website_id on view when applying inheritances.
Before this patch, if some view had both `inherit_id` and `website_id`,
its inheritances were being applied even in different websites.

After this patch, if a view inherits from another, inheritances will only apply
 when both views belong to the same (or none) website.

Refactoring based on the pr #17635
This closes odoo/odoo#17635
2017-08-22 13:18:05 +02:00
Christophe Simonis caf78d22e1 [MERGE] forward port branch saas-6 up to e4c7b11834 2017-08-22 12:42:26 +02:00
Christophe Simonis e4c7b11834 [MERGE] forward port branch 8.0 up to ff30928786 2017-08-22 12:38:17 +02:00
Christophe Simonis c023e1d562 [FIX] mail: add custom headers for mails send via the composer 2017-08-22 12:27:47 +02:00
Jairo Llopis 15bf41270d [FIX] website: Make Qweb cache website dependent
Without this patch, all Qweb cache is shared among all available websites.
This turns impossible in practice to actually create multiple websites with
different look.

This closes odoo/odoo#18462
2017-08-22 12:03:23 +02:00
Thibault Delavallée e8cfa45f3c [FIX] project: fix issue with onchange when unsetting project
Let us do like in project issue and use a void record set instead of
None.
2017-08-22 10:55:37 +02:00
Adrien Dieudonne 0ea1d8c496 [FIX] web: calendar: various fixes
- When you move an all day event to a scheduled event,
  the default duration should be 2 hours instead of 1 hour.
- Before this fix, it was not possible to drop an event
  to an all day event
- In week mode, an all day event was displayed over two days.
2017-08-22 10:38:43 +02:00
Goffin Simon d7481a9bb1 [FIX] website_portal: Wrong word
Typo error.

opw:766578
2017-08-21 14:55:48 +02:00
Yenthe V.G e25b8356e5 [IMP] sale: hide analytic info
Make the view consistent, hide the analytic information to users no in analytic
accounting.

Courtesy of Andrius Laukavičius

Fixes #18875
Closes #18955
2017-08-21 14:04:29 +02:00
Goffin Simon 68de5c7e9f [FIX] account: Cancel: create refund and reconcile
When refunding an invoice with the option: "Cancel: create refund and reconcile",
it raised a warning: "You are trying to reconcile some entries that are already reconciled!"
because in some cases the refund is linked to several entries which match the same
account of the invoice. So it tried to reconcile several times the same entries.

opw:765673
2017-08-21 10:22:20 +02:00
Martin Trigaux 85a360eeae [FIX] sale_stock: allow to cancel multiple orders
The action was tagged multi but crashed if executed on more than one order.
Courtesy of Andrius Laukavičius
2017-08-21 10:15:24 +02:00
Nicolas Martinelli 7e1d1f9502 [FIX] account: set default taxes
Allows removing default taxes. It was supposed to solve PR 11498, but
the solution brings more problems than the original issue.

opw-766720
2017-08-21 08:54:25 +02:00
Thang Duong Bao f1865f4a0f [CLA] signature for NothingCtrl
Closes #18852
2017-08-21 08:47:03 +02:00
Mariano Fernández - https://www.vauxoo.com/ ddc24f63f8 [CLA] add Batuto to Vauxoo's CLA
Done at #18420
2017-08-21 08:45:06 +02:00
Odoo Translation Bot 3b142d426a [I18N] Update translation terms from Transifex 2017-08-20 07:14:17 +02:00
Odoo Translation Bot 8cb991c772 [I18N] Update translation terms from Transifex 2017-08-20 04:40:12 +02:00
Odoo Translation Bot 4c78611784 [I18N] Update translation terms from Transifex 2017-08-20 00:31:52 +02:00
Joren Van Onder 89cade3bff [FIX] pos_restaurant: wrap product names on OrderChangeReceipt
Reuse generate_wrapped_product_name() which was implemented for
regular POS receipts at 62a8def918.

Fixes #18688
2017-08-18 13:56:39 -07:00
fwi-odoo 657f12a2ae [FIX] web: list_renderer: correct indentation when empty group by
Before this commit, when a group by was done, the empty rows were not
indented correctly. This commit fixes this behaviour.
2017-08-18 16:31:37 +02:00
fwi-odoo 49f0413290 [FIX] web: debug manager: open the set_default dialog
Before this commit, the function opening the set_default dialog was not
declared anymore. This commit redefines this function in the debug manager.
2017-08-18 16:31:30 +02:00
Raphael Collet 0d73dae9ef [FIX] base: keep the model cache consistent
Do not remove fields from models except for custom fields.  Removing a base
field from a model screws up the model cache: that field may be required to
speed up the setup of the model in another registry.
2017-08-18 13:44:00 +02:00
Aaron Bohy 74fe046e1a [FIX] web: missing test case for fix 0966f75b 2017-08-18 13:34:37 +02:00
Martin Geubelle 4efa4e9d94 [FIX] web: BasicModel: default_get: correctly fetch m2o inside o2m
In general (e.g. read, search_read), values for many2one fields are pairs
[id, display_name]. The default_get is an exception, it only returns the id,
so we need to manually perform a name_get afterwards. In the case of
list views, those name_get RPCs are batched.

Before this rev., the code in charge of it didn't handle the case where the
many2one value was false, so it crashed when it happened.

This rev. deals with this use case and a test case has been added.
2017-08-18 12:59:11 +02:00
qsm-odoo be754451b4 [FIX] web_editor: open correct view on HTML editor default start
When starting the HTML editor, the first view that is shown is supposed
to be the main one of the page by default. This was not the case for
custom pages as the 'xml_id' of the page was considered instead of its
'key' value.
2017-08-18 12:36:04 +02:00
Cedric Snauwaert 7fa39d6e04 [FIX] account: reconciliation: display name and ref instead of just ref
+ some css fix to better display
2017-08-18 11:50:44 +02:00
Richard Mathot 0966f75b7e [FIX] web: enforce length-limited char fields
In Odoo 10.0, `Char` fields with a maximum `size=` attribute were
indeed limited in the web client.
2017-08-18 11:34:21 +02:00
Nicolas Martinelli 110bf158f6 [FIX] website_sale_digital: special character in filename
- Create a product with attachment, and name the attachment 'テスト'
- Purchase the product, make a payment, validate and pay the invoice
- Go to My Orders under My Account, open the order, and try to download
  the file 'テスト'.

An error 500 is raised due to a UnicodeEncodeError.

```
  File "/home/nim/src/odoo/addons/website_sale_digital/controllers/main.py", line 104, in download_attachment
    return http.send_file(data, filename=attachment['name'], as_attachment=True)
  File "/home/nim/src/odoo/odoo/http.py", line 1595, in send_file
    headers.add('Content-Disposition', 'attachment', filename=filename)
  File "/usr/lib/python2.7/dist-packages/werkzeug/datastructures.py", line 1093, in add
    _value = _options_header_vkw(_value, kw)
  File "/usr/lib/python2.7/dist-packages/werkzeug/datastructures.py", line 830, in _options_header_vkw
    for k, v in kw.items()))
  File "/usr/lib/python2.7/dist-packages/werkzeug/http.py", line 212, in dump_options_header
    segments.append('%s=%s' % (key, quote_header_value(value)))
  File "/usr/lib/python2.7/dist-packages/werkzeug/http.py", line 165, in quote_header_value
    value = str(value)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)

```

opw-766568
2017-08-18 11:26:08 +02:00
Martin Trigaux cf8985e37d [FIX] models: properly format load error
In case of foreign language, using unicode characters, the error message may be
badly formated.

e.g.
Unknown error during import: <class 'odoo.exceptions.AccessError'>: เฉพาะผู้ดูแลร..

insted of
Unknown error during import: <class 'odoo.exceptions.AccessError'>: (u'\u0e40\u0e09\u0e1e\u0e32\u0e30\u0e1c\u0e39

opw-766580
2017-08-18 11:12:16 +02:00
qsm-odoo 1ca79bd9f1 [FIX] mail, web: use 'o_input' class on kanban and discuss elements
Since the new views, the 'o_input' class has to be set explicitely on
<input/>, <select/> and <textarea/> elements to have the proper styling.
2017-08-18 10:56:32 +02:00
Olivier Dony b31577a11a [FIX] portal wizard: fix compatibility w/ new views
New saas-16 web views have a more consistent handling of `readonly`
attributes and do not save read-only fields inside x2m. In the previous
implementation this was an exception to the rule (even if rather
inconsistent/unexpected).
A new attribute `force_save` was introduced to workaround the default
behavior when considered necessary.

The portal wizard is affected by the change, as the partner_id field of
the lines is readonly but required. It could be avoided by filling the
wizard lines before opening it, instead of relying on default values and
onchanges. However this would likely require extra boilerplate code and
an extra server action. Dropping the readonly flag would work too, but
would look weird.

Using the new `force_save` flag is a simpler alternative.

See also rev. 3b3f6f04af
2017-08-17 21:06:37 +02:00