Commit Graph
120613 Commits
Author SHA1 Message Date
Christophe Simonis 4e85ca8a76 [FIX] base: mark enterprise modules as uninstallable
There are actually uninstallable until enterprise is present in
addons-path.
The state will be reset by the "Update module list" process.
2018-09-17 11:07:45 +02:00
Xavier Morel 8e17223c26 [FIX] web: remove bootstrap sourceMappingURL
We're not shipping the sourcemap files, and while the assets minifier
strips out the mappings they're getting hit in debug=assets which is
bot useless and problematic when running odoo-bin without a proxy for
static folders: if sourcemaps are enabled (which is apparently the
default in all browsers if devtools are opened at this point) the
browser tries to fetch the sourcemap, which does through the
SharedDataMiddleware which doesn't find them and passes the query on
to the regular Application which goes through the entire dispatch &
NotFound process.

If website is installed, that process ends up rendering website.404,
which can be pretty costly until everything is properly cached:

    # initial request
    "GET /web/static/lib/bootstrap/js/index.js.map HTTP/1.1" 404 - 319 0.198 0.954
    # a few requests later
    "GET /web/static/lib/bootstrap/js/index.js.map HTTP/1.1" 404 - 27 0.022 0.060

And the way sourcemaps are fetched (might be headers, might be the
stampede as browsers will try to fetch a dozen sourcemaps as fast as
possible) seems to make this problem much, much worse: instead of 300+
the requests take 800+ queries each, multiple seconds, and requests
get worse as time goes on (didn't investigate the exact reason for
that) *and* they apparently don't ever get cached (at least they don't
after half a dozen reloads of the client).
2018-09-17 10:44:58 +02:00
Odoo Translation Bot e9111f46a6 [I18N] Update translation terms from Transifex 2018-09-16 02:21:25 +02:00
Christophe Simonis 2426a8d669 [FIX] mail: adapt forward-ported code and test to BS4 2018-09-15 18:32:30 +02:00
Fabien Pinckaers 53eb6d51f9 [IMP] base: speed improvement (-450 SQL queries) 2018-09-15 10:22:09 +02:00
qdp-odoo 5fd19cc80e [REV] account: default taxes on default sale/expense accounts
This reverts commit c539311. The default taxes will now be found in the invoice's onchange() which makes more sense and will work on all income/expense accounts without having to set the taxes on all these accounts.
2018-09-14 17:29:49 +02:00
Olivier Colson 1656dc5a01 [IMP] web: list controller: put the buttons template name to render in a field of the ListController, so that it can be overridden
This will be used to add the 'Upload' button on the tree view of vendor bills, by extending the regular view.

Was part of PR #26740
Was part of task #1880089
2018-09-14 17:29:49 +02:00
Olivier Colson c4c3858856 [IMP] account: add "Upload" button in vendor bills tree view
Was part of PR #26740
Was part of task #1880089
2018-09-14 17:29:49 +02:00
Olivier Colson 3c2a92e820 [IMP] mail: add main attachment support on mail.thread
This is done by adding a new field on mail.thread objects and setting it when posting a message with attachments on a model inheriting from mail.thread.

Was part of PR #26740
Was part of task #1880089
2018-09-14 17:29:49 +02:00
Christophe Simonis a0901237f2 [FIX] calendar: correct recurring date timezone conversion 2018-09-14 17:23:29 +02:00
Alexandre Kühn 355054aaa8 [FIX] web:tests: correctly handle parameter 'services'
This commit fixes the handling of the service parameter
in a mocked environment:

- updated docstring: now an object (previously an array)
- no longer used by mocked server (unused parameter)
- enforces default value for this parameter (empty object)
2018-09-14 17:14:33 +02:00
Alexandre Kühn 45d197c208 [FIX] web: tests: adapt JS tests from forward-port 9c77066f34
The test was failing because it was using an old approach to mock
services in JS tests. Also, it provides ajax service in the list
of services, which was not supported in a mocked environment.

