Commit Graph
94501 Commits
Author SHA1 Message Date
qdp-odoo c8ea6cf530 [IMP] account: bank statement processing now allow partial reconciliation on the last invoice selected (not only on the first). 2015-03-23 10:53:08 +01:00
Yannick Tivisse 1a3efc5da7 [IMP] hr_holidays: remove filter 'To Confirm' 2015-03-23 10:49:11 +01:00
Géry Debongnie a7ed1d1332 [FIX] web: remove some leftover references to global openerp 2015-03-23 09:47:42 +01:00
Aaron Bohy de1d7f93d0 [FIX] Web: database manager: load control_panel.js
Several modules weren't loaded because the web.ControlPanel dependency
wasn't met.

Closes github issue #5872.
2015-03-23 09:32:44 +01:00
Fabien Pinckaers 4d51ca8736 [IMP] label change 2015-03-22 09:25:58 -07:00
Christophe Simonis 5aba579e74 [MERGE] forward port of branch saas-6 up to 42db2db 2015-03-21 15:54:05 +01:00
Fabien Pinckaers 6de1782cde [IMP] better button name 2015-03-20 14:32:29 -07:00
Olivier Dony 42db2db492 [FIX] crm: typos/grammar in CRM tips 2015-03-20 18:02:50 +01:00
Olivier Dony dfbef485c6 [FIX] l10n_be_coda: more lenient detection of CODA files
Some Belgian banks (e.g. CPH) seem to generate CODA
import files that do not comply with the CODA 2.3
(or 2.4 or 2.5) spec, specificially in the header
we use to detect CODA files.
2015-03-20 18:02:50 +01:00
Géry Debongnie f77764ff7e [MERGE] web: extract control panel out of view manager
This branch extracts the control panel out of the view manager. It
also does a few other refactoring in web client, such as:

* work on the way views communicate their state to the control panel
* better coordination between actionmanager, viewmanager, client widgets
* there is only one controlpanel by action manager
* buttons are added/removed atomically (no flicker)
2015-03-20 17:08:30 +01:00
Jérome Maes ca9d671c1d [IMP] account_analytic_analysis : change label of a state button on contract form view. 2015-03-20 16:52:18 +01:00
Aaron Bohy c6b1d0158e [ADD] Web: ControlPanelMixin
Creation of the ControlPanelMixin that should be used by widgets
needing a ControlPanel. It facilitates the way those widgets communicate
with the ControlPanel to update it according to their status.

From now on, client action widgets can easily use the main ControlPanel.
2015-03-20 16:34:42 +01:00
Xavier Morel 4b0a8d4096 [IMP] Web, web_calendar: push_state rendering logic
When a new state is rendered, it is now first appended to a
documentFragment, and then appended to the DOM when ready. Doing so,
there is no more a intermediate step where two widgets are in the DOM,
the new one being appended below.

This required a web_calendar fix:
Not exactly fixed per-se, apparently when fullcalendar is rendered
hidden/out of document it doesn't generate correct range dates, and
calls the events callback with invalid dates. The code would blindly
take those invalid date, get bits out of them (NaN), generate a
timestamp full of NaNs and blindly search() the table with that.

Just skip the events callback entirely if the start or end date of the
current period is invalid (~isNaN(date.valueOf())).
2015-03-20 16:34:42 +01:00
Aaron Bohy 258673fb31 [FIX] Web: view_list: _limit set at initialization
Set _limit at initialization instead of computing it each time its value
was requested, as it is static anyway.

This prevents a bug (this.getParent() undefined, i.e. parent has been
destroyed) occuring when fast switching with edit/save several times in
form views with one2many list fieds.
2015-03-20 16:34:41 +01:00
Aaron Bohy 546c07a58f [IMP] Web: Use of a ControlPanel in One2Many Fields
Creation of the One2ManyControlPanel template. The One2ManyControlPanel
can only contain action_buttons and a pager. Typically, in One2Many
Kanban, buttons are displayed (in edit mode) and in One2Many Lists,
the pager is displayed.

Improvement of all Views.buttons templates so that if there is no
button to render, it does not render an empty div. This was necessary
for Kanban buttons to prevent padding when there is no button
displayed. Changes in the other views were motivated by uniformity
concerns. This prevents to add empty div in the DOM as well.
Exception for FormView where the outer div is required for the option
footer_to_buttons to work.

This fixes a bug as the pager is now available in One2Many Lists, which
was not the case before, even if there were more than 80 items in the
list, i.e. some items were unreachable.

