Commit Graph
117975 Commits
Author SHA1 Message Date
Lucas Perais (lpe) 1ffe85f1cb [FIX] base: prevent App Switcher action to be selected as home action on user
Before this commit, one could choose the App Switcher as his Home action.
and arriving on /web would trigger an infinite loop at startup

After this commit it is not possible to choose the App Switcher as Home action anymore

OPW 800323
2017-12-20 15:08:53 +01:00
Nicolas Lempereur a1da9eec41 [FIX] payment: reload on kanban acquirer install
When installing a payment acquirer from the kanban view, this would by
luck display the form view correctly.

But if we go back to the listing then forward to the form view, things
go awry.

This is because the listing action views have not been updated after the
module installed, this worked at install because we loaded a new action.

This commit change the action so when installing a payment acquirer from
the kanban view, the view is simply reloaded.

opw-786454
closes #21757
2017-12-20 14:14:43 +01:00
Thibault Delavallée cc652c65ec [FIX] l10n_generic_coa: make invoice line demo real records
Otherwise you cannot reinit the module because you cannot remove lines
of confirmed invoices. The (5, 0) command crashes.
2017-12-20 13:54:10 +01:00
Thibault Delavallée dd47abdcc3 [FIX][IMP] stock: set picking_warn as non required
When reinitializing modules it is impossible to create partners if
stock is installed because picking_warn field has a required column
but no default value if the module does not depend from stock. Use
case is trying to run test_mail tests with stock installed.

As this field is not business critical it is now not required. As there
is a default value behavior should not change for users.
2017-12-20 13:53:45 +01:00
Thibault Delavallée 06a02ae4c2 [FIX][IMP] account: set invoice_warn as non required
When reinitializing modules it is impossible to create partners if
account is installed because invoice_warn field has a required column
but no default value if the module does not depend from account. Use
case is trying to run test_mail tests with account installed.

As this field is not business critical it is now not required. As there
is a default value behavior should not change for users.
2017-12-20 13:52:01 +01:00
Arnold Moyaux 0322f6e51f [FIX] stock: return with a different uom.
Usecase to reproduce:
- Create a new unit of measure "Pack of 6" of UoM Categ = units
- Create a new product: Coca cola can, sell in unit, purchase in packs
- Create a PO, buy 1 pack of this product
- Receive the pack from the delivery order
- On the picking you just received, click on return
-> If you validate the wizard by clicking on "return", you get 6 packs, so you multiply by 6 the amounts of what you send as the system changed the quantity but not the Uom

It happens because the system compute the quanity to returns in terms of quant uom but when creating the return move it copies the origin move uom.

This commit uses the quant uom on the return move and also adds the uom in the view in order to be less confusing for the end user.

opw-800566
2017-12-20 13:39:36 +01:00
Nicolas Martinelli 8b69b2f732 [REF] account: hook for currency rate
Commit 74e4130f5f makes sure to make the accounting date prevail on
the invoice date when it comes to currency conversion.

However, the choice of date is not universally recognized. Softwares
(and accountants) might use either the accounting date or the invoice
date.

Therefore, we provide a hook se the behavior of the software can easily
be changed if necessary.

opw-783372
2017-12-20 13:35:43 +01:00
Laurent Smet 5cca55dac7 [IMP] account, account_cancel: cancelling paid invoices
When an invoice is paid, the button "Cancel" was not visible. For a better guidance, we now show that button.
    Indeed, after having unreconcilied the invoice and the payment, the user should be able to cancel the invoice.

    It also now allows to cancel wrongly encoded invoices with 0 as total (they were directly marked as paid, preventing
    their cancellation)

    Was PR #20470. Was task: https://www.odoo.com/web#id=34307&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720
2017-12-20 13:23:22 +01:00
Martin Trigaux d8f1935068 [I18N] fetch missing languages
Some new languages were skipped and had no files.
Import all files for all languages
2017-12-20 13:02:37 +01:00
qsm-odoo 16065f3ee2 [FIX] website_sale: hide checkout btn on emptied cart in all languages
When an user goes to its cart and removes all the items, the checkout
button is hidden so that the user cannot start an order with no product.
This behavior was not working in languages which are not the default
language of the website, as the button was found in JS relying on the
fact it started by "/shop/checkout", while it can be something like
"/fr_FR/shop/checkout".

Closes https://github.com/odoo/odoo/issues/21722
2017-12-20 12:25:53 +01:00
Yannick Tivisse 8af1f9b54c [FIX] point_of_sale: Avoid using unicode in views
Purpose
=======

There's a lot of occurence in Odoo with unicode in views (or models).

But this one is special because it breaks the functional documentation build when loading the fields on the model pos.config with:

