Commit Graph
120135 Commits
Author SHA1 Message Date
Christophe Matthieu f29df7fb2e [FIX] web: Fixed the printing of reports.
A new exception has been added to detect inconsistent reports. However, many are not structured as expected. Thus, the change consists mainly of checking only when the print has to be separated in part to attach it to the respective documents.

We now take the page tag instead of the article, because the article tag is in the layout, so to separate the file, the t-call had to be inside the t-foreach (for the separation) and so possibly read the assets several times. Since all templates have the first tag (in the t-foreach) tag page, the choice is more sensible.

The javascripts files used in readonly were taken out of the editing assets.

A turn was made but not activated, it works locally, but on the runbot, an error is triggered when generating assets after choosing the settings.
2018-09-04 19:01:20 +02:00
Alexandre Kühn b67bb599b8 [IMP] note: improved no_content help in note
The `no_content` help was too long.

Task-ID 1877502
2018-09-04 17:52:38 +02:00
qsm-odoo a0fed1c719 [REF] website_theme_install, *: add theme.utils utility methods
* theme_bootswatch, theme_default

Allow to disable/enable a view from a xml_id whether the xml_id is
linked to an ir.ui.view or a theme.ir.ui.view.
2018-09-04 17:43:45 +02:00
Mathieu Duckerts-Antoine c4557580ef [IMP] web: review time range menu rendering
This commit changes two things in the time range menu
appearance:

	- the order of range options
	- the spacing between them (now two different groups
	  are separated by an empty lines)

Some tests had to be changed accordingly.
2018-09-04 17:37:14 +02:00
Mathieu Duckerts-Antoine 5510d808b8 [FIX] web: return information on pivot measures and groupbys
This commit fixes a bad behavior of the pivot view. By the
past, if there were no data to present in the pivot view, no
information on the pivot view configuration was returned by
the get function. This does not cause problems to the pivot
renderer (by design) but causes problems elsewhere, for
instance in a dashboard view that contains a pivot view.
Indeed, at each update, the dashboard view reinstantiates its
subviews, so that information can be lost if a subview is of
pivot type.
2018-09-04 17:37:14 +02:00
Mathieu Duckerts-Antoine d4b26c3372 [FIX] web: pivot model accept no __count key or null values
The _mergeData function used in pivot view comparison mode
was not designed to accept the absence of the __count key or
null values for measures in the objects returned by a 'read_group'.

The absence of the __count key would result in a traceback and null
values for measures into wrong calculations (infinities).

One could ask why null values did not cause problem before.
The simple reason is that the formatters used to format cell values
render a 'null' value like they render a zero.
This fix makes explicit that null values have to be considered
as zeros and avoid in that way Infinity values when computing
variations.
2018-09-04 17:37:07 +02:00
Mathieu Duckerts-Antoine 004b6e8b1c [FIX] web: fix time range menu button style in mobile mode
The search view in mobile mode has been redesigned and looks a bit different
from the search view in desktop mode. This commit adapts the time range menu
appearance in mobile mode.
2018-09-04 17:34:47 +02:00
Mathieu Duckerts-Antoine 39cfd5baa1 [FIX] web: export to excel in pivot view
Exporting data of a pivot view in comparison mode ends in a
crash. The root cause is that _t was replaced by _lt
so that some strings were replaced by objects with a toString method.
This does not cause problems when rendering a pivot view since
both QWeb or JQuery call that method. The function _exportData does not.

This commit fixes that situation and adds a test of _exportData.
2018-09-04 17:34:19 +02:00
Mathieu Duckerts-Antoine 4f4f111349 [FIX] web: disable buttons when no data presented in pivot view
The buttons 'Flip Axis', 'Expand All', and 'Download xls' are
now deactivated when no data are displayed in the pivot view
(those buttons are useless in that situation).
2018-09-04 17:34:02 +02:00
Arnold Moyaux e90fff6957 [FIX] stock: sn created for product w/o tracking
commit bed29a4aea create a demo serial
number for a product without tracking
2018-09-04 14:56:54 +02:00
Christophe Monniez 804b9b7c5e [FIX] hr_recruitment: limit new hired filter to group
In Employees views, selecting New Hired filters leads to an access error
with a simple user.

With this commit, this filter is limited to the corresponding users
group.

Closes #26747
2018-09-04 13:44:17 +02:00
Alexandre Kühn c63c618312 [REF] web: improved fix from 'Edit View: X' (017e7132)
Revision on https://github.com/odoo/odoo/commit/017e71322b6b7f0c232f0d66ba659a5972fc3534

