Commit Graph
115219 Commits
Author SHA1 Message Date
jem-odoo 357a8b7292 [IMP] hr_expense: make test smarter
This commit make expense test depending on the
same common class as the other (in sale_expense).

Some data were badly defined (test data), using
field only existing when sale is installed. So move
this part in sale_expense.

Expense tests now check analytic entries when
sumbitting an expense.
2018-01-15 17:16:05 +01:00
Jérome Maes ef3e6f740a [IMP][GDL] hr_expense: make the module conform to guidelines
This commits:
- extract default method from lambda of field
definition to avoid too long code line
- reorder method, according to guidelines
- rename method as guidelines says
- fix linting issues

This is the first step of a good code
cleaning of this module.
2018-01-15 17:16:05 +01:00
Nicolas Lempereur 06ebd7d6e5 [FIX] website_slides: display date in locale
In 10.0 since 52f268d0 some parts such as the date/datetime widget are
adapted to the current locale and not just displayed in english.

But the dates in the slides module are always in english because they
don't wait for the locale to be loaded.

To wait for the locale, this commit add a wait for WebsiteRoot.instance
ensuring that locale and other WebsiteRoot widgets are ready.

This may have been preferred to create a dummy child widget to
WebsiteRoot, this way only WebsiteRoot would need to be ready and this
would have been more extensible but this is a bigger change.

note: this fix is for 11.0, for previous version the fix is ef8cd11a6b

opw-804555
closes #22241
2018-01-15 17:00:12 +01:00
Martin Trigaux c591e4e6c1 [FIX] mail: translate model names
In the activities, the name of the models were not translated
This is only the server side of the fix.
The context needs to be added in the JS call in another commit

opw-805431
2018-01-15 16:34:39 +01:00
Nicolas Lempereur ef8cd11a6b [FIX] website{,_slides}: display date in locale
In 10.0 since 52f268d0 some parts such as the date/datetime widget are
adapted to the current locale and not just displayed in english.

But the dates in the slides module are always in english because they
don't wait for the locale to be loaded.

To wait for the locale, this commit also adds a reference localeDef on
the website.website module.

