Commit Graph
6521 Commits
Author SHA1 Message Date
Aaron Bohy a0ddaf8b84 [IMP] web: trigger an event when webclient is ready
The main purpose of this commit is to be consistent with the enterprise edition,
in which the event 'DOM_updated' is triggered when new content is inserted in
the DOM. This way, addons that need to know when a view has been attached in the DOM
(e.g. web_tip) can listen to this event and will work fine with both editions
of the web addon.

With the actual structure of the webclient (action_manager, view_manager),
there is no easy way to decide whether or not a view is attached in the DOM,
because every rendering is performed in a detached element. For instance,
when a view_manager instantiates a new view, it appends it in its $el once
the view is ready, but it can't know if its $el is attached in the DOM (it is
only the case if the view_manager is the current action of the action manager).

This rev. introduces utility functions to centralize the appending/prepending of
content, so that an event can be triggered (at a unique place) when the content
is really in the DOM. These functions are used by the the action_manager and the
view_manager.

Another change is that the action_manager keeps the view_manager informed when
they are attached in/detached from the DOM, through the variable is_in_DOM.
2015-07-15 13:32:58 +02:00
Aaron Bohy 27df65c878 [IMP] board,google_spreadsheet,web,web_calendar: Favorites menu
Adapt the Favorites menu so that addons appending stuff in it are compliant with
the enterprise edition.

Mainly, creation of dashboard.less from of dashboard.sass so that we can use mixins
defined in the web addon.

Some changes as well in the dashboard view to make it compliant with the enterprise
edition.

Use correct naming convention: classnames with underscores, less mixins with hyphens.
2015-07-15 13:32:56 +02:00
Christophe Matthieu dcbd66a3eb [IMP] boot.js: use console.error instead of console.warn to make the runbot in red when there's an error in a javascript module 2015-07-14 11:43:24 +02:00
Christophe Matthieu 809cdbb153 [IMP] web: use a mutex on the object instead of create one in the send_commands method: no crossed change values, keep internal_dataset_changed for other widgets (like editable list) 2015-07-13 11:50:32 +02:00
Christophe Matthieu 66025268e1 [IMP] web: AbstractManyField: add a feature: if the widget receive a write command without link to the record previously, automatically add the record id into dataset ids. 2015-07-13 11:50:32 +02:00
Christophe Matthieu 087fd6942b [IMP] web_editor: add test translator 2015-07-10 17:00:15 +02:00
Christophe Matthieu 92983cfede [IMP] tour: add log attribute on run method and add getHandlers on jQuery to display the list of handler when the tour try to trigger event 2015-07-10 17:00:15 +02:00
Christophe Matthieu 9665882fba [IMP] web_editor: adapt css, js and xml to use web_editor 2015-07-10 17:00:12 +02:00
Christophe Matthieu 25d5bb855c [IMP] web: remove cleditor html field and use web_editor (with 'style-inline': true to send email) 2015-07-10 17:00:12 +02:00
Christophe Matthieu 8c559044a5 [IMP] web_editor: split website into web_editor (to use editor in backend for html field) and website 2015-07-10 17:00:11 +02:00
Christophe Matthieu 500c33b184 [IMP] web: split model.js into model.js and data_model.js. Web js modules must call web.DataModel. 2015-07-10 16:32:35 +02:00
qsm-odoo fc3b25cefd [MOVE] web, website_*: select2(-bootstrap) in web and assets-common
* select2 was linked in both backend and frontend (by web and website)
* select2-bootstrap was in website and linked only in frontend but it
  is in fact needed in backend too

+ Remove useless link of the lib by other modules
2015-07-09 16:27:24 +02:00
Pankaj Joshi 03592e1c73 [FIX] account, mail, web : replaced broken glyphicons with font-awesome icons and updated css/scss file accordingly 2015-07-08 17:11:18 +02:00
Aaron Bohy 20ed190429 [REF] web: ControlPanel
Adds the option clear so that, if set to false, only some elements of the
control panel can be updated while keeping the other ones unchanged.
The breadcrumbs can then be updated by simply calling update_control_panel(),
instead of triggering a specific event to do it.

