Commit Graph
103823 Commits
Author SHA1 Message Date
pvy 65a1c0d060 [FIX] account: the period was wrong as it didn't take into account the 'not due' period 2016-07-13 11:23:43 +02:00
Thibault Delavallée 15835236f2 [FIX] tools: yaml_import: fields with inverse
When importing from yaml do not remove valid values for computed fields with
an inverse method.
2016-07-11 16:21:22 +02:00
Thibault Delavallée fa502dcab8 [FIX] tools: yaml_import: typo during migration 2016-07-11 16:21:16 +02:00
Jérome Maes 06fd5de05d [FIX] website_crm_partner_assign: bad method signature 2016-07-11 13:36:22 +02:00
qsm-odoo 364bd0dd31 [FIX] web_tour: ignored mutations test
Before this commit, the mutation on tooltips themself were ignored.
However, the DOM mutations due to tooltip movements were still
considered.
2016-07-08 16:48:10 +02:00
cod-odoo 7dcb518567 [FIX] mrp: Fixed traceback on print BoM Structure and single method for work order counts 2016-07-07 10:11:51 +02:00
Raphael Collet 629e175501 [FIX] fields: enable setting attribute group_operator to None 2016-07-06 16:18:04 +02:00
Simon Lejeune cb30d0ef0e [FIX] web: qweb: correctly set preprocess_node on qweb engine
issue: xml template are not translated anymore

rev d56b35e2 moved qweb code inside the `qweb.js` file and also changed
the behavior with the introduction of a `QWeb` factory returning instances
of qweb rendering engine. However, we have to set on the rendering engine
instance a `preprocess_node` function that will translate the qweb
templates.

The solution for this issue (also introduced with rev d56b35e2) was
to set this function on the prototype of the QWeb factory, and it was
obviously not enough as it has to be attached to the rendering engine
instance.

In order to benefit from the fact that the `preprocess_node` function
is attached to the prototype of the QWeb factory, we could attach it to
the rendering engine instance with something like
`qweb.preprocessed_node = this.preprocessed_node`, however i find that
conceptually attaching a translate function to a factory does not make
sense, si i simply made `preprocess_node` a free function and i set it
on rendering engine instance.
2016-07-06 15:49:01 +02:00
Martin Trigaux ab1fb148a9 [IMP] point_of_sale: add order_id to report
Useful information that was present in removed pos.detail report.
Without this it is not possible to replace the report by the pivot view.
opw-681833
2016-07-06 13:52:29 +02:00
qsm-odoo 7d1d61870c [FIX] web_tour: debounce tip repositioning callback on resize 2016-07-06 12:04:39 +02:00
qsm-odoo 5bc0ecf445 [IMP] web_tour: restyle tour tips
Backport of 1 second late commit in master.

* Remove the "?" content
* Use a background gradient
* Use a bottom transparent box-shadow instead of a surrounding opaque one
* Reduce tip size and reshape the arrow
2016-07-06 11:04:30 +02:00
Simon Lejeune 1479510402 [REL] 9.saas~12 2016-07-06 10:41:49 +02:00
Jeremy Kersten 2e0caa1b24 [IMP] base, portal: improve demo data of res_partner
Use company_name field and no more the street field
to save the company name.
2016-07-06 08:33:46 +02:00
Antony Lesuisse 5a18f30da5 [MERGE] portal website_project: portal from backend to frontend.
Move the portal features of project to website_project to display tasks in the
website portal.

Add website_project_timesheet to display timesheets on website_project tasks.

Remove all menuitems related to the backend portal as the frontend portal now
provides all the models.

Original authors: Vipul Bhatt, Florian Wintjens
2016-07-06 01:26:15 +02:00
Antony Lesuisse ecd58457ed [REM] portal: backend menuitems
Remove all backend menuitems related to portal, as the supported portal
mecanism is now throught the website_portal My Account page.

Original authors: Vipul Bhatt, Florian Wintjens
2016-07-06 01:17:43 +02:00
Antony Lesuisse 4d3114825a [ADD] website_project_timesheet: Timesheet on Tasks in website portal.
Show the timesheets (account.analytic.line) recorded on a task in the website
portal.