cp_bus argument in ViewManager init() is now required. If there is no
ControlPanel to communicate with, a dummy Bus should be given ot the
ViewManager.
2015-03-20 16:34:41 +01:00
Aaron Bohy 20b4aaab83 [REF] Web: Actions, ActionManager, ViewManager, Controlpanel refactoring
Big refactoring of Action, WidgetAction and ViewManagerAction to clean
their API. Mainly, renamming from State to Action and removal of unused
functions (or functions that are only used by the DebugManager, for
which we tolerate introspection).

Some logic has also been moved from the ActionManager to the Actions
themselves. The specific behavior of each type of Action is now handled
in the implementation of those Actions.

In ActionManager, this.states is renammed to this.action_stack to be
consistent with view_stack in ViewManager.

The setup_search_view() and render_switch_buttons() functions have been
moved from ControlPanel to ViewManager as it was before, since actual
design allows it and it makes more sense.

The ControlPanel API has also been simplified as some functions were not
used anymore. The ControlPanel is now updated directly by the widgets
using it, bypassing the ActionManager. The control panel elements are
stored by the widgets themselves to allow restoring them later.
2015-03-20 16:34:41 +01:00
Aaron Bohy 913942a327 [FIX] Web_calendar: this.options.$sidebar
The sidebar in Calendar views is not the usual sidebar of the other
views, which should rather be called toolbar and is located in the
ControlPanel. However, the Calendar sidebar was only rendered when
this.options.$sidebar was set, even if this option concerns the toolbar
and is thus nothing to do with the Calendar sidebar.

Also fixes css so that useless scrollbars aren't displayed anymore.
2015-03-20 16:34:41 +01:00
Aaron Bohy 1280bf2513 [IMP] Web and all views: ControlPanel atomic update
Change the logic of rendering and displaying/hidding the control
elements (buttons, sidebar and pager) of all views. The views do no
more render automatically their elements as this is rather done
through the render_[element] function called by the ViewManager.
This function only appends the element to the $node given as argument.
If no argument is given, then it may appends it to the DOM directly,
within the adequate div of its template.
This allows the ViewManager to attach/detach all elements of the
ControlPanel in an atomic may, to prevent the ControlPanel from
flickering.
Also detach the contents of the ControlPanel in headless mode. Headless
means that the ControlPanel exists, but is hidden. Detaching its
contents permits to have a cleaner DOM.

Also remove the oe_form_dirty class on the buttons in the FormView, as
this class is only used on the view itself.

Side changes:
* base_import: import.js:
    Extend render_buttons function to be compliant with the new buttons
    rendering logic
* board: dashboard.js:
    Set flag search_view to True as the searchview is needed for the
    Views displayed in the Dashboard to retrieve the records to display.
    Necessary since we do no more construct the searchview when this
    is set to false
* google_drive: drive.js,
  share: share.js:
    Module extending the Sidebar widget often add their own buttons
    by extending the start(), which is called each time the Widget
    is appended to the DOM. With our new design, this could be done
    in start() anymore as it should be done only one. It is now done
    in init() instead.
2015-03-20 16:34:39 +01:00
Aaron Bohy 7aa0836420 [IMP] Web: views.js, view_editor.js: DebugManager
Creation of a widget for the DebugManager and move it from the ControlPanel
to the Systray.

Refactoring of the widget to improve/facilitate the way of adding
options in the DebugManager as the view_editor does.

Add a do_action() function in the WebClient that forwards the action to
the main ActionManager so that widget that are not in the scope of the
ActionManager (e.g. Menu) can performed actions as well.

Note: The DebugManager is currently in the Systray but it will finally be
moved to a dedicated spot above the ControlPanel.
2015-03-20 16:18:35 +01:00
Aaron Bohy 151c90743e [IMP] Web et al.: unique main ControlPanel
A unique main ControlPanel is instantiated by the ActionManager and it
is updated each time the state changes (i.e. when an action is performed
on the ActionManager or when switch_mode() is called on the ViewManager).

Introduction of State classes to facilitate the way of restoring
previously rendered states in ControlPanel. The notion of widgets
previously used in the ActionManager is now encapsulated in the notion
of states.

The search() function has been moved from ControlPanel to ViewManager as
it makes more sense like this.

The ViewManager doesn't have the reference to the ControlPanel but
rather communicate with it through a dedicated bus.

Some refactoring has been done on the ControlPanel as well so that it
doesn't need to know the ActionManager and the current Action anymore
(it communicates with the AM with events, and it updates itself using
information passed in arguments).

Improves the way the ViewManager requests the ControlPanel to
instantiate a SearchView, and how it waits for this SearchView to be
corretly loaded.

Move back the views logic to the ViewManager which directly asks
the ControlPanel to render the buttons and switch-buttons areas with
the views passed in arguments.