A bit of documentation and refactoring as well, mainly for the
breadcrumbs to be handled as other control panel's elements.
2015-07-07 16:43:01 +02:00
Aaron Bohy 81ffa75944 [FIX] web: many2manytags: hidden if empty and readonly
In edit mode, if this field is readonly and empty, its main div has
height 0 but its border is displayed. This rev. simply hides the field
in this case.
2015-07-07 16:43:01 +02:00
qsm-odoo fe1541abeb [FIX] web: many2manytags - empty value when selected
The input value was not removed once the user added a tag
2015-07-07 10:44:15 +02:00
Aaron Bohy 7f65415393 [FIX] web,web_tests: delete button in editable list views
Use a fontawesome icon instead of no more supported mnmliconsRegular.
2015-07-06 16:27:38 +02:00
Aaron Bohy 3bb35d68b6 [FIX] web: x2many fields: set_value(): missing return
The set_value() function of x2many fields is asynchronous. When a record is
loaded, the invisibility changers (IC) are evaluated once set_value() has been
performed on every fields. As set_value() didn't return its deferred, the IC where
evaluated with wrong values. It produced in particular the following bug:

Go to Customers > Agrolait (the Contacts tab is displayed), switch to next record,
which is the first contact of Agrolait. The Contacts tab is still displayed,
whereas it should not (the invisible condition being is_company == false and
child_ids == [], i.e. there is no contact).

Also call this._super() in set_value() of AbstractManyField instead of
duplicating the function of its parent.
2015-07-02 14:04:42 +02:00
qsm-odoo 93013eca6d [FIX] ProgressBar
Leaving edit mode was impossible if the value was not changed
+ Remove use of PropertiesMixin
2015-07-01 15:35:19 +02:00
Aaron Bohy c5f3debc32 [FIX] web: FormViewDialog: multi select option
Before this rev., the multi_select option wasn't enabled even by setting
disable_multiple_selection to false in the options, when the res_id key
wasn't defined in options (null != undefined). It was the case for every
X2Many views, except for the Many2ManyKanban view as we explicitely set
the disable_multiple_selection to false AND res_id to null. However, all
X2Many views should enable this option.
2015-07-01 15:27:53 +02:00
Aaron Bohy b601ec66ca [IMP] web,mail: use of Modals to confirm changes discard
instead of the browser confirm dialogs, for the sake of uniformity.
2015-07-01 11:36:32 +02:00
Aaron Bohy 3a511aaa70 [IMP] web,web_kanban: Dialog.confirm api
takes now an object of options for the Dialog, containing two possible
callbacks (for confirm and cancel).
2015-07-01 11:36:31 +02:00
Aaron Bohy d6afe624eb [REVERT] web,point_of_sale: cordova integration
introduced by forwardport: a304194936
initial commit in 8.0: 19eda68547
2015-06-30 15:46:08 +02:00
Aaron Bohy d3398b4996 [REF] web,pos: font dir renamed for enterprise compatibility 2015-06-30 15:46:08 +02:00
Aaron Bohy 9d121cd9ec [FIX] web: One2ManyKanbanView: reload view on create
Before this rev., the One2ManyKanbanView wasn't reloaded after creation of a
new record (on dialog close).
2015-06-26 13:48:37 +02:00
Aaron Bohy 230af35154 [IMP] web: ViewManager for One2Many and Many2Many fields
This rev. generalizes the notions of FieldOne2Many to FieldX2Many and of One2ManyViewManager
to X2ManyViewManager. The same logic is now applied both for One2Many and Many2Many fields.
This allows Many2Many list and kanban views to have a pager, as the pager is instanciated
by the view, on demand of the ViewManager.
2015-06-25 15:44:42 +02:00
Aaron Bohy 5490aad0c9 [FIX] web, sales_team: many2many kanban: cards style + clickable
Apply the same style to many2many form_field as for one2many ones.
Make the sales_team cards for team members clickable.
Add "position: relative" to sales_team cards for the cross to be correctly
positionned. Inline style is not the right way to do it, but for the sake
of consistency, it is ok. A better commit should come to remove this inline
style from all x2many kanban templates.
2015-06-25 15:44:42 +02:00
Christophe Simonis a304194936 [MERGE] forward port of branch saas-6 up to 81b5c60 2015-06-25 00:26:31 +02:00
Géry Debongnie 07efacb578 [REF] web_kanban: remove many2manyKanbanView
this is not necessary anymore, with the new kanban view.  It also
paves the way for further changes (soon to be done): using a viewmanager
to instantiate the many2many kanban view
2015-06-24 16:08:19 +02:00
Christophe Simonis 704a11ddee [MERGE] forward port of branch 8.0 up to b8bf1e0 2015-06-24 12:45:14 +02:00
Christophe Simonis b8bf1e0905 [MERGE] forward port of branch saas-3 up to ea659cb 2015-06-24 12:37:08 +02:00
Christophe Simonis ea659cbd87 [MERGE] forward port of branch 7.0 up to 16a545b 2015-06-24 12:34:03 +02:00
Christophe Matthieu beca8fb36d [FIX] web: One2ManyListView list editable: also reload the focused inline form when the list is reloaded 2015-06-24 11:45:23 +02:00
Jean-Baptiste Quenot 3071ef16c7 [ADD] web: sorting in ir_filters
Add a parameter sort on the ir.filters to maintain the order of searching when
reloading a filter.
Fixes #6867
2015-06-23 16:00:07 +02:00
Olivier Dony a180cbddf7 [MERGE] Forward-port 8.0 up to 9b1aa53f29 2015-06-23 15:36:16 +02:00
Nicolas Lempereur 1942522969 [FIX] base: update File Content for binary field
To distinguish two ir.attachment 'File Content', we base it on the file
size (this I imagine is for efficiency).