website_project_issue_sheet: once a timesheet can be read, use sudo to read the
name of the responsible as portal users might not have the right to read users.

Original authors: Vipul Bhatt, Florian Wintjens
2016-07-06 01:17:43 +02:00
Antony Lesuisse 30bc0ee076 [IMP] website_project_issue: Portal access to Issues
Move portal features (mainly ir.rule) from project_issue to
website_project_issue.

Remove backend menu item, issues should be accessed from the website_portal My
account page, the backend portal menuitem is removed.

Add the dependency on website_portal to display the issue count on projects.

Original authors: Vipul Bhatt, Florian Wintjens
2016-07-06 01:17:43 +02:00
Antony Lesuisse ccf606e026 [ADD] website_project: Portal access to Projects
Split project to move portal features to a new module named website_project.

Portal users may now access their projects and tasks throught the
website_portal My account page. The Backend portal menuitem is removed.

Simplify the privacy settings of project, to be visible to portal users the
project must be in 'portal' mode.

Original authors: Vipul Bhatt, Florian Wintjens
2016-07-06 01:17:43 +02:00
Christophe Simonis 05e0bf3f1b [MERGE] forward port of branch saas-11 up to e7190cb 2016-07-06 00:03:49 +02:00
Christophe Simonis e7190cbbbf [MERGE] forward port of branch saas-10 up to 74b51d3 2016-07-05 23:42:12 +02:00
Christophe Simonis 74b51d3d97 [MERGE] forward port of branch 9.0 up to 489ea42 2016-07-05 23:19:50 +02:00
Jeremy Kersten a764474193 [FIX] website_event_sale: Typo
Courtesy of @odony
2016-07-05 21:48:49 +02:00
Christophe Matthieu 8517eb3d7b [IMP] qweb: t-esc, t-raw and t-field 'ir.qweb.field' models with t-options
Remove 'field' from 'value_to_html' method attributes
't-esc' escape the result of the widget.
(Added 'remove_span' as option for monetary widget)

E.g.: <t t-esc="32" t-options='t-options='{"widget": "monetary", "display_currency": website.currency_id, "remove_span": True}'>
result: $ 365.00

Use t-options instead of t-field-options
Add backward compatibility
Remove 'values' attribute from record_to_html
Remove 'field' attribute from value_to_html
+ few fix for 'ir.qweb.field' and cache
2016-07-05 19:12:01 +02:00
Christophe Matthieu 253a0f6311 [FIX] qweb: no automatic asset invalidation except in dev_mode
In non-xml-debug mode we want assets to be cached forever, and the admin can force a cache clear
by restarting the server after updating the source code
2016-07-05 18:44:59 +02:00
Christophe Matthieu 70a69bf9bc [FIX] website/im_livechat: use new api to get asset
Issue: can't get asset content, self don't have env attribute, wrong attributes send.
2016-07-05 18:44:58 +02:00
Christophe Matthieu 032122484e [TYPO] qweb: use the same option attribute for t-esc t-raw and t-field
t-options instead of t-field-options
2016-07-05 18:44:58 +02:00
Christophe Matthieu 940e23a7dc [IMP] qweb: t-esc/t-raw use t-options instead of format method
t-field, t-esc and t-raw use the same widgets and options
2016-07-05 18:43:14 +02:00
Christophe Matthieu 339d5b8505 [FIX] qweb: float widget: use same rounding as orm float field
42,12345 with precision=4 should be 42,1235 and not 42,1234
2016-07-05 18:43:10 +02:00
Christophe Matthieu 229ab3e1ca [IMP] qweb: move code to gather similar methods and to facilitate the reading of the code 2016-07-05 18:43:09 +02:00
Christophe Matthieu ae5f853819 [IMP] qweb: remove values from record_to_html to avoid crappy code 2016-07-05 18:43:09 +02:00
Christophe Matthieu 3407fb70e4 [IMP] qweb: add t-options on t-esc and t-raw who use 'ir.qweb.field' models
Remove 'field' from 'value_to_html' method attributes
't-esc' escape the result of the widget.
(Added 'remove_span' as option for monetary widget)