.. demo:fields:: point_of_sale.action_pos_config_pos
2017-12-20 11:25:19 +01:00
Martin Geubelle 2672143713 [FIX] web_tour: do not consume a tip with blockUI
To consume a tip, the elements matching the selectors `trigger` and
`extra_trigger` must exist in the dom.

However, the presence of blockUI should prevent the tip to be consumed
in the tour because the user can't physically execute the corresponding action.
2017-12-20 11:20:01 +01:00
Guillaume Masson d8846e8e64 [FIX] l10n_fr_pos_cert: bad import
Closes #21735
2017-12-20 10:57:42 +01:00
Guillaume Masson 5651f28cd7 [CLA] add metaminux to TecLib CCLA
Done at #21735
2017-12-20 10:56:49 +01:00
Yannick Tivisse f42d1cc843 Revert "[IMP] sale: Remove 'Invoice Order' from Action menu on sales orders"
This reverts commit 7b86a7beb8.

It removes the action from the sales order list view as well, which was not expected by our Product Owners team.
2017-12-20 10:46:49 +01:00
Florent de Labarre 06ccccdb75 [FIX] account: check ACL and ir.rules upon account.move cancellation
Was PR #21732. Was OPW 800611. Courtesy of Florent de Labarre
2017-12-19 17:52:18 +01:00
Thibault Delavallée f3687f7eec [FIX] test_mail: update query counters for enterprise
As on enterprise module install order can be different from community
query count for some mail-related tests are different. This commit
updates some counters to avoid breaking enterprise runbot and give
time to find the source of added queries.
2017-12-19 17:25:36 +01:00
Stéphane Bidoul (ACSONE) a8e444bea8 [FIX] l10n_lu: bad line breaks in CSV data
This was causing the creation of weird records when installing this module
2017-12-19 16:48:35 +01:00
Richard Mathot bfaab1e7aa [FIX] l10n_ch: bad description syntax in manifest
As the module description is processed by `docutils`, it should be
syntaxically valid to avoid warnings like:

    `Bullet list ends without a blank line; unexpected unindent.`
2017-12-19 16:47:12 +01:00
Pierre Masereel f1fdb97eed [FIX] mrp_sale: compute unit price of kit
When the unit price of a kit is computed in anglo saxon accounting, the
average price of kit parts is not multiplied by the quantity of this
parts in the bom.

E.g.: a kit of 2 prod1 and 1 prod2, when the price is computed, it only
take into account the cost of 1 prod1 and 1 prod2 to compute the kit
cost instead of 2 prod1 and 1 prod2

opw-786268
2017-12-19 16:27:44 +01:00
Martin Trigaux 4af12acc80 [I18N] es_ cleaning translations
The regional variations are not published on Transifex and hsould be translated
manually.

The translations are mainly from previous versions or contains buggy fuzzy
translations (not matching the real source string).

Clean based on the .pot and delete the empty files

Fixes #21733
2017-12-19 16:22:17 +01:00
Thibault Delavallée 8655b32bb8 [FIX] mail: fix tracking test with employee, reusing previous record
Query count was wrong as the tracking was not performed.
2017-12-19 15:52:41 +01:00
Olivier Colson 3415a8712f [FIX] l10n_ch: the ISR number was missing a mod10r check character in its last position 2017-12-19 15:06:42 +01:00
Nicolas Lempereur 46cf7f17a3 [FIX] web: resequence Undefined column w/ 12048bd6
There is a drawback in 12048bd6, if a kanban view with an
"Undefined" column (exist when a kanban view grouped on a relational
field and some record have this field unset) had a column resequenced a
traceback would happen if more than one column was displayed.

This happen because before we had a "undefined" ID for the "Undefined"
column and after 12048bd6 we get a framework unique ID which was not
managed.

note: this commit also adds `left`/`right` values in the dragAndDrop
test utility function so an element can be dropped at the right/left of
another element.

related to opw-782433
closes #21708
2017-12-19 14:51:40 +01:00
Nirali Sapra 11f6b294bd [IMP] mail: don't delete in-use activity types, archive them instead 2017-12-19 14:48:22 +01:00
Goffin Simon 0e0c320944 [FIX] account: Changing name Sale/purchase journal
As the domain for this report has been removed, all the types of
journals can be printed. Now the name of this report is "Journals Audit".

opw:787781
2017-12-19 14:04:04 +01:00
Nicolas Martinelli e5f61fa10c [FIX] mrp: real duration
- Create a MO which generates WOs
- User 1 starts working on it
- User 2 starts working on it

The field 'Real Duration' only displays the time spent by the user
connected. It means that there will be an inconsistency between the
field 'Real Duration' and the list of durations shown in the `time_ids`
field.