With this commit, when an ajax service is provided in the test,
it will use this service instead of using mocked RPCs from the
mocked server.
2018-09-14 17:14:33 +02:00
Alexandre Kühn 9393a0eba8 [FIX] web: missing 'target' parameter in _rpc method
This parameter was omitted in a forward-port to saas-11.5.
Maybe this is due to a missing `git move` from this commit:
https://github.com/odoo/odoo/commit/02ec09cb1c3e2d7bc7968f40c18f2208d7f3f498
2018-09-14 16:51:01 +02:00
Martin Trigaux eff346949f [I18N] base: export saas-11.5 source terms 2018-09-14 16:06:41 +02:00
jeffery CHEN fan c3f0915b2b [FIX] l10n_cn: move china city data into separate module
Changes made at #23879 changed the dependency of l10n_cn to include a large
list of cities.
Move to a different module to make the l10n_cn more lightweight.

Closes #26592
2018-09-14 16:06:41 +02:00
Christophe Simonis 9c77066f34 [MERGE] forward port branch saas-11.4 up to 6c103589c1 2018-09-14 16:00:17 +02:00
Ravi Gohil 5c11e0d6f9 [FIX] models: support group by with multiple date fields
When filling the results of a read_group using
_read_group_fill_temporal we were using the name of the field.
(https://github.com/odoo/odoo/commit/283c842289f1bc06bc30a877864e868127418e80)

But _read_group_format_result needs the name of the groupy which can
differ from the name of the field as groupby supports the following
syntax for dates `field:groupby`

This ultimately lead to a crash when trying to groupby multiple date
fields in a graph view.

Linked to Tasks : #1879604 and #1879168
2018-09-14 15:43:10 +02:00
Christophe Simonis 6c103589c1 [MERGE] forward port branch saas-11.3 up to ea0b3d600d 2018-09-14 14:56:51 +02:00
Raphael Collet 2b9d5f929c [FIX] base: avoid clash between field and method copy 2018-09-14 14:26:24 +02:00
Christophe Simonis ea0b3d600d [FIX] mail: declare services used in forward-ported test
Only broke test with enterprise overwrite.
2018-09-14 14:05:24 +02:00
XavierDo 71663b7f57 [IMP] web: log user_error as info instead of error
Since a console.error will mark a tests as failed, logging user error
as info will allow to test a flow with user error without
marking the runbot red
2018-09-14 13:56:32 +02:00
Rémi Rahir b0cc678f17 [FIX] snailmail_account: bad inheritance of views
The xpath on the res config settings view was attached to a div added in the
account module but the record was inheriting from base and not account.
As snailmail account inherits from account, it was somehow working.
2018-09-14 13:53:49 +02:00
qsm-odoo 737d272997 [FIX] portal, *: use responsive BS text utilities instead of our own
* website, website_sale, website_sale_delivery

While we used BS3, we used our own responsive classes for text
alignment (text-right-sm, text-center-not-lg, ...). Now BS4 classes can
be used to achieve the same behavior so there is no point in declaring
our own ones anymore.

Also, as the breakpoint names changed (lg -> xl, md -> lg, ...), the
current code was not working as intended anymore anyway.
2018-09-14 13:41:35 +02:00
qsm-odoo da55072a69 [FIX] portal, *: introduce responsive BS sizing classes
* website_sale

Bootstrap chose not to implement this feature, probably relying on their
grid system (see https://github.com/twbs/bootstrap/issues/21943).

We have a case where a responsive size of 0px is needed though: applied
on a table, this forces the table to its contents' natural width. So
this commit implements the behavior and adds the size of 0 to replace
the non-responsive class 'o_table_column_fit'.
2018-09-14 12:11:22 +02:00
Yannick Tivisse eb11665bfc [FIX] rating: Send rating if no override of rating_get_parent
Purpose
=======

Currently if the method rating_get_parent is not overriden, then
sending a rating on a record of the model leads to a traceback.
2018-09-14 11:43:15 +02:00
Odoo Translation Bot 0b2349ee41 [I18N] Update translation terms from Transifex 2018-09-14 11:30:58 +02:00
Denis Ledoux 4fb5c57dc5 [FIX] tests: web tests, chromium fallback
On Ubuntu, the chromium executable is `chromium-browser`,
On other distributions, such as debian, it's `chromium`.

We therefore add another fallback
2018-09-14 11:28:56 +02:00
Christophe Monniez 058b1993ab [FIX] l10n_eu_service: remove duplicate service tax rate
Since d5b687a an error is logged when trying to insert duplicates in
ir_model_data. An error appears when installing this module because of
the duplicate.

As this module is not yet tested, this error flew under the radar.

Note: a new test that installs l10n* is developped
2018-09-14 11:17:01 +02:00
Yannick Tivisse 4f9cc90c73 [FIX] rating: Send rating if no override of rating_get_parent
Purpose
=======

Currently if the method rating_get_parent is not overriden, then
sending a rating on a record of the model leads to a traceback.
2018-09-14 11:09:08 +02:00
Denis Ledoux 6e3e195324 [FIX] tests: chromium executable is chromium-browser
When installing chromium using apt
e.g apt install chromium-browser
the executable is `chromium-browser`,
not just `chromium`
2018-09-14 10:43:28 +02:00
qdp-odoo c52d809032 [IMP] account: add setting to hide the products in bills
Was part of PR #26876
Was part of task #1882329
2018-09-14 10:21:02 +02:00
qdp-odoo c5393118c6 [IMP] account: set default taxes on default sale/expense accounts
This will allow default tax to be proposed when no product are entered in vendor bill encoding

Was part of PR #26876
Was part of task #1882329
2018-09-14 10:19:33 +02:00
Olivier Colson 82e1aed2e6 [REF] account: refactors the onchange product_id on invoices
get the product_name thanks to a function, so that we can reuse it somewhere else (account_predictive_account)

Part of PR #26876.
Part of task #1882329
2018-09-14 10:19:33 +02:00
Ankit Joshi b8cb25d052 [FIX] stock: views wrong groups on location
Show the source and destination location in the detailed operation view
if the multilocation is active. Also hide locations if only the delivery
package settings.

Issue: 1882695
2018-09-14 10:06:24 +02:00
len-odoo c8441a69c2 [FIX] project: remove group_by from the context
The group_by was passed from context from the action spawning a new view.
This meant that it could give a group_by a field that was not defined on the
destination view, causing a js traceback.

opw 1884035
2018-09-14 08:34:42 +02:00
Christophe Simonis f3fa5a5ef7 [MERGE] forward port branch saas-11.3 up to 1e0a92c996 2018-09-13 19:30:33 +02:00
Sébastien Theys a670f092b9 [IMP] website: improve Optimize SEO and Page Manager
Modal generic:
- Fix footer overflowing buttons by pushing them to a new line.

Page manager:
- Add an SEO column to easily see which pages have incomplete SEO.
- Add an edit SEO column to navigate to the SEO modal on said page.
- Hide "edit in backend" column as debug.
- Generally improve the whole view by adding appropriate titles on icons, etc.

SEO modal:
- Improve general style.
- Add description length alert.
- Restructure the keyword table/suggestions.
- Reset page meta to their initial value on Discard.
- Various small usability improvements.

PR: #26897
task-1850579
2018-09-13 18:18:02 +02:00
Jeremy Kersten 7a298f89d9 [FIX] website_sale_wishlist: try to fix unreproductible bug
Rumor say that that 1x/100... the variant is not selected and that the tour crash.
So we are not sure that it will avoid that, but it will be not worse.

I will keep my fingers crossed for that.
2018-09-13 18:16:28 +02:00
Hiral Bhavsar 7f1c1b84ef [FIX] website: no overlap of text when opening burger menu
Issue: https://drive.google.com/open?id=1aXlkgpM7fWEWL18XMEAN5lI1uWgeZHqy

Closes #26434
2018-09-13 17:49:57 +02:00
Hiral Bhavsar 5373db1487 [FIX] mail, web: open systray menu dropdown in mobile.
Before this commit, it was not possible to open systray menus in mobile.
This is due to popper.js that is wrongly dynamically positioning the
dropdown menu.

This commit fixes the issue by disabling dynamic positioning by popper.js
for the systray menus, so that it uses ou custom styles for dropdown menu.

Closes #26434
2018-09-13 17:49:52 +02:00
Hiral Bhavsar 3ee4390bff [FIX] web: correct mobile screen size.
Revision on https://github.com/odoo/odoo/commit/d91ec258e6a31153beb9eb16cfe8f916546b7688

The commit above reverts a commit when we were using bootstrap 3.
The equivalent of XS in bootstrap 3 is SM in bootstrap 4.
So the correct revert with bootstrap 4 is to use SM.

Also removing useless style on 'o_mobile_menu_opened'.

Closes #26434
2018-09-13 17:49:36 +02:00
Jeremy Kersten 618c89fd87 [IMP] website_sale: allow to hide company/vat fields in checkout
task-1866941
2018-09-13 17:45:23 +02:00
qsm-odoo 0452d332af [FIX] website: remove hamburger menu option
Standard option is sadly not good enough to be kept. We will let themes
handle that one their own way.
2018-09-13 17:36:29 +02:00
Jeremy Kersten 5cfd3d5fa0 [FIX] hr: security - an officier is an employee/internal user
Tests from hr_recruitments work luckily until now.
Because module maintenance imply base.group_user for group_equipment_manager

    <record id="group_equipment_manager" model="res.groups">
        ...
        <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
    </record>

and module hr_maintenante imply group_equipment_manager for hr_user

    <record id="hr.group_hr_user" model="res.groups">
        <field name="implied_ids" eval="[(4, ref('maintenance.group_equipment_manager'))]"/>
    </record>

After this commit launch test on hr_recruitment module without any other module will works.

Design-theme repo show this error because repo tests hr_recruitment without installing maintenance
(Repo install website_* modules -> website_hr_recruitment -> hr_recruitment -> hr)

Backport-of d5b0f99943 to have runbot design-theme green
2018-09-13 17:26:32 +02:00
jem-odoo d0022ef2a7 [FIX] sale_timesheet: generated project must be active
When choosing a project template on a service (product
config), and then archive it, the generated project
on sale line confirmation will be inactive too.
This commit forces the generated project to be active.

Task #1884328
2018-09-13 15:40:43 +02:00
Olivier Colson 7da25a9239 [IMP] account: remove invoice communication automatic sanitization option 2018-09-13 15:17:08 +02:00
jem-odoo d32d2394c2 [FIX] sale: sale line form view usability 2018-09-13 14:44:50 +02:00
jem-odoo f701ea75fe [FIX] mail: clickable kanban card
Task #1878152
2018-09-13 14:44:45 +02:00
jem-odoo 64adff43d8 [REF] sale_timesheet: make project billable wizard
When introducing the 'employee rate' mode to timesheet
on project, we break the wizard: its goal was to link the
existing timesheets to the SO line in order to invoice them.
(Employee rate commit: b4af54f9c2)

This commit makes the wizard compatible with the employee rate
feature, without breaking invoicing at task rate flow.

Two possible flows, starting with a non billable project:
  * project rate: the wizard will create a SO with one SOL,
  	and will link the task without SOL set to the new one.
  	The project will also be linked to that SOL.
  * employee rate: the user has to fill a map to associate
  	product and employee. If the same product is set 2 times
  	with the same price (and so, 2 different employees), only
  	one SOL will be created on the SO. When submitting, the
  	project map will be filled and the project will be linked
  	to the SO. No fallback SOL will be set on project or on
  	the tasks.

Both use cases will be stopped if a timesheet of the project's
tasks is already linked to a sale line. If not, the timesheets
will be associated to the correct SOL (dependning of the billable
type), and the delivered quantity will be incremented, making
the SO invoicable. The tasks'customer will also be set.

Future work: setting a product per task (which will be a real
'task rate' feature).

Task #1883640
2018-09-13 14:44:35 +02:00
Arnold Moyaux ecc8ff8260 [FIX] mrp: fix bom structure report link
complete commit e31048f6a4
scss cursor is not needed since it is already set on btn element that
are activate.
2018-09-13 14:16:22 +02:00