E.g.: <t t-esc="32" t-options='t-options='{"widget": "monetary", "display_currency": website.currency_id, "remove_span": True}'>
result: $ 365.00
2016-07-05 18:43:09 +02:00
Christophe Matthieu 7e1f2eb91e [IMP] ir.qweb: format monetary use field monetary method
(facilitate code maintenance)
2016-07-05 18:43:09 +02:00
Jeremy Kersten 064ebf9f68 [FIX] website_event_sale: avoid to have empty column in register screen
Before this commit, an empty column was always added in website_event
to allow to website_event_sale to add the remaining place if <25%.

Now we only add the column if needed, so only if one line need it.
2016-07-05 18:42:57 +02:00
qsm-odoo efed10bd9a [FIX] web_tour: tip border use
The border width was still not used correctly to compute the overlay
size, making scrollbars appear for no reason.
2016-07-05 18:05:24 +02:00
qsm-odoo 3d8d2ed50e [FIX] web_tour: ideal location to append tip
The tip was currently placed in the first parent which can scroll.
This is wrong if there is a parent which is position:fixed in that
element which scrolls (as it would not follow the scrolling as it is
fixed).
The ideal location is now the first parent which can scroll or which
is position:fixed.

Note: there are still two cases which may not work but they are
considered rare enough to not handle them :
* A position:fixed element which is overflow:hidden too
* A position:absolute element whose relative ancestor is an ancestor
of the ancestor element which can scroll.
2016-07-05 18:05:24 +02:00
qsm-odoo 73898ccb8b [IMP] web_editor: change image edition toolbar
* Move description button at the end of the toolbar
* Add an "auto" state button for the image width (alongside 100%,
50% and 25%) (when these last three are unchecked, the auto button
becomes checked).
2016-07-05 18:05:24 +02:00
qsm-odoo c259b38ef5 [IMP] web_editor: background + color snippet options
Now, when choosing a background-color when a background-image has
already been selected, the background image is removed on hover/click
of the color option.
However, the opposite operation remains the same. So if you choose a
background-color, you can then choose a background-image and the
colors will be kept.
2016-07-05 18:05:24 +02:00
qsm-odoo 3247400291 [IMP] website(_*): tours
* Adapt modals for new pages/product/... to leave some space for tour
tips on the right
* Remove the "click on add page" step which was the start of each tours
and leave it to be the last of the website tour
* Change position of some tips
* Remove step "click on parent button" in website tour as it is not
necessary anymore
* Remove the possibility to skip the frontend tours
2016-07-05 18:05:24 +02:00
Denis Ledoux 489ea42859 [FIX] web: parsing of date with abbreviated month/day
When using the abbreviated month in the language
date format (`%b`),
e.g. `%d %b %Y`
in some languages, the parsing of the date
from this format to the database format (YYYY-mm-dd)
failed because of a dot `.` added from time to time
to the end of the abbreviated name
e.g., in French, `5 juil. 2016`

This is a bug of `moment.js` < 2.13.0,
handling badly this dot.
This is solved from `moment.js` 2.13.0,
thanks to the below revision
moment/moment@41fdb58572
moment/moment#3078

Unfortunately, we cannot update this library to its latest
release in stable release of Odoo (e.g. 9.0),
as this is seen as an unstable change
(if some API changes occured in the given library)

Instead, if the parsing of the date fails with the
strict mode (meaning the date must respect the format
exactly), we perform a second pass without the strict mode,
so this dot will be ignored,
and the date can be correctly parsed.

The issue can be reproduced by loading the French language,
and setting `%d %b %Y` as date format, and then performing
an advanced search on a date field. The value of the date
in the advanced search will be empty without this revision
(for the months having more than 4 chars,
other than `mars`, `mai`, `juin`, `aout`).

Fixes #11854
opw-682534
2016-07-05 18:04:22 +02:00
Simon Lejeune b0a25e5b0e [FIX] web: translation: don't reset database on set_bundle
set_bundle is called twice (one time by the session, another time
by the web_editor). As the `set_bundle` actually drop the dict of
translations instead of updating it and as web_editor only load
the terms of its module, depending on which call to `set_bundle`
ends first result on having your translations or not.