Commit above correctly fixes an issue with 'Edit View: X' menu item
in the debug manager, in which the name of the view was missing.
To do so, it lets the controller be aware of the name of the view,
so that it can be used in the template of the debug menu.

However, we think there is a much better solution to fixing this
issue: since the debug manager has knowledge of the view action,
we can extend this object with the name of the view.

This is exactly what this commit does: extend the action view object
so that it knows the name of the view. That way, the template is much
more readable, as `view.displayName` is more meaningful than
`controller.viewName`.

Task-ID 1878254
2018-09-04 10:53:25 +02:00
Nikunj Ladava 89011e63ab [REM] website_sale: remove duplicate option of automatic invoice
Oversight of 4c31a758cf .

This commit is related to Task ID 1880704 and closes PR #26658.
2018-09-04 10:22:38 +02:00
qsm-odoo 5ec04489f0 [FIX] web_editor: avoid odoo UI buttons override by themes 2018-09-03 18:40:35 +02:00
qsm-odoo ab7385db1a [IMP] website: allow to select buttons' font
Needed for themes migration.
2018-09-03 18:40:35 +02:00
qsm-odoo cde3c9261e [FIX] website: review website customize dialog
Make some changes which are needed for theme migration.

- Theme colors as user colors fallback only (not hard choice)
- Review option dependency system
2018-09-03 18:40:35 +02:00
Alexandre Kühn 017e71322b [FIX] web: display view name in debug menu ('Edit View: X')
Revision on https://github.com/odoo/odoo/commit/f7fbe8adffb1ee585c8171f6c86d38145c11848d

The commit above wrongly assumes that the object 'view' is an instance
of the view class. As a result, the property `display_name` was undefined.

This commit fixes the issue by letting the controller remember the name
of the view in a similar was as the type of the view. That way, the name
of the view can simply be retrieved from the instance of the controller
class.

