Commit Graph
117975 Commits
Author SHA1 Message Date
Martin Geubelle c13c9e0b5c [FIX] web: invalid domain in DomainSelector
A domain could contain the key `parent` (in an embedded subview), like:

    domain="[('display_name', '=', parent.display_name)]")

This is currently not handled by the DomainSelector.

This will probably be handled in a future version but for this stable version,
this case that triggered an error is now catched and an error message is
displayed in the widget.

This was causing a traceback when opening a domain with `parent` in the edition
of a subview with Studio.
2017-11-08 17:19:28 +01:00
Raphael Collet b206d83c03 [FIX] ir_cron: refactor _acquire_job to retrieve useful information
The method `_process_jobs` provides an alternative API to process the cron
jobs, that does not catch exceptions and log them.  This makes the processing
of cron jobs easier for scripting.
2017-11-08 16:03:16 +01:00
Raphael Collet 763d714f0e [FIX] ir_cron: do not run cron jobs during module installation/upgrade 2017-11-08 15:57:33 +01:00
Nicolas Lempereur 9f0bc83788 [FIX] web: calendar IE9+ incompatibility
The "Event" API is not the same between IE9 till IE11 and all the other
browser (eg: IE Edge, google chrome, firefox, ...).

For example here is a seemingly accepted polyfill to have it working the
'same' on most browsers using CustomEvent:

https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill

This commit just trigger the event with jQuery which attains the same
result but work everywhere.

opw-780056
closes #20759
2017-11-08 15:55:40 +01:00
Martin Trigaux abf8568879 [FIX] fleet: fix typo
Courtesy of translator teams
2017-11-08 15:52:30 +01:00
Dave Lasley aa3834b9fa [IMP] tools: Add note to ormcache regarding closed cursors
Returning a recordset from a cached method will raise an
`psycopg2.OperationalError` once the cursor is closed.

Add documentation to `ormcache` method indicating such
See OCA/stock-logistics-barcode#93 and #8795 for example of issues

Closes #19113
2017-11-08 15:30:59 +01:00
Pierre Masereel 2d3e6d7383 [IMP] purchase: edit received quantity on purchase_line when type service
When we purchase products of type services,the received quantity is
always set to the ordered quantity.

We want to be able to manually enter a received quantity on service
products to have a better trace of what have been received or not.

We show the picking stat button olnly if there are picking

We show the columns qty_received, qty_invoiced and invoice_status
depending on the parent state, and not depending on the context passed
in the menu item.
2017-11-08 15:28:07 +01:00
Martin Trigaux 0f10589eb4 [FIX] base,sale_timesheet: English
Thoses -> those
Add model description

Courtesy of translators for report
2017-11-08 14:27:48 +01:00
Stefano Rigano 0a5b2ea831 [IMP] account: Configuration steps UI improved
* responsiveness
- Force flex-flow (avoid to apply side-chatter rules)
- Use odoo base padding
- Hide the configuration steps on mobile

* use same name in settings
* improve design

Was PR  #20754
2017-11-08 13:29:28 +01:00
Jeremy Kersten 35aa2a977f [FIX] website_slide: fix traceback when slide is a google doc or youtube link
In case we are not uploading a file but add a slide based on google doc url
or youtube link, post['datas'] is not set and the code will crash.

Javascript don't check the onError, so the user never see the error and wait
 that nothing happend.
2017-11-08 13:00:07 +01:00
Thibault Delavallée a25358eae3 [REM] hr: remove unimported file
Leftover of 78ac6de52d code about mail gateway was moved to
mail_alias.py but mail_thread.py file was not removed.
2017-11-08 12:55:33 +01:00
Thibault Delavallée 20d8025036 [FIX] mail: followers alias check on models not inheriting from alias mixin
You could try to check followers on a model not inheriting from mail alias
mixin. In that case current code would check followers on a void mail
alias mixin record, meaning no followers found. Instead we now
differentiate the class method from the method checking record properties.
2017-11-08 12:51:13 +01:00
Thibault Delavallée d6a5c126e7 [FIX] mail: correctly return and log error message when checking aliases
Mesage should be message otherwise it is not displayed in the logs.
2017-11-08 12:47:12 +01:00
Nicolas Lempereur 54d5678696 [FIX] board: manage modifiers on save
With da136d83 we have modifiers on every elements but when saving them
for dashboard they have to be stringified to be used.

Also a part of a previous code was still present that removed context
and domain from a saved dashboard when modifying it.

opw-779071
closes #20725
2017-11-08 12:43:55 +01:00
Odoo Translation Bot 43e5f5a67f [I18N] Update translation terms from Transifex 2017-11-08 11:08:53 +01:00
Géry Debongnie 9e97ad8dce [FIX] web: prevent useless discard dialog from showing up
Here is a scenario that could cause an issue:
- open a form view with a many2one
- click on edit button
- click on small external button for many2one. this opens a modal form
  view
- click on save in the modal (without changing anything)
- click on save in the main record
- exit form view. this opens a discard dialog

