Commit Graph
115605 Commits
Author SHA1 Message Date
RomainLibert 9717026dcc [IMP] Resource: Expand testing on timezones
We need to check if resource module takes into account the timezone of
the employee taking a leave and the timezone of the user asking to see
when this employee has taken some leave.

Basically everything should be done in UTC internally and then converted
back to the user's timezone.
2018-02-14 14:43:38 +01:00
Haresh Shyara 3a38080ff5 [IMP] account : change unit price according to UoM
It was already the case with the sale order but not on invoices

Task-id: 35387
Closes #18719
2018-02-14 18:49:14 +05:30
Kinjal Mehta 102bb626f0 [FIX] account: changed the name of date filter in journal items search view.
As the old name 'date' of the filter was the same as the field date, the context key 'search_default_date':1 was ambigous and not well processed by the web client.
It was indeed considering on field by default and was trying to set value 1 on date field, which is not possible and it gave traceback.
2018-02-14 14:06:30 +01:00
Laurent Smet 805f3a610f [IMP] account_asset: improved depreciation dates management
related to task id 29411

    add selection field 'date_first_depreciation' on 'account.asset.asset' to manage the depreciation dates:
    -manual: set manually with the manual_date_first_depreciation field (defaulted on purchase date)
    -last_day_period: last day of purchase month/year

    add a selection field on 'account.asset.category' to set the default value as well.
2018-02-14 10:50:29 +01:00
Mathieu Duckerts-Antoine ee44d238f1 [IMP] web: close dialogs when navigating to another action.
This commit fixes a problem of usability. By the past if several dialogs were opened
(e.g. after having clicked on several one2manys) and a user would click on a many2one in a dialog,
a new view was charged but the dialog was kept open so that the change was unnoticed.
This behavior has been changed. Now all dialogs are automatically closed in such a situation.
2018-02-14 10:12:24 +01:00
3c0daf39e9 [IMP] survey: remove dependency to website
Set http_routing module as dependency of survey (to allow slug)
create website_survey to have the correct assets

Task-id: 23848
Closes #20485

Co-authored-by: Rawish Murari <rmu@odoo.com>
Co-authored-by: Rohan Patel <rop@odoo.com>
Co-authored-by: Richard Mathot <rim@odoo.com>
2018-02-14 14:28:19 +05:30
Haresh Shyara 824b48f335 [FIX] account: show payment methods only for journal of type 'bank' or 'cash' 2018-02-14 09:45:42 +01:00
Haresh Shyara 601997df6d [IMP] account_check_printing: Assign the check number on payment confirmation
Purpose
=======

Avoid issues in checks numbering.

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

When the manual numbering of the checks is ticked on the bank journal, assign and display number to the check only when the payment is confirmed, not when the check is still in draft.
2018-02-14 09:44:56 +01:00
Christophe Simonis adeea2a88d [MERGE] forward port branch saas-11.2 up to 0f02dcb639 2018-02-12 18:34:43 +01:00
Christophe Simonis 0f02dcb639 [MERGE] forward port branch saas-11.1 up to c69d00157e 2018-02-12 18:08:27 +01:00
Alexandre Kühn 83354c2b24 [MERGE] mail,web,*: JS mail and services tracebacks
* account,bus, web_editor, website, website_slides, web_tour

This merge fixes most issues where the webclient crashed with
discuss installed in mobile.

These issues occur due to the fact that the chat_manager, now
a service, was loaded after the webclient is instantiated.
The main idea of the fix is to let the webclient register services
that are loaded after its instantiation.

Despite appearances, the desktop mode had also this issue, but
most of the bugs were hidden thanks to the availability of tours
that are loaded after the module mail.
2018-02-12 16:16:06 +01:00
Alexandre Kühn 7339ae978f [FIX] mail,web,*: Cleaning some JS code
- Whitespace trailing
- Split long lines
- Replace some 'self' to 'this'
- Improved some JS docs
- DRY in tests using services
2018-02-12 16:09:38 +01:00
Alexandre Kühn 066eaaeafa [FIX] mail,web: JS mail and services tracebacks
Fix over this commit: https://github.com/odoo/odoo/commit/02ec09cb1c3e2d7bc7968f40c18f2208d7f3f498

In mobile, when discuss is installed, there is a traceback.