This is done by setting bin_size in the context. Doing this, the
returned db_datas field will be the file size of the converted to base64
content (if no filestore).

But this size is returned in string format, so "get_nice_size" (in
openerp/osv/fields.py) which gets this size calculates the length of the
string. e.g: if the size is '2142' get_nice_size will return 4.

This fix solves this by converting the string to an integer, thus
unifying it with the filestore case (where we use os.path.getsize which
return an integer).

Also, the field presenting the issue (FieldBinaryFile) has been changed
so it is always updated even if the size is the same (as it was already
done by 3632949 for FieldBinaryImage widget).

closes #7223
opw-643071
2015-06-23 15:20:33 +02:00
Géry Debongnie c104aae258 [FIX] web: patch community client to use css
this change allows every addons to convert their css to use the
o_web_client class, which works in enterprise edition.
2015-06-23 10:08:47 +02:00
Aaron Bohy 68b61db3a2 [IMP] web: form_view: stat buttons hover style 2015-06-23 09:02:05 +02:00
Nicolas Martinelli ac4849f9ca [ADD] web: prevent the propagation of context keys containing prefix show_
This decision comes from the following bug:
- Go to Sales -> Quotations, and open any existing quotation in form view (the
  partner must have an address defined)
- Click on the partner
- Click on the stat button "Claims"
- You notice that the address of the partner is included in the search

This is due to the context property show_address which is set to 1 when a
quotation is open. Therefore, it is necessary to filter out this keyword.

Since the prefix "show_" is used for only few context variables, it was decided
to define this pattern as a standard pattern to filter out.

opw-642893
2015-06-22 14:06:11 +02:00
Cedric Snauwaert d017827c1a [FIX] account: use correct currency symbol for bank_statement_line amount 2015-06-19 16:06:10 +02:00
qsm-odoo 2a40c195a5 [FIX] Many2ManyTags and web_tests
Adapt web_tests to the new many2manytag included in the tour widget_x2many
2015-06-19 13:42:15 +02:00
qsm-odoo 3abe93715a [IMP] New many2manytags field
Many2manytag widget is specialized by calendar module so it had to be
common for community/enterprise
2015-06-19 09:46:38 +02:00
Christophe Simonis 13468c271f [MERGE] forward port of branch 8.0 up to ed3065e 2015-06-18 19:41:31 +02:00
Aaron Bohy d37495ab0d [FIX] web: pager edition style 2015-06-18 14:32:13 +02:00
Aaron Bohy 5f72fb8e10 [IMP] web: pager: editable feature + documentation
Pager's state can now be edited (mainly to change the limit,
but the range of values as well).
2015-06-18 13:51:56 +02:00
Martin Geubelle f18caa435c [IMP] web: remove the strange color on links in the view-manager 2015-06-18 11:10:31 +02:00
qsm-odoo 17893c60bc [IMP] Add design compatibility for templates
Add compatibility rules for the templates to look good on both
enterprise and community editions
2015-06-18 10:57:52 +02:00
qsm-odoo 8e5332a27e [FIX] LabelSelection Widget
The span was not closed (<span>...<span>)
2015-06-18 10:55:18 +02:00
Christophe Matthieu 7cbe33efdf [FIX] web: relational widget: replace_with returned by the get_value must contains the updated lines. 2015-06-17 18:23:51 +02:00
Christophe Matthieu 26a5ef4f7c [FIX] web: one2many list
Error when click on other record after an update on a one2many record in list editable which have an 'add an item' by checkbox selection
2015-06-17 18:22:21 +02:00