Commit Graph
114047 Commits
Author SHA1 Message Date
Thibault Delavallée 22f02af6bf [SPLIT] base: split base_data 2017-11-27 11:15:13 +01:00
Thibault Delavallée 52dc556a15 [SPLIT] base: split base_demo into files by model 2017-11-27 11:15:11 +01:00
Thibault Delavallée c81d83773c [MOV] base: move module_* wizard into wizard/ 2017-11-27 11:15:08 +01:00
Thibault Delavallée 8b02f7fd67 [MOV] base: move module_* models into models/ 2017-11-27 11:15:06 +01:00
Thibault Delavallée 1fbc29a641 [MOV] base: move ir_* models into models/ 2017-11-27 11:15:03 +01:00
Thibault Delavallée c129b91b6d [MOV] base: move res_* models into models/ 2017-11-27 11:15:00 +01:00
Thibault Delavallée ee5d46ceb1 [MOV] base: move module_* views into views/ 2017-11-27 11:14:57 +01:00
Thibault Delavallée b162eb2e1e [MOV] base: move ir_* views to views/ 2017-11-27 11:14:55 +01:00
Thibault Delavallée 969a55576e [MOV] base: move res_* views to views/ 2017-11-27 11:14:52 +01:00
Thibault Delavallée 7603da1990 [MOV] base: regroup all security rules in the same file in security/
* get some ir_rules from view files
 * move all rules into same file
2017-11-27 11:14:49 +01:00
Thibault Delavallée 935d760f6d [MOV] base: move module_* report into report/ 2017-11-27 11:14:45 +01:00
Thibault Delavallée 2e41295762 [MOV] base: move module_* data and demo into data/ 2017-11-27 11:14:43 +01:00
Thibault Delavallée 49c548dabb [MOV] base: move ir_* report into report/ 2017-11-27 11:14:38 +01:00
Thibault Delavallée be0f477c37 [MOV] base: move ir_* data and demo into data/ 2017-11-27 11:14:27 +01:00
Thibault Delavallée d6804a8218 [MOV] base: move res_* data and demo into data/ along with images in static/img
Purpose is to clean the directory before working on it for new demo data
and some model cleaning.
2017-11-27 11:13:58 +01:00
Thibault Delavallée ca1a207aa3 [MOV] base: move base.sql to data/base_data.sql 2017-11-27 11:13:39 +01:00
Thibault Delavallée d350c438fe [MOV] base: move base_{demo/data}.xml into base/data 2017-11-27 11:13:18 +01:00
Adrien Dieudonne bb1602b3ac [IMP] models: avoid empty string as module name
When you import a record in Odoo, you can specify an id without
prefixing it by the name of the module. e.g. 'project_project_x'
The result of this is an empty string as module name.
(This value is valid for a required field...)

Plus, when you check metadata, you see 'false.project_project_x'.

Now, the default module name is '__import__' instead of an empty string.
We already have similar behavior with '__export__' triggered by
'export_data' method.
2017-11-27 08:18:49 +01:00
Moises Lopez 85a3e1e385 [REF] *: deal with duplicated xml_ids in views and security rules
Was part of PR #19820. Courtesy of Vauxoo
2017-11-24 15:37:28 +01:00
Moises Lopez 593bb5e30d [REF] *: improved translatability of error messages
Was part of the PR #19820. Courtesy of Vauxoo
2017-11-24 15:35:27 +01:00
qdp-odoo 87ad27748c [IMP] account: allow change 'reconcile' field on account.account
That operation was previously forbidden because it could be potentially costly as we may end up having to recompute the 'amount_residual' and 'amount_residual_currency' fields on a lot of account.move.line.

Basically, we now authorize it and manually handle the update of that field via a manual SQL query.

Was PR #19204. Was task 32125.
2017-11-24 15:29:49 +01:00
Géry Debongnie d6ff8c8351 [FIX] web: better support for async field widgets
Most field widgets are synchronous, but some of them have to do extra
work before being ready (for example, the pad widget, or widget which
needs to lazy load JS/CSS files).  Because of that, the new views have
been well tested with synchronous widgets, but not completely with async
widgets.

Some code depended upon the fact that the widget was ready immediately
after being created.  This was incorrect, and is fixed in this commit,
by adding a new hook that is called in (basic) views after a widget is
ready (meaning, start and willstart are done)
2017-11-24 14:59:14 +01:00
Alexandre Kühn fb6c9c2443 [IMP] web: FieldChar trim its value by default
With this commit, we change the behaviour of the web client with respect
to spaces in char fields.  Most of the time, starting and ending spaces
have no value, and worse, make the data not so reliable.