This is a consequence on an issue with JS services, where some of them
are not registered in the service provider.
For instance, the webclient (the service provider) was instantiated before
chat_manager (a service), so it was not aware of this service.

To solve this issue, service providers now listen on newly registered services.

Also improving deployment of JS services by not relying on topological sort.
2018-02-12 16:09:38 +01:00
Alexandre Kühn 0de5c1f076 [FIX] web{_site,_editor}: transparent root instance 'root widget'
With this commit, any component that needs an instance of the
root widget can simply require the module 'root.widget'. Based on
the context (backend, frontend, iframe), the real root.widget
will resolve to either the webclient, the website root instance, or
the iframe root instance.

This is desirable in order for the tour_manager to become a child
of the root widget, as tours are enabled in any of the above contexts.

This commit is a requirement in order to solve an issue with JS services,
in which there should be only one service provider at any given time.
2018-02-12 16:09:37 +01:00
William Henrotin dd610140bf [FIX] purchase_requisition delete requisition.
The PurchaseRequisition unlink method call the wrong variable
2018-02-12 13:52:19 +01:00
William Henrotin 7ad9f28895 [FIX] purchase_requisition remove api.multi in action_in_progress
The action_in_progress method was tagged as api.multi but badly. so we
remove it and add an ensure_one() check.
2018-02-12 13:52:19 +01:00
William Henrotin ab4b03efcd [FIX] purchase_requisition sequence handling
As the sequence name depends on the requisition type. The name must be
set not when the requisition is in draft but confirmed. In the confirm
state, the type in readonly. The name is also reset when the requisition
is put in draft.
2018-02-12 13:52:19 +01:00
William Henrotin 69890545b0 [FIX] purchase_requisition edit product price to 0
When editing a blanket order, if the price change, the price also change
in the supplier info. The issue is we can set 0 in the price.
2018-02-12 13:52:19 +01:00
Jaykishan Solanki 317f5f1111 [IMP] product: Allow to search on variants barcode/ref from template
Purpose
=======

Be able to search on the internal reference & Barcodes of the product variants from the search on product.template
https://drive.google.com/a/odoo.com/file/d/0B0ITmdw6h3ZrZmw3Ym1LUzcwYU0/view?usp=drivesdk
2018-02-12 13:20:01 +01:00
Jaykishan Solanki 62900064c0 [IMP] sale,purchase,...: Hide Variants menuitems in debug mode
Purpose
=======

Avoid confusion between product template and product variant. People don't understand that editing some stuff on the product variants may impact the other variants

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

Hide the menu Product Variants/Product Template in the debug mode

List of product menuitems
-------------------------

sales > catalog > products  (product.template)
sales > catalog > product variants  (product.product) => Add in technical
website > catalog > products (product.template)
website > catalog > product variants (product.product) => Add in technical
point of sale > catalog > products (product.template)
point of sale > catalog > product variants (product.product) => Add in technical group
purchases > purchase >products (product.template)
purchases > purchase >product variants (product.product) => Add technical group
inventory > inventory control > products (product.template)
inventory > inventory control > product variants  (product.product) --> Add technical group
manufacturing > master data > products (product.template) => Add technical group
accounting > configuration  > products (product.product)
PLM > master data > products (product.template)
lunch > configuration > products (lunch.product)
2018-02-12 13:20:01 +01:00
Christophe Simonis c69d00157e [MERGE] forward port branch 11.0 up to 169f899e29 2018-02-12 13:15:06 +01:00
Christophe Simonis 169f899e29 [MERGE] forward port branch saas-16 up to 835e5ed62b 2018-02-12 13:11:09 +01:00
Thibault Delavallée a65b0b2363 [MERGE][FIX] mail: fix notification emails not containing global links for URLs and images
See sub commits for more details. Was task 55210. #Closes #22940 .
2018-02-12 13:08:33 +01:00
Thibault Delavallée 29955b2109 [DOC] test_mail: increment activity counter
Sometimes runbot adds one query. Not sure why, let us avoid having
red runbots.
2018-02-12 13:07:41 +01:00
Thibault Delavallée 2ef1394e67 [IMP] mass_mailing: use mail thread link replacer
Mail thread now holds a method to replace local links by global links.
Let us therefore use it in mass mailing as it does basically the same
job. Adding base tag is not necessary anymore since there are not
local links or images anymore.
2018-02-12 13:07:41 +01:00
Thibault Delavallée b1b9896c46 [FIX] mail: replace local links in notification emails
Since notification emails are not mail templates anymore they do not go
through the mail_template.render_post_process() method that converts
local links to absolute links. This means that buttons and images were
not correctly displayed in notification emails. Indeed those still had
local links.