Removes option replace_breadcrumb in push_state() of ActionManager as it
is not used.

Side changes:
* Account: account_widget.js:
    Adapt code to retrieve the current state of the ActionManager.
    Required due to the introduction of State classes that encapsulate
    the notions of widgets and inner_widget in the ActionManager.
* Board: dashboard.js:
    Some refactoring to adapt the code according to the new Widgets
    structure. Several dependencies (e.g. searchview, action) were
    unnecessary. Do not append the "add to dashboard" option to the
    Favorite menu if there is no ViewManager available (e.g. in
    Messaging) instead of hidding it with a CSS rule, as a ViewManager
    required to retrieve the active_view.
* Google_spreadsheet: search.js:
    Change the way to retrieve the list_view_id s.t. it does not rely on
    parent of the SearchView anymore.
* Web: search.js:
    Change the way to retrieve the title in search.js for Favorites s.t.
    it does not rely on the parent of the SearchView anymore. Doing so,
    the ControlPanel does not need the title attribute anymore.
2015-03-20 16:18:33 +01:00
Aaron Bohy 53a9f6c081 [IMP] Web et al.: ControlPanel extracted from ViewManager
The ControlPanel is still instantiated by the ViewManager.

Changes details:
* web: views.js:
    Code related to views header is extracted from the ViewManager
    to a new Widget named ControlPanel.

    Also uses the headless flag to tell the inner view not to put
    its buttons (use case: kanban) or pager (use case: list) in the
    header as it is hidden.
* web: view_form.js, base.xml:
    Uses the headless flag at initialization of the One2ManyViewManager
    widget instead of extending the ViewManager template (which doesn't
    handle the header anymore).

* web: view_list.js:
    Test on this.options.$pager instead of this.options.$buttons
    when dealing with pager.

    Note: the behavior for list view is unchanged and has a bug.
    If there are more then 80 records to display, only the 80th
    first are display, and as there is no pager, there is no way
    to see the remaining ones. A fix for this would be to use a
    light ControlPanel in One2Many views as well. With this,
    there won't be duplicated .oe-'view'-buttons/sidebar/pager
    anymore.

* web: view_graph.js, view_pivot.js:
    Only render buttons in non-headless mode

* web_dashboard: dashboard.js:
    Fix some references that were broken with ControlPanel extraction

* web_view_editor: web_view_editor.js:
    Extend ControlPanel instead of ViewManager

* Changes in selector of ControlPanel elements in several addons:
    * base_import
    * mail
    * web
2015-03-20 16:17:06 +01:00
Aaron Bohy db592efca2 [ADD] Web: openerpframework.js: willStart() function
Add the willStart() function to Widgets. This function is executed
between init() and start() and its purpose is to perform various
asynchronous calls required for start() to be executed.

It is automatically called after rendering a Widget, and start() is
called once the Deferred returned by willStart() is resolved.
2015-03-20 16:17:05 +01:00
Aaron Bohy 180115665e [ADD] Web: core.js: export Bus 2015-03-20 16:17:05 +01:00
Thibault Delavallée 94360ce480 [FIX] event, event_sale: ux fixes:
- maximum seats on an event can be edited for confirmed events
- maximum seats is required when the event has limited seats availability
2015-03-20 16:15:03 +01:00
Thibault Delavallée da09947121 [FIX] website_event_sale: do not tell the ticket is
sold out or has not enough seats if it is unlimited.
2015-03-20 16:15:03 +01:00
Thibault Delavallée e1f26d52ee [FIX] website_event_sale: typo: forgotten , leading to a crash
when trying to remove attendees when lessening the number of tickets
sold in the ecommerce.
2015-03-20 16:15:03 +01:00
Thibault Delavallée 879b454544 [FIX]¸crm: res_partner form view: correct target of
opportunities button tip. Using directly the first child
is risky because modules can add statbutton before the
opportunities button (published for example). Using a
class seems a safer way to select the target.
2015-03-20 16:15:03 +01:00
Jérome Maes 84f8aac3d7 [IMP] account_analytic_analysis : change label of a state button on contract form view. 2015-03-20 15:48:03 +01:00
Christophe Matthieu f5a0a64e08 [FIX] website editor: snippet clean_for_save method is never called 2015-03-20 15:25:33 +01:00
Hitesh Trivedi 04daefd2d1 [FIX] website_blog : when it load template not able to evalute json data 'resize_class' 2015-03-20 09:03:34 +01:00
Richard Mathot c405dfe3b0 [FIX] hr_holidays: correct tooltip for sick leaves
The displayed date was incorrect: instead of the day number in the month (1st-31th), we displayed the day order in the week (0th-6th).