After this commit, field char will trim by default (so, if the user input a
char as ' abc ', the string 'abc' will be sent to the server instead).
Note that this only applies when the value of the field is changed.  If
someone open a form view, then switches to edit mode and save, nothing
will change.

This is the desired behavior most of the time.  However, in some rare
cases, this is actually harmful.  For example, if we trim the
'decimal_point' field, it will not be possible to enter a whitespace as
decimal separator.  In those cases, we introduce a new attribute 'trim',
which allow the developer to desactivate that feature.
2017-11-24 13:09:10 +01:00
Nicolas Martinelli 0a3a5919f9 [IMP] point_of_sale: close session
It regularly happens that people do not close their POS session for a
long time. When too many orders are linked to a session, the session
closing duration can therefore take a lot of time to execute. This leads
to timeout issues.

We add a label on the POS session Kanban view if it has been opened for
more than 1 day.
2017-11-24 08:58:39 +01:00
Aaron Bohy 463a214699 [REF] web,*: give evaluated contexts to load_views
*board,sale_timesheet

This rev. changes the API of load_views, as it now assumes that
the given context has no longer to be evaluated. This is more
convenient that way, as we can now call load_views with contexts
that are dict, and not instances of the Context class.
2017-11-23 11:00:55 +01:00
Aaron Bohy baae272ffd [REF] web: tests: make load_views RPCs go through mockRPC
This allows to inspect those RPCs and the given arguments as well.
2017-11-23 11:00:53 +01:00
Aaron Bohy b4609e3c25 [REF] web: test_utils: handle logging in mockEnvironment
instead of createView. This allows to log info like RPCs or
uncaught Odoo events even if we are not in a view.