This commit fixes that by moving the method directly in mail.thread and
calling it accordingly when rendering the notification email. Note that
the method has been changed in order to use regex instead of html
parser. It is done based on work already done in mass mailing application.
Indeed using parsers is complex and time consuming and may create
changes in the html structure that are not intended.

Next step in master is to go through various link modifications in
mass mailing module to see how to handle them properly. Maybe.
2018-02-12 13:07:41 +01:00
Thibault Delavallée 94f2f6241b [FIX] mail: fix wrongly QWeb-converted bits of notification emails
Notification emails now use QWeb to be rendered instead of jinja-based
mail.template since 2f7593761c. Part of the notification emails was not working
anymore since its syntax was still using jinja. This commit fixes that.

This commit also removes strange ';' that should not be part of python code
as well as an unnecessary variable propagation.
2018-02-12 13:02:15 +01:00
Nicolas Lempereur 1c5bb8564b [FIX] web_editor: regression less editor 5af122387
In 5af12238 a change was made to have the correct hierarchy levels, but
this can cause an issue when editing less files.

This is because we now had "undefined + 1" which gives NaN which breaks
Array constructor.

opw-814579
opw-815397
opw-814322
opw-815265
opw-814021
closes #23006
2018-02-12 11:57:39 +01:00
Christophe Simonis 835e5ed62b [MERGE] forward port branch saas-15 up to 0401a7349e 2018-02-12 11:46:00 +01:00
Christophe Simonis 0401a7349e [MERGE] forward port branch saas-14 up to 851c29ce0e 2018-02-12 11:45:00 +01:00
Martin Geubelle a7b521fe44 [MOV] web, mrp: move pdf_viewer widget
This widget is generic enough to be used in other modules than mrp so
we move it in the web module.

Closes #22569
2018-02-12 11:16:21 +01:00
Aaron Bohy c265e47a63 [FIX] web,*: tests: remove src attr from img nodes
In the tests environmnent, we don't want img and iframe nodes to
perform RPCs when they are inserted into the DOM. For img nodes,
we prefixed the src attribute by '#test: ' as soon as they were
inserted into the DOM. Unfortunately, this didn't work as expected:
an RPC was done to fetch route '/web/tests?' (i.e. the tests page),
because everything after '#' in the url isn't sent to the server.

This rev. completely removes the src attribute of img nodes, and
set a 'data-src' attribute with the original src attribute's value,
so that it can still be checked in the tests.

Tests using this attribute have been adapted accordingly.
2018-02-12 11:13:42 +01:00
Aaron Bohy 5c67abd0d3 [REF] web: tests: move calls to removeSrcAttribute
In the tests environment, we listen to the 'DOMNodeInserted' event
to remove the src attribute of img and iframe nodes as soon as they
are inserted into the DOM, so that they don't perform RPCs.

However, this listener was bound in the create(Async)View, and
createActionManager helpers only. This rev. moves it to the
addMockEnvironment helper which is more global, and basically used
by all tests.

Moreover, we now listen to the 'DOMNodeInserted' event on the body,
instead of on the widget, as it may happen that some content is
inserted into the DOM outside the widget itself (e.g. dialogs are
appended to the body).
2018-02-12 11:13:42 +01:00
Aaron Bohy 11dff2b05c [FIX] web: ListView: format footer values
Before this rev., the aggregates values displayed in the footer of
list views were formatted according to the field type, and the
field's widget was ignored, whereas it should be used by default.
For instance, if the 'float_time' widget is set on a float field,
the sum should be formatted as FloatTime as well.

Closes #22724.
2018-02-12 11:11:43 +01:00
Aaron Bohy 0982ceaa37 [FIX] web: ListView: reset selection when reloading
Before this rev., the list of selected records wasn't correctly
reset when the list was reloaded (e.g. when coming back using the
breadcrumbs). In the UI, the records weren't selected anymore, but
in javascript, the list of selected records wasn't empty. As a
consequence, the aggregates were wrongly computed, and always
displayed 0.

