Commit Graph
117975 Commits
Author SHA1 Message Date
Tommy Tran dc99a666f8 [ADD] l10n_vn: add Vietnamese states
Co-authored-by: Yenthe V.G <yenthevg@gmail.com>

Closes #20219
Closes #23711
2018-03-16 16:52:06 +01:00
Nicolas Lempereur 18a5a7a935 [FIX] portal: show line return in chatter message
In the frontend only plaintext is saved without any javascript fiddling
so in the controller it should be adapted to be saved.

With this change, the behavior is more similar to backend chatter which
sends html (processed by javascript) to the server.

opw-1817918
closes #23706
2018-03-16 16:26:26 +01:00
Romain Derie 9f1438d5f1 [IMP] website: Script injected in DOM: window.onerror empty params
Cherry-pick (and improvement) of 4bd8e3e (11.0) which should have landed in 10.0

Closes #21032
2018-03-16 16:12:29 +01:00
Toufik Benjaa 0030be1571 [FIX] payment: Avoid to reset the return url on S2S
- The payment template is overwriting the return url which caused it to be never valid.
  This is mainly used by payment that uses 3D Secure.
  If the return_url doesn't exists, then the customer is redirect to '/' which is not what we want.
  If the payment doesn't use 3D Secure, then the controllers that handle it may (and it is always the case) redirect the url to a hardcoded url inside it.
2018-03-16 16:00:59 +01:00
Alexandre Kühn 33af428085 [FIX] im_livechat: remove dead code with nocontent helper
Revision on https://github.com/odoo/odoo/commit/a87d761fdbf345ada5dc93e0a686b08a0f5a0417

There was an issue with the nocontent helper of im_livechat channels where two paragraphs
were shown instead of a single one.

This was due to a typo where the paragraph was decorated with another paragraph tag.

The commit above tried to fix the issue by not decorating the static help with a paragraph,
since it already contains a paragraph. However, the fix introduced some dead code, so that
this overridden method has no purpose (it simply calls `super`).

This commit removes the overridden method, which preserves the current and correct behaviour.
2018-03-16 15:54:57 +01:00
Mykhailo Panarin ee8a772f99 [CLA] signature for mpanarin
Closes #23708
2018-03-16 15:41:28 +01:00
David Arnold 9035378d4b [FIX] stock: use full name in error message
IT was not possible to differenciate between variants as using the
product.template name in the message.
Same for the location were it was using the last level name (e.g. 'Shelve 42')
instead of the full path

Closes #20174
2018-03-16 15:39:38 +01:00
qdp-odoo e130606602 [FIX] account: multi-currencies fixes
Along with new tests, 2 things have been changed:

1) amount_currency field is not written anymore when matching an amount paid in company currency against some invoice(s) in secondary currency (see changes in test_reconciliation.py)
This was previously made to help computing the exchange rate difference entry, but we now instead completelly rely on the amount_currency field set on the partial reconciliation. Besides being wrong from a purely functional pont of view (we never received money in secondary currency so why should the ORM act as if it was the case), it was the root cause of the problem related test_partial_reconcile_currencies_02, in test_reconciliation.py.

2) when registering a payment directly from an invoice, containing both an exchange difference and a write-off to force the full reconciliation, we now correctly create the accounting entries.
A weird behavior spotted in #21888 was introduced by 2093546, to deal with impossibility to full reconcile an invoice due to rounding errors. Fortunately, this use case (test_payment_and_writeoff_in_other_currency_3, in test_payment.py) can now be solved in the right way thanks to changes introduced in the previous point.
2018-03-16 15:30:54 +01:00
jbeficent bb861825ca [ADD] account: add failing test on multi-currency reconciliation
Was PR #22716. Courtesy of Jordi Ballester (Eficent)
2018-03-16 15:26:36 +01:00
Nicolas Lempereur ceac5d686d [FIX] web: ok mobile kanban w/o o_kanban_small_column
On mobile, kanban view always have its custom "menu" bar to cycle
between grouping if the kanban view is grouped.

But if the kanban view did not have the class `o_kanban_small_column`
the mobile CSS on record was not applied:

- all columns were always displayed one over the other
- switching tab did not hides other columns and show current one
- the style was the same than desktop (but on mobile and with column
  after first "to be loaded)

opw-1827142
closes #23691
2018-03-16 15:23:01 +01:00
Martin Trigaux 38e4b2b50a [FIX] l10n_multilang: followup of 3bf9cf4f36
The change was made in the code but not in the error message

Courtesy of Stephane Bidoul
2018-03-16 15:22:27 +01:00
Stephane Bidoul b9488caa64 [ADD] l10n_lu: translate chart of accounts
In English, French and German.

Closes #21651
2018-03-16 15:20:16 +01:00
Ernesto García Medina 8e42056b1e [CLA] signature for ernesto-telematel
Closes #23707
2018-03-16 14:56:35 +01:00
Moises Lopez - https://www.vauxoo.com/ 354a1ee65e [FIX] doc: add missing text for calendar string field
Was missing the attribute

Closes #18278
2018-03-16 14:53:49 +01:00
Martin Trigaux 18e7f99981 [FIX] doc: correct commit guideline format
Github will automatically close the report is you use the format
Closes #number
No need to a leading #
cf https://help.github.com/articles/closing-issues-using-keywords/

Add the meaning of [I18N] tag

This commit is an example of a violation of the "one commit, one fix" principle
2018-03-16 14:45:04 +01:00
Martin Trigaux 8fd8019958 [IMP] doc: warn user about the need to update
Easy mistake for new developers

Courtesy of Pieczynski Marcin
Inspired by and closes #17959
2018-03-16 14:44:06 +01:00
Martin Trigaux 06737c3441 [FIX] account_check_printing: compare float correctly
Example failing before this commit:
- amount = 11.01
- decimal = 11.01 % 1 = 0.009999999999999787
- 0.009999999999999787 < 0.01

Use correct float_is_zero method to test if there is decimal or not

Closes #18306
2018-03-16 14:18:37 +01:00
Martin Trigaux 9fd5df4305 [FIX] survey: add missing groups
Survey Users have a correct record rule but portal and employee had no rule,
being able to read more records than a Survey User

Closes #23675
2018-03-16 13:58:25 +01:00
Yannick Tivisse 509679c3b6 [FIX] l10n_be_hr_payroll: Compute car atn and costs correctly on new cars
If the contract is misconfigured (A car and a new car is set), then compute correctly the costs.
2018-03-16 13:47:40 +01:00
Martin Trigaux f7501b9fff [FIX] website_sale: data > demo data
Do not rename a translatable record in demo data.
Renaming a translatable record will breaks translations.
I am aware this renaming was done for demo purposes but it is not a good enough
reason to force people in another language (e.g. Chinese) to have the main
pricelist to be named 'USD'.

Exporting the translations only when the product module is installed is not an
option as many product descriptions are added in website_sale
(website_description field) and would then be missing from the translated
content.

It is the same problems as renaming menu based on module installation, it
will not work for non-English speakers.

Will also avoid manual corrections of pot file such as in #23686
2018-03-16 13:44:44 +01:00
Christophe Simonis 512fd20dfd [IMP] maintenance: allow cross-company usage
Company fields should not be required.
2018-03-16 13:37:59 +01:00
Nicolas Martinelli 4e507faaaf [FIX] web_editor: type of res_id
- Set the demo user to have access to all quotations
- Connect as demo, create a quote and send the message
- In the message try to upload an image

An access error is raised, although the user can write on the record.

This is because the `res_id` received is a `string`, not an `int`.
Therefore, the access check fails.

Introduced with 6494f51171

opw-1824673
2018-03-16 13:30:25 +01:00
Stéphane Bidoul (ACSONE) 854943379b [FIX] hr_expense: fix Not Refused filter
"cancel" is not a valid hr.expense state
This filter should be the opposite of the one above.

Closes #18823
2018-03-16 13:23:54 +01:00
Jerther 0ee76b664c [IMP] doc: add a tip to create a model without any table
As explained in #17386, _auto=False on a model is used for report where the
table is explicitely created in init method.
To create a model without any table, AbstractModel should be used.

Closes #19448
2018-03-16 12:57:16 +01:00
Akim Juillerat c4a11cb42a [FIX] stock: use correct warehouse name in multicompany
At stock installation, the warehouse0 has the name of the first company found
(order "sequence, name"), while the comapny_id field is
`_company_default_get('stock.inventory')` (the company of the user installing
the stock module).

In a multi-company environment, it is possible than both results are different
and having name = 'Company A' and company_id = 'Company B'.

Use the name of the default company as default value for the field name.
Note that 'stock.inventory' is not needed in _company_default_get call but
kept to match the default of company_id (in case of override).

Using a default on the field will impact all the future records but should,
hopefully, not be problematic as it is a valid default value.

Closes #19563
2018-03-16 12:12:30 +01:00
len-odoo 00057f8efd [FIX] stock, sale_stock, purchase: create quality checks for backorders
There was no Quality check entry for backorders
when the user did a partial shipment.
We move the logic of the backorder creation to the _create_backorder function.
This function was defined but not called anymore due to a refactoring.
We clean some of its unnecessary overrides which were not used anymore.

opw-1816845
2018-03-16 11:36:53 +01:00
Thibault Delavallée cd69ea8f9a [REM] crm, project: remove support of mail-based record update
Currently crm and project parse incoming email body following an old
syntax to find some "set field - value" lines in the email content. It is
used to update the record linked to the discussion directly from the email.

However this feature is undocumented and not really supported anymore.
Moreover we don't think being able to update records from emails is a
reliable way of working. Moreover those update is limited to

 * revenue and probably for leads; this should totally be managed from
   the pipeline view by lead / opportunity responsible;
 * priority update coming from a "priority" entry in the incoming email;
   this code seems strange as priority is probably not standard in email
   headers;
 * planned hours for project; this should be managed by project user
   and managers through dedicated views in Odoo;

Let us remove that old feature and let people use desktop or mobile
interface to update their records.
2018-03-16 11:00:35 +01:00
Thibault Delavallée 8a7a2c7af2 [FIX] mail: add missing decorators for public methods in subtype model 2018-03-16 10:43:09 +01:00
Simon Lejeune 0a2999cdd9 [FIX] stock: delivery slip report
The delivery slip is a document targeted to the customer, it is
important that the quantities displayed there reflects what's actually
been delivered.

As for some reason the delivery slip tries do display some stuff on a
not yet done picking and as the ordered_qty field on the move line do
not reflect the ordered quantity but instead the first quantity reserved
on it, we apply the following changes to make the report consistent.

- In all cases, only display the quantity done.
- Get rid of the ordered / delivered quantities. If the move wasn't
  processed fully and a backorder will follow, a message is shown at
  the end of the picking.

There's an ongoing task to fix this report in a better way on master.

opw-1808126
2018-03-16 10:42:22 +01:00
Simon Lejeune ca64b299cc [FIX] stock: picking report
Display the reserved quantity of the move line. Before this patch, it
was only displayed if the product was tracked by lot or serial number.
Not showing it make the only visible quantity on the report the initial
demand of the move, leading users to think the move is fully available.

opw-1808126
2018-03-16 10:42:22 +01:00
Mehul Patel 78d681d14f [IMP] mail: composer / chatter new followers email address tooltips
Before this commit, many2many email tags showed the recipient's name
and email address. Most of the time, the text was cut off in order to
fit in the maximum length of a many2many tag, so the email address was
usually not visible.

With this commit, many2many email tags now show only the recipient's
name. The recipient's email address is displayed when hovering on the
tag.

Task-ID 36677
2018-03-16 09:48:13 +01:00
Ryan Cole ca83d3c1ac [IMP] doc: add details of o2m and m2m limitations 2018-03-16 09:04:31 +01:00
Florent de Labarre dc1681b1f8 [FIX] stock: show complete name of product
In case of changing the quantity on hand of two variants of the same product,
the two inventory adjustment created will have the same name (the name of the
product.template).
Show the name of variant instead.

Closes #23696
2018-03-16 08:58:02 +01:00
Nicolas Lempereur 45607de944 [FIX] test_main_flows: set tax on product in test
Following odoo/odoo@87c09b8 if a chart of account template with falsy
complete_set_tax is installed, the default sale and purchase taxes are
not set.

This made a enterprise step fail in test_main_flow, so this commit set
the tax on product inside the test explicitely.
2018-03-16 08:49:59 +01:00
João Santos 6bafc30ed3 [FIX] hr_org_chart: add missing event on show more button
The event was lost during new view refactoring at e3d1abc75f
The "show more" button at the bottom of a too long employee list was not binded
to an event.
After this commit, clicking the button leads to the subordinates list.

CLA signature for agente2012

Closes #23665
2018-03-16 08:39:31 +01:00
Aaron Bohy 75802f9afc [FIX] web: ActionManager: concurrent window actions
This rev. strengthens the handling of concurrent actions of type
'ir.actions.act_window' in the ActionManager. In particular, the
two following cases are now handled:

 - execute an action A, its 'load_views' RPC takes a while, during
   that time, execute an action B: A can be dropped, meaning that
   it doesn't need to fetch its data, and thus it should not be
   appended to the DOM (nor appear in the breadcrumbs) ;
 - execute an action A, its 'read' or 'search_read' RPC takes a
   while, during that time, execute an action B: A can be dropped
   and should not be appended to the DOM (nor appear in the
   breadcrumbs).
2018-03-16 08:08:38 +01:00
Joren Van Onder e94912b9a9 [FIX] payment: do not refund transactions if they need 3DS validation
This was already the intended behavior, but in Python a return inside
of a try...finally does not behave this way. From the Python
documentation [1]:

When a return, break or continue statement is executed in the try
suite of a try...finally statement, the finally clause is also
executed ‘on the way out.’

This can cause issues because some payment acquirers will return an
error when refunding a pending transaction. This puts the transaction
in the 'error' state which means it won't be refunded anymore.

Additionally, putting s2s_do_transaction in a try...except like this
hides any traceback that occurs which makes troubleshooting harder.

[1] https://docs.python.org/3/reference/compound_stmts.html#finally
2018-03-15 14:56:34 -07:00
Goffin Simon 0717bb6c0d [FIX] event_sale: Expected attendees for event
When making a registration for event tickets from a SO, by clicking on apply
from registration.editor.form view, duplicated event registrations
were created(in function action_make_registration) because the registration_id
was not sent to the server.

opw:1824952
2018-03-15 17:30:22 +01:00
Nicolas Lempereur 7f216f62b6 [FIX] web_editor: modal fullscreen is fullscreen
Depending on CSS surrounding the editor, the fullscreen component could
fail to set the editor fullscreen.

eg. if the editor is in a modal in a modal (ie. when editing a mail
template when adding an activity and creating a marketing automation
campaign) the fullscreen function would set it to 184px height away 30px
to the screen top.

With this change, `transform` css property is unset on parent elements
of the editor, this was causing the absolute editor to have an offset
parent that was not the body tag.

opw-1824605
closes #23682
2018-03-15 17:12:57 +01:00
Deep Patel 71de0c47f8 [IMP] base,web: settings view: enable swipe on mobile
Task 38926
2018-03-15 17:04:33 +01:00
Aaron Bohy c3be396519 [REF] base,web: move and rename settings tests file
and remove some unnecessary code
2018-03-15 17:03:32 +01:00
Aaron Bohy 3dd93ed129 [FIX] base: settings view: don't patch jQuery
especially to alter the behavior of a standard function to make it
behave like a function that is already available (defined in our
extension of jQuery).
2018-03-15 16:55:53 +01:00
Stephane Bidoul 3bf9cf4f36 [FIX] l10n_multilang: correctly set src
While it is the name of the record that is set most of the time, it can also
be different value (like tax description)

Closes #21651
2018-03-15 16:40:53 +01:00
Martin Trigaux dc7b2dff02 [FIX] crm: partial backport of 78b7996d
It appears there is more partners withotu a create_date than I expected on
legacy databases

opw-1827099
2018-03-15 16:37:02 +01:00
Aaron Bohy dbbb342eff [FIX] base: settings view: don't patch jQuery
especially to alter the behavior of a standard function to make it
behave like a function that is already available (defined in our
extension of jQuery).
2018-03-15 16:21:51 +01:00
Yannick Tivisse 206209a461 [IMP] l10n_be_hr_payroll: Add name on views to allow inheritance 2018-03-15 16:03:01 +01:00
Martin Trigaux 850d0a79b7 [I18N] product: followup of 192dc39ef7
Was stating in 192dc39ef7 that 'Public Pricelist' was already present but it
was actually 'Public Price'
So term was missing.

Still related to #23686
2018-03-15 15:47:35 +01:00
Martin Trigaux 192dc39ef7 [FIX] product: remove wrong reference to pricelist
The pricelist `list0` is name 'Public Pricelist' and is already present in the
product.pot file.
USD is the renamed name after installing website_sale

Closes #23686
2018-03-15 15:16:42 +01:00
Lucas Perais (lpe) 61216f116a [FIX] web: add many records in m2m list
Have a model with a m2m (field A)
  this m2m has also a m2m (and displayed as m2m tags in the view) (field AA)
Have a domain on field A, to trigger the search view selection
Click on add an item
Select everything in the modal, making sure that there is more than 40 records

Click on Select

Before this commit:
There was a traceback indicating the local data did not contain records >= 40
This was because the internal data repository was constrained by a limit

After this commit:
We adapt the limit of the local data repository and there is not traceback

OPW 1823400
2018-03-15 15:11:08 +01:00
Romain Derie 2b5bb95d43 [FIX] website: make 'Optimize SEO' working again (for empty fields)
This commit https://github.com/odoo/odoo/commit/965f49201812cc3cca319a3b5b93331272dd2288 removed empty meta-description and meta-keywords from
the DOM for SEO audit reasons (these tags when empty are considered as
duplicates at a SEO point of view).

By doing so it prevent the 'Optimize SEO' to work correctly since it can't
retrieve the DOM elements that are used to store the user modifications until
he saves.

Now, even when these meta-tags are empty, we display them to people having the
rights to 'Optimize SEO'.

This closes #23659
2018-03-15 15:03:34 +01:00