Yeah, this one was a tricky one...
2015-03-20 08:31:34 +01:00
Christophe Simonis 3baab9b22d [MERGE] forward port of branch 8.0 up to 7780004 2015-03-19 18:48:41 +01:00
Christophe Simonis 7780004f95 [FIX] web: correct many2one dropdown visibility.
The dropdown should only be append to visible elements.
2015-03-19 18:41:45 +01:00
Goffin Simon ac67ce4ecc [FIX] stock: quants not being reserved correctly
`product_qty` field is not recomputed at record creation.
Force field recomputation at any change
Removing the trigger on `product.product` should not be a problem as
product uom can't be changed once there are move lines.

opw:629650
2015-03-19 15:01:54 +01:00
Géry Debongnie 04da153fe9 [FIX] web: session requires a name to properly work
For historic reasons, the session had a name (hardcoded to "instance0"),
used in at least one place: the get and set cookie methods.

The idea was most likely to allow multiple instances of the web client
to coexist peacefully.  This does not work at all at least for the last
versions, and the new module system is a better way to do it anyway.

However, before removing completely the prefix in cookies, we should
actually check if no external code depends on it.
2015-03-19 14:57:29 +01:00
Nicolas Martinelli 3da6c1a610 [FIX] web_calendar: reactivate the possibility to remove a calendar from side list
It is now possible again to remove a calendar from the side list
thanks to the 'X'

opw: 629511
2015-03-19 13:26:37 +01:00
Jeremy Kersten d5da26a5a6 [FIX] mass_mailing: count recipients with SUPERUSER_ID to bypass security
If a campaign was done to a list of Applicant, marketing team had an error loading the kanban view.
Because to display the number of recipents, a search is done with a domain on hr.applicant.
Model that except Human Resources / Officier, nobody can read.
2015-03-19 13:09:22 +01:00
Darshan Kalola bc11d27f62 [IMP] project: add author of incoming email as customer
of the newly created task.
2015-03-19 13:02:53 +01:00
Nandan Jani 633c166c77 [IMP] stock_account: on picking type kanban card add
an indicator for pickings to be invoiced + action + filter.
2015-03-19 12:41:20 +01:00
cod-odoo 32fb2f0940 [IMP] crm: better management of contact / company / customer when going
from a lead to an opportunity.
2015-03-19 12:39:50 +01:00
Jay Patel 2ec6fe68a1 [IMP] delivery, payment: name are now translatable 2015-03-19 12:38:39 +01:00
Simon Lejeune 77ee3ff639 [IMP] web_client.js: trigger web_client_ready on core.bus
This way, any module requiring web.core has access to this hook.

var core = require('web.core');
core.bus.on('web_client_ready', this, function() {console.log('ready')});
2015-03-19 11:42:32 +01:00
Arthur Maniet 64ba5b9ee4 [IMP] account: in multicurrency bank statement reconciliation, the error message showing when no account is configured for foreign exchange gain/loss is configured now offers a link to the configuration page
Fixes #5839
2015-03-19 10:50:52 +01:00
Thibault Delavallée 69cf768404 [IMP] mail: composer: recipients before subject 2015-03-19 10:45:25 +01:00
Laurent Mignon (ACSONE) cafcd65b6d [FIX] Take a copy of the context.
If the method `import_file` is called with the new API, the context is a
frozendict and the update will raise `NotImplementedError: 'update' not
supported on frozendict`

closes #5798
2015-03-19 10:02:45 +01:00
Géry Debongnie 21e38e3851 [FIX] web: fix database manager
database manager is the only html file we have, and because of that,
regularly escapes the greps.  It was still trying to load old files
before the javascript modules.  It has now been updated to the new
file structure.

Also, I had to guard the nv customization from happening in misc.js
because the nvd3 library is not loaded in the database manager, but
the misc.js file is required.  Not really happy about the misc.js file,
but this is for another commit.
2015-03-19 09:50:53 +01:00
Goffin Simon 5611b5e2fa [IMP] To allow to translate pages in version.
The translations of a page A in a version are applied to all the pages
with the same key of page A.
2015-03-18 17:19:07 +01:00
Jeremy Kersten 825c2b3ff5 [FIX] website_hr_recruitement: allow utm for job apply 2015-03-18 16:51:05 +01:00
Goffin Simon 05908a0fac [FIX] account_payment: supplier invoice on more then one payment oder
The field move_line_id in payment.order.form only shows account move lines that still have
an amount to pay. This was lost during 333e83f.
2015-03-18 16:45:25 +01:00
Yannick Tivisse 882f1b3721 [IMP] hr_expense: Filter to find expenses of former employees 2015-03-18 15:11:16 +01:00