We want to keep 'Real Duration' limited to the current user, because it
should represent the duration updated in real time (done in widget
`mrp_time_counter`). However, we also want to see the total real
drations for all users. Thereofe, we simply update the view to show the
total in the list view.

opw-784456
2017-12-19 13:38:11 +01:00
Christophe Matthieu fdf0f014bf [FIX] web: avoid race condition in the website
Depending on the speed of the runbot, errors may appear if one tries to
use a template that is not yet loaded. Templates are being
loaded and we add new template to read, the ready function does not
take into account new additions.
2017-12-19 13:35:36 +01:00
Géry Debongnie 102e838473 [FIX] web: prevent double translation in kanban view
The kanban view uses a template which comes from the server, already
translated.  Before this commit, it tried to retranslate again the
template in qweb.js, which may be a problem (in addition to the useless
work): if some english string A is translated in B (french), but B is
also a valid english string which is translated into C in french, then
we will have a wrong result.

In this commit, we simply add a flag to disable the translation process, which
should also slightly improve the kanban view rendering performance.
2017-12-19 13:35:36 +01:00
Christophe Matthieu 7dfdfa0103 [FIX] web_editor: Avoid twice translated for static xml
Avoid texts to be translated twice if some modules have the translated
value corresponding to the English source term.

To reproduce: create a translation for static xml (comment 'openerp-web')
with 'Modifier' translated by 'Tadaaa'. In french context, the 'Edit'
button in forms is translated by 'Tadaaa'.

Don't translate template in web_editor if we are in the backend because
the translations of all the modules have already been loaded and applied.
2017-12-19 13:35:36 +01:00
Ankit Sathvara 149a05c6fe [REM] project: Remove the tasks merge feature
Purpose
=======

In a business point of view, it make no sense to merge record. if someone want really to merge record they have to do this manually to think about all corner case. What about id sent to the customer ? what about timesheet ? what about business ?

The idea of the task: remove this feature in both app, project.task and in helpdesk

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

Remove both features

"Merge Selected Tickets" in helpdesk
"Merge Selected Tasks" in project.task
2017-12-19 13:35:00 +01:00
Yannick Tivisse b72240e3c9 [FIX] fleet: Don't copy driver_id on vehicle duplication
Purpose
=======

There's an unicity constraint on the fleet.vehicle model.

It's thus impossible to duplicate a car if the driver is set.
Y
2017-12-19 12:47:42 +01:00
Yannick Tivisse 4288b5b6fb [FIX] l10n_be_hr_payroll_fleet: Add missing dependency on compute method 2017-12-19 12:45:38 +01:00
Nicolas Martinelli ad8e1118c1 [FIX] web: action url never call on_close method
On a tree view:
- Add a button returning an `act_url` action; e.g.:
```
@api.multi
def open_google(self):
    return {
        'type': 'ir.actions.act_url',
        'url': 'https://google.fr/',
        'target': 'new',
    }

```
- Click on a button

The action call works only once because the button is never re-enabled.

The button is actually enabled only at view rendering. Therefore, we
call `on_close` in order to reload the view.

opw-784587
2017-12-19 11:18:12 +01:00
Yannick Tivisse 1f7a9281fa [FIX] l10n_be_hr_payroll_fleet: Hide car model if transport mode not set 2017-12-19 10:51:22 +01:00
Yannick Tivisse 867f44a235 [FIX] l10n_be_hr_payroll: Store existing field company_car_total_depreciated_cost
Purpose
=======

In l10n_be_hr_payroll, the field is a simple Float field, it implied `store=True`
In l10n_be_hr_payroll_fleet, a compute method is added, and becomes `store=False`

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

Keep this field `store=True`. This could only be done because the column already exists in the database.

PS: Same reason for car_atn
2017-12-19 10:51:22 +01:00
Yannick Tivisse 3694b02604 [FIX] l10n_be_hr_payroll: Round the car value to 2 decimals in name_get 2017-12-19 10:51:22 +01:00
Yannick Tivisse 0b85adc691 [FIX] l10n_be_hr_payroll_fleet: Compute correclty car names 2017-12-19 10:51:21 +01:00
qsm-odoo 506e45e73f [FIX] payment: consider the "Save my payment data" option
Before this commit, the option was ignored. Indeed "checked" is a
DOMElement property, not a jQueryElement's one.

See https://github.com/odoo/odoo/issues/21321
2017-12-19 10:46:22 +01:00
qsm-odoo 91b3a4fa8c [FIX] payment: properly allow PaymentForm extensions
Commit https://github.com/odoo/odoo/commit/be650c5979d6d427ad79bc23f0edc1d10290f881#diff-b448c1be5e302f4819079161e4fe3de9L369
added a `require` in the middle of a file, making the whole file
require the DOM to be ready.