There were two issues here:
- saving the modal dialog automatically marks the many2one field as changed.
  This was necessary to force reloading the data, because editing a sub value
  in the modal form view could have changed the display_name of the manyone
  field.  However, this is not necessary when no change was done.
- when saving a record, the _isDirty flag was reset to false only if an
  actual rpc was done.  However, it may happen that the flag is set to
  dirty (for example, when modifying a value inside a many2one), but the
  main record has no changed fields.

In this commit, we also remove the on_save handler in the
formviewdialog.  This is a small refactoring in a stable version, but no code
currently use it, and I believe that it will make the code much easier
to maintain (the previous code was really awkward), so I think that the
tradeoff is acceptable.
2017-11-08 10:50:12 +01:00
Thibault Delavallée 53ad585bfc [FIX] mail: ease activities management through documents
This commit improve the daily use of activities by delegating activities
management to the document. Activities are already managed on document
through the UI either in form view or in kanban view.
2017-11-08 10:42:31 +01:00
Martin Trigaux 36caadaf6a [IMP] calendar: translate calendar reminders name
and rename the alarms by email for a better name

Makes sense to be translated as general and useful to have it as data.

Fixes #20634
Closes #20644
2017-11-08 10:23:45 +01:00
Lucas Perais (lpe) 324d4bfb56 [FIX] web: fields set in fieldDependencies should have their "options" set
Bug brought by f45edfb

Before this commit, the debug manager crashed when clicking on "set defaults" on a view fetching a fieldDependency.
This was because the "options" key on the field was not set when the field originated from the fieldDependency of a widget.

After this commit, the data_manager ensures that key is present

OPW 780071

closes #20730
2017-11-08 10:21:32 +01:00
Martin Trigaux 42a402bf0e [FIX] calendar: move event type to demo data
Event type is dependant of the business time

Partially fixes #20634
2017-11-08 10:01:42 +01:00
Thibault Delavallée f8c974cf6e [FIX] mail: speedup tracking values computation when reading messages 2017-11-08 10:00:47 +01:00
Wolfgang Taferner 13f9d8a502 [FIX] stock: key error due to bad search/replace -> typo 2017-11-08 08:41:31 +01:00
Olivier Dony eb391c2ae2 [IMP] base: improve consistency of ACL views
Further improves on previous commit:

- Remove some unnecessary cruft
- Make names/labels more consistent
- Make fields and their ordering more consistent in list views
- Change "active" field on rules into an "Archive" button
- Slightly improve inline doc on rules form view
- Add colors for "global" rules and "apply-for-all" access rights
  ('Global' is an info, but "Apply For All" is a warning, as it can
   indicate an ACL problem)
2017-11-07 18:26:40 +01:00
Florent de Labarre 01d5d7b4d9 [IMP] base: improve visibility of ir.rule entries
- Add a tab to view applicable rules on the form view of Models
- Add a few missing fields in the rules list on the form view of user
  Groups

Closes #20702
2017-11-07 18:26:40 +01:00
Martin Trigaux c7e0a802a6 [FIX] sale_payment: correct plural form
To make it translatable
2017-11-07 16:50:41 +01:00
Jeremy Kersten 15715e822c [FIX] hr_timesheet_sheet: avoid ambigous field action in sql.
ERROR: column reference "action" is ambiguous

This commit closes #13839
2017-11-07 16:32:09 +01:00
Christophe Monniez 5048f6e642 [IMP] hr_recruitment_survey: Improve test to cover more features 2017-11-07 16:26:15 +01:00
Christophe Monniez f5bf961258 [IMP] account: Remove unused yml files 2017-11-07 16:26:15 +01:00
Christophe Monniez 16a374c0fe [IMP] l10n_fr: Remove unused yml test 2017-11-07 16:26:15 +01:00
Christophe Monniez 5411fbeae7 [IMP] base: Convert res_partner demo yml file into xml 2017-11-07 16:26:15 +01:00
Aaron Bohy 0f638b3c63 [FIX] web: correctly evaluate domains and contexts in dialogs
An error occurred if the domain or context applied on a view
opened in a dialog needed to be evaluated (e.g. if they contained
something like [['some_field', '=', uid]]). For instance, create
a custom filter with such a domain for the Contact model, then go
to Contact, create a new one, and on the parent_id many2one, click
on search more. Before this rev, no eval context was given so the
domains and contexts couldn't be evaluated, and it crashed.
2017-11-07 15:33:23 +01:00
Christophe Simonis c3746bc3dc [MERGE] forward port branch 11.0 up to 449ec5e29d 2017-11-07 15:33:04 +01:00
Christophe Simonis 449ec5e29d [MERGE] forward port branch saas-16 up to 255478acbd 2017-11-07 15:28:28 +01:00
Nicolas Martinelli 3b43ddd21b [FIX] crm: default user when copy
- Create a user A
- Create a lead, assign to A
- Deactivate user A
- Duplicate the lead

A notification email is sent to A (user assigned to the lead).

Since the user is archived, he should not receive any email since it
might contain sensitive information.

opw-778825
2017-11-07 14:47:31 +01:00
Christophe Monniez 8670f62e3c [REF] documentation: reorganize setup/install
Odoo setup/install documentation needed a re-organization and an update
to reflect the latest dependencies versions.
There was too much warnings and danger signs on this page.
Finally, the structure was not the same for each install method.