This commit update the database of translation instead of dropping
it, which fixe the current issue (the dict of traductions empty of
the traduction you really need) but another fix would be to remove
the useless call by web_editor when launched in the backend  (which
is probably there because it was needed when the web_editor was only
working in the website).
2016-07-05 17:48:33 +02:00
Simon Lejeune 95a391f815 [FIX] report: more precise routes in the controller
ie, make `converter` argument not a path but a string. Converter
in our codebase are one-word string anyway (html, pdf).

This is done because a less asset in the report module is not reachable
in debug mode (it is a fake file that is reachable by a fallback in the
http dispatching and the fallback is not done because the `/report/converter
` matched the route of the fake file).
2016-07-05 17:48:32 +02:00
Simon Lejeune b7de723b8c [ADD] report: improve client action to allow sending do_action commands 2016-07-05 17:44:56 +02:00
Simon Lejeune 752cd0a482 [REF] report: replace the popup with an iframe in a client action
This change concerns reports of `qweb-html` type. Previously, they were
openned in a popup and it was not very practical. We chose to open these
reports in an iframe (as opposed to what's done in `account_report`) in
order to be the most close to the pdf version in terms of apperance.

The client action allows an integration with the control panel. Apart from
the breadcrumbs integration, we also add buttons to handle the web_editor
(save, discard, etc). We also add a button to print the pdf version.

As there is some security concern to communicate with an iframe, we use
the postMessage[1] technology and we fix the `targetOrigin` to the
`web.base.url` parameter, that means that if the window to which we send
the message does not match the `web.base.url` origin, the event is not
even dispatched.

In order to to that, the report module uses the ir_http `session_info`
override mechanism to add the `web.base.url` in the DOM of the webclient,
 and the report module adds to the DOM of report the `web.base.url`
content. This way, both scripts (in the webclient and in the iframe)
have the information of the trusted origin.

The client action does not have a complicated logic: it opens the
report's url in an iframe to show the report or open the web_editor
(the editor is activated by using the `enable_editor` query string.
If you click on the control panel button (save/discard) it'll send
message to the web_editor in the iframe to ask for save and discard.
It also waits for messages to know if the edition is done / cancelled
and toggle buttons of the control panel accordingly.

To allow that, we override the web_editor mechanism if it's opened in
an iframe and we chain to the `save` and `cancel` method deferred that
send message to the client action's window. We also make the web_editor
waits for message to start and stop the edition (controlled by the
control panel buttons).

The override of the action manager has been refactored / improved in
order to open the clien action and not the popup anymore. This way
we are able to, in the client action, return the current action with
the type `qweb-pdf` and the report is downloaded.

[1] https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
2016-07-05 17:44:56 +02:00
Simon Lejeune 06770f53bf [FIX] web: allow on_(attach|detach)_callback callbacks to be called
The `on_attach_callback` and `on_detach_callback` callbacks are
called when an a widget is attached / detached according to the
`is_in_DOM` variable. As the community's action manager cannot
be detached from the DOM, we can hardcode this value to true.

This allow to run these callbacks when needed.
2016-07-05 17:44:56 +02:00
Simon Lejeune 2fdf631809 [FIX] web: control_panel: do not trim breadcrumb's title if undefined 2016-07-05 17:44:56 +02:00
Simon Lejeune eed7fdb6fe [REF] web_editor: cancel method of RTE should be async
and return its deferred. This commit makes the behavior consistent with
the `save` method.
2016-07-05 17:44:56 +02:00
Simon Lejeune 5c54571f4e [FIX] web_editor: remove the editable key if no write on the model
The `check_access_rule` call allow to remove the `editable` key from the
rendering context (which will lead to the display of the editor bar) if
an access rule prevents the edition of the ir.ui.view record. Also remove
it in case the user has no write access on the model (i.e. demo user).
2016-07-05 17:44:56 +02:00
rgo-odoo 27787265dd [MIG] crm_partner_assign: Converted yml test cases to python unittest 2016-07-05 17:27:44 +02:00
rgo-odoo 053982f48d [MIG] website_crm_partner_assign: Code migration to new api 2016-07-05 17:27:44 +02:00
rgo-odoo ac94ed70ec [MOV] website_crm_partner_assign: splitted the files according to new api guidelines 2016-07-05 17:27:44 +02:00