Task-ID 1878254
2018-09-03 17:04:45 +02:00
JPR 6da3dafe94 [FIX] base_import: 'Create if does not exist' option 2018-09-03 15:20:39 +02:00
Martin Geubelle e273407157 [FIX] mail: consider activity as a valid view type
The recently introduced `activity` view (see rev. odoo/odoo@1de9496 has not
received all the consideration it deserves as a real view type (no RNG, not in
the valid view `type`, no doc, etc.). It was currently only working based on a
`_get_default_activity_view` method.

Even if the RNG is currently really basic, its grammar could evolve in the future.

This was causing an issue when opening Studio with this view as a default view
with an invalid type was created.
2018-09-03 13:40:22 +02:00
Martin Trigaux d6a0e9db81 [FIX] mail_bot: do not crash on user with no email
When creating a new user, the linked partner may not yet have an email address
(not mandatory field).
When logging in for the first time, after some time an error comes up
   "Unable to post message, please configure the sender's email address."

While the user should set up an email, this popup coming from no specific action
is confusing.

With this patch, the message will be posted as the system (which has an email)
The user will be warned of having no email when trying to reply.

Closes #26601
2018-09-03 11:06:59 +02:00
jem-odoo 933487eb65 [FIX] rating: error on template rendering
Task #1878247
2018-09-03 10:17:30 +02:00
Odoo Translation Bot e8606ce00b [I18N] Update translation terms from Transifex 2018-09-02 02:24:05 +02:00
qsm-odoo 4bc79da943 [FIX] website, *: avoid top menu flickering
* portal, web
2018-08-31 18:57:12 +02:00
qsm-odoo 7253b55f41 [FIX] website, *: BS4, restore website menu dropdowns
* website_event, website_event_track
2018-08-31 18:57:12 +02:00
Jeremy Kersten 7566a8c205 [FIX] website: page manager visual fix
sort by url by default
don't show multi level if not in multi website mode
2018-08-31 18:04:23 +02:00
Romain Derie 6bfb0810b0 [FIX] web_editor, website(_*): fix bs4
[FIX] web_editor: adapt col size to avoid too small select

We should avoid col-md-3 in col-md-9 as the menu dialog is instanciated at 2
places:
  - When creating a link in the editor
  - When editing website navbar menu

In the second case, there is a hack in `content.js` to remove `modal-lg`
lowering the width of the modal and making the select too small.

[FIX] website: lower navbar font size

With BS4, font-size of navbar element went from 13px to ~17px (rem unit
computation).

14px seems better than previous 13px as the frontend content size is
higher than the backend one. Thus, 13px looks too small in contrast with the
frontend page content.

[FIX] website_crm_partner_assign, website_customer, website_membership: fix layout

This commit fixes multiple layout issues, mainly by aligning code of the 3
modules:
  - Add margin right to avoid text to be against image
  - Using image_medium everywhere
  - Fixing search input width

publish toggle red + odoo primary is weird -> gray
navbar now has a background & float-right not working since flex
-> remove navbar class, use d-flex and ml-auto so the right element will be floating since using all available width

task-1878150
2018-08-31 16:37:45 +02:00
Romain Derie 47b00c5d53 [FIX] base,website,web_editor: handle key field on ir.ui.view for multi website
With multi-websites, we expect qweb views to have a key set as it is the key
that is used to find duplicates (two views with same keys are duplicate, the
one with a website_id set is more specific than the one without a website_id)

Thus, 5ff87e8039 sort on key in order to find the most suitable one.

It would crash if a qweb view is created without a key (False) as it can't sort
`bool` and `str`.

This commit:
  - Adds a generated key to scss views
  - Adds an SQL constraint to avoid QWeb views without a `key`
  - Generates a random key when creating a QWeb view without a `key`
  - Handle False key in `filter_duplicate()` by extracting views with False key
    before sorting, and then adding these views to the recordset

Note: We also want the key to be editable as it is now an important field with
      multiwebsite. Thus, we removed the readonly on this field.

+ fix python tests as we now force key on qweb views with sql constraint
+ pep8
2018-08-31 16:37:45 +02:00
Jeremy Kersten 9b1d1d5728 [FIX] website: allow to switch from company from the front end
In some case, you can be on website 2 (where company_id = 2) with your user into the company 1.
In this case, you will not see the product on ecommerce from company 2 while you stay in company 1.
2018-08-31 16:37:45 +02:00
Jeremy Kersten ba2116838e [FIX] website, mass_mailing: fix social network
- Remove useless onchange company id from website, now that we configure it
in the res config.
- Add the onchange company into the res_config_settings
- Remove left duplicate data from mass_mailing
- Add ALL social links into the res config
2018-08-31 16:37:45 +02:00
Yenthe666 288bcccc8e [FIX] website, social_media, mass_mailing: add default value for missing media
+ add instagram

This commit closes #26644 and closes #26649
2018-08-31 16:37:45 +02:00
Jeremy Kersten 52300d7fb0 [IMP] website: res_config_settings remove payment acquirer link
New idea according FGI request is:
A settings with nothing to configure (just a link), is useless in the
res_config_settings view.
2018-08-31 16:37:45 +02:00
qsm-odoo 7ce1e60be4 [FIX] website: properly show theme colors in customize dialog 2018-08-31 16:00:10 +02:00
qsm-odoo 0b480f6b2c [FIX] website_theme_install, *: multi-website customization dialog
* theme_bootswatch, theme_default

Before this commit, the customization dialog for themes was not
multi-website. That means if a theme was installed on a website, the
customization dialog was enabled for all the websites.

Note: this commit uses the '_post_copy' system of theme installations
for the first time and it had to be adapted a little bit.
2018-08-31 16:00:10 +02:00
Jeremy Kersten f39b31930a [FIX] website_theme_install: reload registry when installing new theme 2018-08-31 16:00:10 +02:00
Christophe Monniez 580a0b2ef7 [FIX] tests: redirect chrome headless stdout and stderr to dev null
When executing a very long HttpCase browser_js test, it happens that one
of the chrome process PIPE is full (ie. clickEverywhere test).
In that case, the communication with Chrome is blocked.

With this commit the stdout and stderr of the Chrome process are
redirected to /dev/null.
2018-08-31 15:03:11 +02:00
Christophe Monniez 4e7fcf3e07 [FIX] web: wait web client to be ready before clickEverywhere test
When starting the clickEverywhere test with enterprise modules
installed, it happens that Odoo web client is not yet fully loaded.
In this situation, the test does not find any app to test.

With this commit, an attribute is added to odoo to check if the web
client is fully loaded.
2018-08-31 14:45:25 +02:00
Alexandre Kühn de1631c717 [FIX] web: call on_close handler from history_back
Revision on https://github.com/odoo/odoo/commit/3210f108272be89f1a7b01f4e1816b7f04ae0a3b

Before this commit, when doing an action that opens a dialog
(with `target: 'new'`), then triggering 'history_back', the
`on_close` handler of the action was never called.

This was not the correct behaviour, because the dialog closes
without the `silent` option set. Indeed, when this option is
not set, it should always call the `on_close` handler.

The bug comes from closing the dialog without any options, and
this case was not handled correctly in the commit above. This
commit fixes the problem by ensuring that the `on_close` handler
is called even when closing the dialog without any option.
2018-08-31 14:31:01 +02:00
qsm-odoo 4bb0ea03e5 [FIX] website_theme_install: create theme attachments... with their key 2018-08-31 13:44:31 +02:00
Alexandre Kühn f7fbe8adff [FIX] web: make 'Edit View: X' translatable
Revision on https://github.com/odoo/odoo/commit/4f6f562c973ce2efd5631ea0e249e75d94cac104

Contrary to what the commit above said, the string was not translatable.

This commit fixes the issue by using the property `display_name`, which
is the translatable equivalent string of `_.str.capitalize(type)`.
2018-08-31 12:21:51 +02:00
Alexandre Kühn cb91165b9f [REF] web: move debug_manager_tests in tools
Revision on https://github.com/odoo/odoo/commit/984554f4cacf3aa7c9750c2972539ab26c4eb3a7

So that folders in 'tests' is on par with folders in 'src/js'.
2018-08-31 12:21:51 +02:00
Sanjay Jamod 2b51fefa5e [FIX] *: BS4, adapt page-header class
Closes https://github.com/odoo/odoo/pull/26420
2018-08-31 12:01:36 +02:00
Laurent Smet abd6cf7780 [FIX] account: fix domain on account.reconcile.model form view
[('tax_id', '=', None)] doesn't work. It should be False instead of None.
2018-08-31 11:17:45 +02:00
Alexandre Kühn 9b5909b4d7 [REF] note: rename app 'Productivity' to 'Notes'
To stay consistent with the systray activity menu, which adds "Notes".

Task-ID 1877502
2018-08-31 10:32:48 +02:00
Alexandre Kühn 0a3d08c443 [REM] mail: no push notifications permission request in Discuss
This has been replaced with "OdooBot has a request" in the systray
messaging menu (see https://github.com/odoo/odoo/commit/f80bbb4b2a1230ba543e97d3da01c7b2c52d24cc).

Task-ID 1877502
2018-08-31 10:22:56 +02:00
Adrien Dieudonne 2e78aa4f56 [FIX] web: domain: quarter and last quarter
Before this commit, it was not possible to compare data if the time
range selected was quarter or last quarter.

String and integer was concatenated and the returned domain to evaluate
was wrong:
-3 3 - (context_today().month - 1) % 3
instead of:
-3 + 3 - (context_today().month - 1) % 3

Offset period param is always an integer but it's not the case of
boundary params. For 'quarter' and 'last quarter', it's an
expression to evaluate.

Anyway, this part of code will be refactored in a while but it's
important to make the test to avoid this king of issue.
2018-08-31 10:09:38 +02:00
Alexandre Kühn f80bbb4b2a [IMP] mail, mail_bot: improved push notifications permission response
This commit makes small improvements on the messaging menu with
the new module `mail_bot`:

[IMP] When OdooBot has a request, it now adds "+1" to the counter of
      the messaging menu. The related preview also has a bold title,
      and displays "(1)" next to the title.

[REF] Static previews are no longer in mail_service. This was only
      used for "OdooBot has a request" preview. This logic has now
      been moved to the module `mail_bot` (was previously in `mail`).

[FIX] Title of response of push notifications permission clearly
      states whether permission has been granted or denied
      (was displaying "[Object object]" before this commit).

Task-ID 1877502
2018-08-30 17:55:18 +02:00
Haresh Shyara f8e3aed20b [REF] mrp, resource: Changing labels
TASK-ID: 1879655
2018-08-30 17:33:47 +02:00
Prakash Prajapati 86d10380a1 [REF] barcodes, delivery, mrp, product, stock: Changing labels
Task: 1879617
2018-08-30 17:24:24 +02:00
Simon Lejeune d6d27e3777 [IMP] mrp: picking_type_id on stock.moves
No picking_type_id is set on move created in Manufacturing orders, so
when you sort/group by your all your moves in a tree view, you cannot
easily identify the ones that belong to Manufacturing orders.

So we've added the picking_type_id of the MO on the moves, but also had
to addapt the condition to know which move having a picking_type_id and
no picking must be assigned to a picking.

opw:1863591
2018-08-30 16:16:54 +02:00
Pierre Masereel cc62784924 [IMP] stock: create warehouse on existing companies
If companies are created before the installation of module stock, the
warehouses of those companes won't be created when stock module is
installed.

So we've created a post init hook to create the warehouses for the
existing companies.

TASK-ID: 58645
2018-08-30 15:32:42 +02:00