Also remove the logLevel param from MockServer as it wasn't really
used.
2017-11-23 11:00:21 +01:00
Aaron Bohy 0670a635ac [REF] base,web: use correct Widget in settings JS tests
... instead of hacking test_utils.
2017-11-23 11:00:21 +01:00
Alexandre Kühn c36209df65 [FIX] stock: typo stock_location_shop0 model (#21165)
Fixed a typo on commit https://github.com/odoo/odoo/commit/491faac5e9f47e4d0573a1eba9579aca44b16752,
in which stock_location_shop0 was wrongfully refered
to stock.picking.type, instead of stock.location.
2017-11-23 10:37:01 +01:00
Yannick Tivisse 3be5611206 [IMP] fleet: Move model,tags and service type data to demo 2017-11-22 13:28:05 +01:00
Yannick Tivisse 491faac5e9 [FIX] stock,mrp: Create ir.model.data with _update, not create
Purpose
=======

As the 'function' tag is re-evaluated on the module update (even when noupdate="1"), the ir.model.data will be created a second time with the function 'create'.

This leads to the record deletion after the update when calling '_process_end'.

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

Use '_update' instead of 'create' and '_update_dummy'.

- _update won't create another ir.model.data if it already exists.
- _update already calls _update_dummy to avoid the record deletion.
2017-11-22 12:28:05 +01:00
Moises Lopez - https://www.vauxoo.com/ eb90eb42ce [IMP] translate: export empty translations for empty ones
Instead of use the original string by default.

Currently odoo export a PO translation file using the logic:
"If there is not a translation then use the source."

This generate a false 100% of file translated for tools based on PO
files.

This commit change this logic to:
"If there is not a translation then use empty string."

Odoo import a PO translation file supporting empty string because
if a item is empty string odoo use the original source.

Closes #17925
2017-11-21 17:56:28 +01:00
Thibault Delavallée 2c0ad82d5a [REF] sale: tests: make tests independent from mail
Purpose is to be able to move mail tests in a separate module without
breaking other tests. It seems dependency is not real, only some data
to add. It is better to have self contained tests anyway.
2017-11-21 15:00:22 +01:00
Thibault Delavallée 1b2d58daec [REF] project: tests: make tests independent from mail
Purpose is to be able to move mail tests in a separate module without
breaking other tests. It seems dependency is not real, only some data
to add. It is better to have self contained tests anyway.
2017-11-21 15:00:21 +01:00
Thibault Delavallée 5a2d789d1a [REF] crm: tests: make tests independent from mail
Purpose is to be able to move mail tests in a separate module without
breaking other tests. It seems dependency is not real, only some data
to add. It is better to have self contained tests anyway.
2017-11-21 14:59:15 +01:00
Thibault Delavallée 55edc1c2f3 [REM] mass_mailing: remove void test file
It makes mass mailing tests independent from the mail module without
having to change anything. How lucky.
2017-11-21 14:58:48 +01:00
Adrian Torres 07510cdbf0 [FIX] base_module_uninstall: ondelete cascade
Before this commit, whenever an ir_module_module that had been
installed/uninstalled at least once would be unlinked, an Exception
would be raised since the field module_id references an ir_module_module
and it is a required field.

This commit fixes this by adding an ondelete='cascade' to the field.

Fixes #20720
2017-11-21 10:55:16 +01:00
Thibault Delavallée 52f899aae7 [FIX] odoo: tests: correctly call super
Otherwise inheritance is not always possible because child classes
inheriting from the base class are not called.
2017-11-20 11:08:28 +01:00
Alexandre Kühn 23e6dd36d7 [IMP] web: hide in kanban tag's color (#20815)
New feature:

   - New Transparent tag visual (grey border & text, white bg),
   - By default, newly created kanban tags are transparent,
   - Tag's colorpicker has now a 'Hide in Kanban' checkbox,
     to select the transparent color.

Toggling off 'Hide in Kanban' sets the color of the tag as follow:

   - Previous color, if 'Hide in Kanban' was toggled on on the
     same formview session.
   - Color 1 (dark orange), otherwise.
2017-11-20 10:47:43 +01:00
Richard Mathot 7d2666d020 [IMP] hr_timesheet: desactivate project tour when people install Timesheet app
This change comes from the timesheet onboarding
2017. Since this is done for onboarding, only the
admin is impacted by this change.
2017-11-20 09:28:20 +01:00
Fabien Pinckaers a8dd444bbb [IMP] hr_expense: cleaner/shorter field label 2017-11-18 22:54:38 +08:00
Kishan Gajjar 5b356a732b [IMP] website: add facebook page snippet 2017-11-17 17:59:21 +01:00
Alexandre Kühn 21c4480821 [REF] *: renaming AppSwitcher to HomeMenu
Summary:
   AppSwitcher      => HomeMenu
   AppSwitcherMenu  => HomeStudioMenu

Details:
   application_switcher => home_menu
   application-switcher => home-menu
   AppSwitcher          => HomeMenu
   appswitcher          => home_menu
   AppSwitcherMenu      => HomeStudioMenu
   appswitcher_menu     => home_studio_menu
   app_switcher         => home_menu
   app-switcher         => home-menu
   app_switcher_menu    => home_studio_menu
2017-11-17 16:37:26 +01:00
Martin Geubelle afc0df5b0c [REF] mail: create separate files for includes
The rev. odoo/odoo@ab900bb fixes an issue in mail which needed an include
on BasicModel and FormController. As this rev. has been done in a stable
branch, the includes have been done in an existing file.

This rev. correctly separates the includes in different files.
2017-11-17 16:26:45 +01:00
Christophe Monniez 0fdf291305 [REF] db: simplify list_dbs
When trying to list db's, the db_user is searched and verified before
searching for the databases.
As it's enclosed in a db.cursor context manager, we can assume that
there is a db user at this very moment.
This commit uses a single query to find databases that belongs to this
cursor user.

Also, this commit adds a message in the logs when an exception occurs
to facilitate debugging instead of silently returning an empty list.
2017-11-17 15:23:14 +01:00
Christophe Simonis 21dd24c071 [MERGE] forward port branch 11.0 up to ca3390fd05 2017-11-17 14:22:46 +01:00
Nicolas Lempereur ca3390fd05 [FIX] web_editor: forward-port typo on click
event variable has been renamed to ev in 11.0 and the code was
duplicated.
2017-11-17 14:13:58 +01:00
Christophe Simonis 179abc3c5e [MERGE] forward port branch saas-16 up to 11ff01af9b 2017-11-17 13:40:18 +01:00
Simon Lejeune 49c3f64369 [FIX] mrp: workorder: use the reserved move lines
Rev [1] was intended to be applied when changing the lot of the produced
product on the manufacturing order, somewhere along the line the code
was also called when setting the lot_id on the work order. When used in
this context, it broke the reconciliation between the reserved move
lines and the temporary move lines because a lot_produced_id was wrongly
set.

We fix the issue by only applying the code on prod move. This is done by
checking if the move is a production one through the stock move, because
there we are able to differenciate the raw material and production move,
not on the move line where production_id is always set.

[1] 471115b06a

Fixes #20964
2017-11-17 13:32:04 +01:00
Simon Lejeune 179071bb50 [FIX] stock_account: UOM handling
Error introduced by rev 48f4ce4afa
2017-11-17 13:32:04 +01:00