Closes #22725.
2018-02-12 11:11:43 +01:00
Lucas Perais (lpe) b6d156ad7a [FIX] web_planner: take 'view_type' of action into account
Before this commit, when a planner made a link from an action, the view_type was always 'list'
This prevented the view from being properly loaded, as an action of view_type form wouldn't be recognized

After this commit, such links are well formed, and form view_type actions are correctly loaded

OPW 806758
2018-02-12 11:05:30 +01:00
Christophe Simonis 851c29ce0e [MERGE] forward port branch 10.0 up to 0351677a00 2018-02-12 10:52:34 +01:00
Géry Debongnie e0cb522bf2 [FIX] web: update form widgets when state has changed
Since the <widget> tag is not used anymore in any of our views, it was
not really properly supported. In particular, the form widget was not
notified when the state of the form view has changed, which makes it
very difficult to actually do any useful work.

With this commit, we make sure that the widget method 'updateState' (if
it exists) is called with the new state whenever it changed.

This should allow developers to do useful work without having to work
around the issue. Note that this is not really a perfect solution, since
the updateState methot may or may not have been implemented.

I think that we need some kind of ViewWidget abstraction, which could be
used to have a better and more complete API for widgets in a basic view.
And AbstractField could inherit from ViewWidget.
2018-02-12 10:35:54 +01:00
Raphael Collet 107b82f6e1 [IMP] clean up use of cursors in tests 2018-02-12 10:31:59 +01:00
Raphael Collet 7ea4f13f16 [REF] tests: TestCursor is now a proxy to a real Cursor
This allows rpc requests in `HttpCase` to use the cursor `self.cr`, which is
now shared between the Python test and the rpc requests.  This simplifies code
to prepare a JS test, and code to check the result of a JS tour.

Fixes #12237
2018-02-12 10:31:59 +01:00
Raphael Collet 9e6bc391be [FIX] stock: workaround to make dp work in tests 2018-02-12 10:28:59 +01:00
Rémi Rahir 8b9bcf1b7e [FIX] crm_phone_validation: fix lead phone validation
Fixes country_id and company_id mismatch in 65832dc.

Removes the view added by said commit as it was not a true stable
fix since it required users to update the module.

This commit uses a workaround to get the missing company_id field
which is monkey-patching the fields_view_get of the model, as
suggested by rco.

This commit also removes the exception catches that were rendered
useless by the False value given to the raise_exception parameter
of phone_format, introduced in 65832dc as well.

This commits fixes the behaviour in the website form as the phone
numbers were sanitized but never saved as such on their record.

This commit also renames the Phone Validation config setting to
suit its true functionality.
2018-02-12 09:16:17 +01:00
Barad Mahendra 459a53ddb5 [IMP] crm: Remove 'To Close Today' and 'To Close This Week' filters
Purpose
=======

They make no sense, expected closing is just a guess.
2018-02-12 07:53:02 +01:00
dbh 6666bc9f75 [IMP] crm: show currency symbol in lead quick create form
The monetary widget is missing on the view
2018-02-12 07:52:23 +01:00
Odoo Translation Bot 09923c7bf6 [I18N] Update translation terms from Transifex 2018-02-11 07:05:39 +01:00
Odoo Translation Bot 26468bfaba [I18N] Update translation terms from Transifex 2018-02-11 04:26:28 +01:00
Odoo Translation Bot 0351677a00 [I18N] Update translation terms from Transifex 2018-02-11 00:48:18 +01:00
Olivier Dony b8c8a5aef8 [FIX] l10n_fr_hr_payroll: adapt terminology for simplified payslip
Partial adaptation of terminology for simplified french payslips.
A thorough review of the current payslip is necessary and planned.

Cfr. https://www.economie.gouv.fr/entreprises/nouveau-bulletin-paie

OPW-805984
2018-02-09 18:20:57 +01:00
qdp-odoo 2aabdc00c3 [FIX] account: allow XML-RPC call to action_validate_invoice_payment on account.payment.
The method was returning no value (~None) which then blown up when serialised back to XMLRPC. Fixes #22630
2018-02-09 17:29:56 +01:00
Thibault Delavallée adea9fa6cb [IMP] mail: remove commented code
Leftover of last commit due to wrong push. My bad.
2018-02-09 16:48:08 +01:00