* As CentOs is actually too old to handle python3 dependencies for Odoo,
  rpm install method is explicitely mentioning Fedora 26.
* The "yum" package manager has been deprecated in Fedora and replaced
  with "dnf".
* As Debian and Ubuntu don't ship a python3-num2words package, the
  documentation must provide a hint on how to install the module using pip.
* The documentation was missing the virtualenv way of installing Odoo.
* Paragraphs mentioning configuration file were removed. The
  reference/cmdline page should be updated consequently.
2017-11-07 14:22:43 +01:00
Yannick Tivisse 1c178eb896 [IMP] convert.py: Extend accessible variables in '_tag_record'
Purpose
=======

Currently on <record> tags, it's impossible to use 'datetime' or 'obj' when using 'search' attribute on a field.

The following example won't work:
<record id="foo" model="model.model">
    <field name="bar_id" search="[('company.id', '=', obj([]).env.user.company_id.id)]"/>
</record>

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

Use '_get_idref' to extend the accessible variables on the 'safe_eval' computation.
2017-11-07 14:15:13 +01:00
Rémi Rahir e08ce34334 [FIX] doc: iap doc
Added missing images in the documentation.
2017-11-07 14:13:50 +01:00
Martin Geubelle 255478acbd [FIX] web: clear m2o input at creation cancel
After entering a value in a many2one, if one clicks somewhere else, a popup
is opened to suggest the user to create (or not) a new record with the entered
value.

Before this rev, closing this popup resulted in an unclear situation where the
input was still set with the entered value but the new record hadn't been created.

This commit fixes this by clearing the input value if the record is not created.

See task#36055
2017-11-07 14:12:18 +01:00
Simon Lejeune 2fe84fd217 [FIX] stock: a view location cannot contain any quant 2017-11-07 14:01:33 +01:00
Martin Trigaux d0e1650042 [FIX] sms: correctly fetch the phone number
`records` is the `active_model` object
from `records`, we retrieve `partners` on which there is a field mobile

Fixes #20134
2017-11-07 13:50:59 +01:00
Martin Trigaux 35b66c8f9e [FIX] sale_timesheet: clarify field label
Was unclear
Courtesy of the translators team
2017-11-07 12:17:39 +01:00
Nicolas Martinelli 02dfd4fed8 [FIX] l10n_us: ABA/Routing number
Edit/create a bank account:
- Add a correct ABA number => nothing is displayed
- Add an incorrect number (e.g. with letters) => it crashes

Combining an `Integer` field with a `char` widget is just a bad idea...

opw-781069
2017-11-07 12:14:45 +01:00
Christophe Simonis 45958ab312 [MERGE] forward port branch saas-16 up to 5f9c3f51a8 2017-11-07 11:45:42 +01:00
Yannick Tivisse 70a521205a [IMP] l10n*: CoA loading yml files to xml 2017-11-07 11:43:46 +01:00
Yannick Tivisse 5b8e4a370e [IMP] hr_recruitment_survey: Convert yml test into python 2017-11-07 11:43:46 +01:00
Jeremy Kersten f8bf66b6de [FIX] website_crm_partner_assign: assign opportunity to the commercial_partner_id
Before this commit, an opp created from a contact via the portal was assign to
himself instead of the commercial_partner_id.

So the saleperson was not assigned to the opportunity, and the opp created was
not for the company but for the contact only.

That make sense to share the opp to the company and assign the saleman directly.

Thanks to GBR for the reporting.
2017-11-07 11:38:12 +01:00
Christophe Simonis 5f9c3f51a8 [MERGE] forward port branch saas-15 up to db4886d511 2017-11-07 11:01:14 +01:00
Christophe Simonis db4886d511 [MERGE] forward port branch saas-14 up to 928a284b11 2017-11-07 10:59:45 +01:00
Nicolas Seinlet 6488682cd6 Backport 2d66d9a63e
[FIX] *: do not use groups when extending an asset bundle
Using groups when declaring an extension of an asset bundle leads to a
different generated asset bundle according to the user's group. This
is not something we want because a dynamic asset bundle's content
means that it could (and it does) trigger unwanted cache invalidation.

website_event, website_blog, website_forum and website_sale add
functions to . These functions are bound to
server side qweb nodes protected by groups. We can always add the
functions; if a user tries to use the routes he should receive a
traceback because of lack of access rules

website_blog adds a  module, but is guarded by
the presence of a node in the DOM. We use the same logic to guard the
module added by website_sale with the  node.

website_gengo is working as expected.
2017-11-07 10:57:06 +01:00
Nicolas Martinelli a824b9121f [FIX] l10n_us: ABA/Routing number
Edit/create a bank account:
- Add a correct ABA number => nothing is displayed
- Add an incorrect number (e.g. with letters) => it crashes

Combining an `Integer` field with a `char` widget is just a bad idea.
Therefore we simply change the type of field and add the appropriate
contraint.

opw-781069
2017-11-07 10:52:21 +01:00