This was not really a problem as the module did not return anything...
until https://github.com/odoo/odoo/commit/d2815c474d7ab24a06f5365d967a602119252b95

Proper way to fix this would be to split the module in two parts, one
requiring the DOM to be ready and not the other one. However, this
commit chose to do a fix as stable as possible.

See https://github.com/odoo/odoo/issues/21702
(and https://github.com/odoo/odoo/issues/21321)
2017-12-19 10:46:22 +01:00
Olivier Dony f65f065901 [FIX] web tests: correct wrong route visibility 2017-12-19 10:12:34 +01:00
jem-odoo 56f5901ff8 [IMP] sale: make test at install
Since test cases of sale depends on account common
class test, they are executed post_install.
For some futur dev, we will need to launch them
at install (since stock module change the behavior
of consumable product for delivered quantity computation).

This commit:
- avoid test to use demo data
- reuse common helpers to generate testing
data
- make test suite share common test classes
2017-12-19 09:14:44 +01:00
jem-odoo 35e0347e4b [IMP] account,sale,expense: test when no chart of account
Accounting tests are executed post install to be sure a chart
of account is install. However, for some case, we might want
to run test at module installation, involving accounting, without
being sure a chart of account is installed.

This commit provides a base common test class with a minimal chart
of account (some journals and accounts) allowing to start tests at
installation. this class should be extended in sale or expense for
this modules to be tests at installation. We will required this for
reinvoice test in sale later (test consumable product when sale_stock
is not installed, but maybe without a chart of account). The idea is
each test suite can call method to setup their own data.

This commit also use this common test class in sale_expense.
2017-12-19 09:14:44 +01:00
jem-odoo 68a6bd8de1 [IMP] account: add log warning when skipping a test
Accounting tests are done 'post install' because
their generally requried a chart of account to be
installed before test execution.
If a test is launched before l10n install, the test
will be skipped but nobody will know it, unless you
read all the logs of your server.
When skipping a test, a warning should be displayed.
2017-12-19 09:14:44 +01:00
Christophe Monniez 231c4d5fd8 [FIX] web_editor: rte_inline tour succeed on chrome
The rte_inline tour was failing on chrome because jquery selector in
chrome does not like a space in the style selector.
On the other hand, other browsers and phantomjs need the space.
This commit change the selector to find the element on chrome and
friends.
2017-12-18 22:44:44 +01:00
Christophe Monniez 357b1422f2 [FIX] portal: verify input content instead of body
When running the portal tour, the test succeed too early because it finds
the words "Your Details" on the wrong page (/my instead of /my/account).
The selector has a match on previous page, so tour succeeded when it 's
not complete.

This commit use another selector that only match on the '/my/account'
page.
2017-12-18 21:41:03 +01:00
Christophe Monniez 637dda0d2b [FIX] account: verify that account exists before automatic reconcile
When using the fast_counterpart creation method to automatically
reconcile bank statement lines, there was no verification that the
account id was not set or that the statement was already linked to journal
entries. It was causing a traceback in some conditions when the
demo data were loaded because the fast_counterpart_creation was called
without the verification, using an XML function.

This commmit introduce the necessary verifcation.
Thanks @qdp-odoo for the review and some docstrings/comments
2017-12-18 21:33:36 +01:00
Denis Ledoux f3da958fa1 [FIX] product: price computation with dated pricelist rules and tz
Take account of the user timezone to compute the price for
pricelist rules with start / end date.

Before this revision, the date used to compare to
the dated pricelist rule is always the date of today
in UTC.

For instance:
- If a user is in timezone UTC +12
- The 10% discount on the pricelist starts on December 19
- It's currently December 18 13:00

The user did not have the discount,
because it was consdiered December 18,
while the user was already in December 19.

With this revision, we take account of the context
and its timezone to compute the date of today
and return the correct price according to the
dated start and end datetime.

opw-785203
2017-12-18 18:23:22 +01:00
Rémi Rahir ae57243dfb [FIX] iap: translation terms
Added missing translation on iap error modal.
2017-12-18 17:32:21 +01:00
Rémi Rahir a46b79f185 [FIX] iap: fixing display in the crash manager
Before this commit, there was a default behaviour reducing the padding of the qweb render
to 0 in order to display bakcground images correctly. Unfortunately, this doesn"t take in account
cases where images or more generally, qweb template were not provided in the InsufficientCreditError
message.

This commit solves this situation.
2017-12-18 17:32:21 +01:00