note: this fix is only for [10.0,11.0[, another fix must be done in 11.0

opw-804555
closes #22241
2018-01-15 16:31:19 +01:00
Christophe Simonis b3f44032c1 [FIX] web: adapt test to new dom structure 2018-01-15 15:48:45 +01:00
jem-odoo 1d9c3a0bda [FIX] sale: reinvoice policy
When reinvoicing, an SO line should only be
incremented if the product policy is sales prices,
and in delivered qty. Otherwise, a new SO line is
created.
2018-01-15 15:17:04 +01:00
jem-odoo 10a4c36054 [FIX] account: avoid regenerating analytic entries when validate invoice
When validate and invoice with analytic account on
some invoice lines, analytic entries are created
with the account move creation, after that the move
is posted (still in the invoice validation) and the
analytic entries are regenerated (meaning deleted
and recreated).
As consequence, performance are bad, but also, since
in vendor bills flow, the creation of AAL can create
a new sale order line, we will get 2 SOL (one empty).

This commit avoid creating the first analytic entries
(the ones deleted on move posting) when validating
an invoice.
2018-01-15 15:17:04 +01:00
jem-odoo aa8a39fc4f [FIX] hr_timesheet: change project of timesheet when changing task
When we change the project of a task, we want the
related timesheets to be linked to the new project.
However, since a timesheet is an analytic line with
a project, a task with timesheet can not be without
project. In that case, an error is raise to prevent
this case.

opw-803811
2018-01-15 15:15:45 +01:00
Christophe Simonis 5a83c9143d [MERGE] forward port branch 9.0 up to 11c73cd0aa 2018-01-15 14:39:29 +01:00
Yannick Tivisse 628cddca24 [FIX] l10n_be_hr_payroll: Allow to edit wage_with_holidays
Purpose
=======

Currently, when editing the number of holiday days, the field wage with holidays is computed.

The goal of this commit is to allow to edit the wage_with_holidays field and compute the wage amount instead.
2018-01-15 12:50:11 +01:00
Nicolas Martinelli 25eacbf900 [FIX] stock: unset warehouses
warehouse_ids may contain values even if the field is not ticked.
Better fix will come in master.

This reverts commit 6d5c2d0bea.
2018-01-15 10:59:48 +01:00
RomainLibert 6187ffa258 [MERGE] hr_holidays: split model hr.holidays and clean code
* Remove unused 'Remaining Leaves' report
* Split hr.holidays into hr.leave and hr.leave.allocation
* Split/Rename models/views according to guidelines
* Remove 'only-used-once' inline methods
2018-01-15 10:40:01 +01:00
RomainLibert 58c22bb33b [REF] hr_holidays : Remove 'only-used-once' inline methods
Purpose
=======

These methods were used only once in the models as they were very short
we decided to simplify the code by inlining them
2018-01-15 10:38:31 +01:00
RomainLibert a0f4f6548b [REF] hr_holidays: Split/Rename models/views according to guidelines
Purpose
=======

Follow the coding guidelines (https://www.odoo.com/documentation/11.0/reference/guidelines.html)

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

* each model has now its own .py file
* view files have better names
* reordered the methods for readability
* reimplemented email subtypes
2018-01-15 10:38:31 +01:00
RomainLibert f61687a4cd [IMP] hr_holidays : split hr.holidays into hr.leave and hr.leave.allocation
Purpose
=======

Have a clear distinction between leave and allocation requests instead of
using the same model to mix 2 different concepts.

Splitting the model will allow different business code to be run on each
model as allocations and leaves are not exactly the same thing; this
will add some code but simplify future improvements

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

1/ Completely separate the models

Model hr.holidays has been split into leave.request and
leave.allocation.

2/ Make reporting working again by using an SQL view aggregating data
from leaves and allocations

A new report has been added in order to aggregate
datas from both allocations and requests. The views have been modified
accordingly.
2018-01-15 10:38:31 +01:00
RomainLibert 1103dda8ae [REM] hr_holidays: Remove unused 'Remaining Leaves' report
Purpose
=======

This report was not used anywhere so we decided to remove it
2018-01-15 10:38:31 +01:00
RomainLibert 1734b8f8de [IMP] crm: onboarding
- Add missing tour stage in crm creating opportunity and minor fixes
- Label, Placeholder and Tip IMP
- Restrict Create new sales channel
- No Content Help Improvements
- Schedule Activity Button Layout Change
- Chatter Log IMP
2018-01-15 10:23:13 +01:00
RomainLibert ae58fd5bd3 [IMP] WEB: Progressbar Subgroup count in Sumfield
The idea is that when we click on either the green, orange or red part
of the progressbar the count on it's right changes to whatever the value
of filtered records should be.
2018-01-15 10:23:13 +01:00
RomainLibert e5330857b7 [REM] Removed mass archiving from kanban view
As discussed with fgi and apr mass archiving has been removed in kanban
it has been judged too dangerous for the new users that won't be abble
to easily revert the archived records
2018-01-15 10:23:13 +01:00
RomainLibert 8aa27eeefd [IMP] Base: Forwarding missing model context
This change allows us to get the model context in order to know if we
have a lead or an opportunity which is important to display the right
word.
2018-01-15 10:23:13 +01:00
Alexandre Kühn 2a5488619d [FIX] web: disable {bin_size: true} on binary fields
Revision on 41fe7f9d11

This commit intended to reduce the network load when reading records with
binary fields. This was made possible by enforcing the contextual key
`bin_size` to be set for records with binary fields.

However, it is causing some issues (see #22222, #22231) which are:
    - write with bin_size:true generates a traceback
    - read/search_read with bin_size:true breaks some images
      on some views (e.g. base.view_partner_form)

Since the problems outweight the gain of these changes, we revert them.
2018-01-15 10:03:14 +01:00
Nicolas Martinelli d8112b0238 [FIX] purchase: change invoice date
- Create a PO, generate the vendor bill
- Change a price unit
- Change the invoice date

The price unit is reset to the PO value.

We only recompute it if the currency of the invoice is different from
the currency of the PO.

Fixes #22164
opw-804894
2018-01-15 08:47:05 +01:00
Odoo Translation Bot 4da2db8b11 [I18N] Update translation terms from Transifex 2018-01-14 07:04:25 +01:00
Odoo Translation Bot 2a244e3e66 [I18N] Update translation terms from Transifex 2018-01-14 04:22:50 +01:00
Odoo Translation Bot aa875b08af [I18N] Update translation terms from Transifex 2018-01-14 00:41:46 +01:00
Joren Van Onder 11c73cd0aa [FIX] stock_landed_cost: round former_cost of valuations for total_cost
When computing the total_cost of a landed cost make sure to round the
individual costs of the valuation lines the same way as done by the
ORM (i.e. with the 'Product price' precision).

Otherwise the sum of the additional costs on the valuation lines will
not equal the price of the cost lines. This is wrong and leads to
errors during validation.

opw-804396
2018-01-12 11:14:09 -08:00
Christophe Simonis 03a36a9bba [MERGE] forward port branch saas-11.1 up to 56974322f8 2018-01-12 19:13:10 +01:00
Christophe Simonis 56974322f8 [MERGE] forward port branch 11.0 up to 3b80a059ff 2018-01-12 19:03:00 +01:00
Christophe Simonis 3b80a059ff [FIX] base: python3 compatible code (from forward-port) 2018-01-12 18:26:04 +01:00
Christophe Simonis b42b9c936b [MERGE] forward port branch saas-16 up to 3b7bf3a4b8 2018-01-12 18:15:23 +01:00
Odoo Translation Bot d6e3463dcd [I18N] Update translation terms from Transifex 2018-01-12 17:48:53 +01:00
Martin Trigaux afc2bb92e9 [I18N] Update translation terms from Transifex 2018-01-12 17:27:04 +01:00
Christophe Simonis 3b7bf3a4b8 [MERGE] forward port branch saas-15 up to 8962b8ecc2 2018-01-12 17:23:10 +01:00
Christophe Simonis 8962b8ecc2 [MERGE] forward port branch saas-14 up to d35a76ee17 2018-01-12 16:47:12 +01:00
Christophe Simonis d35a76ee17 [MERGE] forward port branch 10.0 up to d76237e038 2018-01-12 16:16:51 +01:00
Alexandre Kühn 41fe7f9d11 [FIX] web: contexts on field widgets + enforce bin_size for binary
Field widgets now have a key 'context' that let them
extend the context of the dataPoint (e.g. list).

In particular, widgets on binary fields enforce the contextual
item {bin_size: True}, so that the server gives the size of the
binary field as its value, instead of its content.

This change on binary fields reduces network load when accessing
a view with binary fields.
2018-01-12 16:12:49 +01:00
Alexandre Kühn 7813a8e714 [FIX] web: binaryfile field in list views
Revert partially 255e8ca3d9

Removed widget 'download_link', as it was a sub-version of widget 'binary':
it did the exact same thing (representation of binary fields by means of a download link)
in a much better-looking way (download icon + filename as text of the download link,
instead of just a download link with text "Download").

Also, the values of binary fields might be already a human-readable binsize (e.g. 2.52 MBs),
instead of its plain textual string representation in base64:
The contextual parameter 'bin_size', when set to true, does not download the data of binary fields.
As a consequence, the server provides the sizes of the binary, instead of their value.
2018-01-12 16:12:49 +01:00
celm1990 c3e3770f06 [FIX] account: state cancelled not exist on invoice
The domain was using a wrong 'cancelled' state
Bonus: avoid code redundency

Closes #22121
2018-01-12 15:47:39 +01:00
Christophe Simonis d76237e038 [MERGE] forward port branch 9.0 up to 26d3b77a1d 2018-01-12 15:32:15 +01:00
Randall Castro aea2cafd18 [CLA] signature for rcastro-tyc
Done at #22184
2018-01-12 15:19:50 +01:00
Guillaume Masson 26d3b77a1d [CLA] update CCLA for META IT
To add github username
Closes #22185
2018-01-12 15:17:17 +01:00
Raphael Collet 2304edd46c [IMP] *: avoid non-stored dependencies 2018-01-12 15:00:01 +01:00
Christophe Matthieu 05fe5384fe [FIX] account: manual reconciliation open the first line when validate
the opening is done even when there is still an open line
2018-01-12 14:28:45 +01:00
Christophe Matthieu d0a545df78 [FIX] account: hide 'Write-off' button if the currency balance is null
Issue: display the 'Write-off' button is very confusing for the user,
because in the bill, the amount is null but not in the converted value.
2018-01-12 14:28:45 +01:00
Martin Trigaux f166a3b69a [FIX] website_blog: correct RSS feed
Order blogs by post_date
write_date is changed each time a new visitor reach the page (number of visit)

Fixes tw:legalsylvain/status/951559451399671808
Closes #22198
2018-01-12 14:16:05 +01:00
Raphael Collet ca9d2b3006 [IMP] fields: log when a stored field depends on a non-stored field
Log an info when a field is computed and stored, but not all its dependencies
are stored.  Also allow to set explicitly `depends` on a field; this is useful
to restrict the dependencies of a related field.
2018-01-12 14:13:37 +01:00
Nicolas Martinelli d0dbd570b6 [FIX] mrp: digits in move.production.lots
Add decimal precision to quantitites in stock.production.lots.
Otherwise, if the UoM uses a DP larger than 2, inconsistencies may arise
since the field is automatically rounded to 2 decimals in the interface.

For example, if the DP of the UoM is 4:
- Set Qty Done to 1.234567
- Save => qty recorded in DB is 1.234567
- Edit, change nothing and save => qty recorded in DB is 1.23

This happens since the web client parses the value in the DOM and
detects a value change.

opw-788078
2018-01-12 13:48:38 +01:00
Raphael Collet 3fbd86bcbe [IMP] field: compute transitive dependencies over non-stored fields
In other words, when a field F depends on a non-stored field G, it also depends
on G's dependencies.  This guarantees that whenever a dependency of G is
modified, F will be invalidated and marked to recompute (if necessary).

The transitive closure of dependencies is not computed over stored fields.
Anyway stored fields already trigger the recomputation of their dependent
fields during their recomputation.  The performance impact on the loading of a
registry is negligible (less than 1%), and the increase of recomputation
triggers is small (less than 10%).
2018-01-12 13:42:05 +01:00
odoo 9f4c1646bc [IMP] point_of_sale: setting typo 2018-01-12 13:39:41 +01:00