summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/view_form.js
AgeCommit message (Collapse)Author
2015-03-18[REF] web: add module system to the web clientGéry Debongnie
This commit introduces a new module system for the javascript code. Instead of using global (namespaced) variables everywhere (like openerp.web.whatever, ...), each file declare one (or more) module with its dependencies. Each module will be loaded after its dependencies, and will be given a reference to the return values. This change is a massive departure from the way the client worked previously. It will sadly break some/most history, but I am sure that the future git ecosystem will allow you to easily browse the history past this revision (one can dream). This commit feature: * main namespace is now odoo instead of openerp * a way to define modules and dependencies (inspired by requirejs) * many files have been splitted in simpler subfiles * basic support for debugging in odoo.__DEBUG__ * no global variable (i.e. nothing in window.openerp) * many bug fixes, many new bugs Future vision: this modularization should simplify future code development, simplify debugging and will allow a serious testing effort
2015-03-11[IMP] ir_ui_view, view_form: add information about the userRavi Gadhia
being able to create and write on many2one and many2many records in a form view. Indeed before this commit users had always the possibility to create or edit records leading to a crash if no access rights were granted. Now the option is not displayed if the user has no rights to do it. Tests have been added for this feature.
2015-03-10[MERGE] forward port of branch 8.0 up to c0496edChristophe Simonis
2015-03-10[MERGE] forward port of branch saas-3 up to f8a9405Christophe Simonis
2015-03-10[MERGE] forward port of branch 7.0 up to a5e3269Christophe Simonis
2015-03-09[FIX] web: on_change event on one2many fields was not fired if an attribute ↵Nicolas Martinelli
is mandatory (courtesy of Christophe Matthieu) opw: 626974
2015-03-09[MERGE] forward port of branch 8.0 up to 948befbChristophe Simonis
2015-03-09[MERGE] forward port of branch saas-3 up to 4a3c471Christophe Simonis
2015-03-09[MERGE] forward port of branch 7.0 up to 209ce6fChristophe Simonis
2015-03-04[FIX] web: size of text fields textarea when invisible by defaultDenis Ledoux
Text fields, or char fields having widget="text", were not sized correctly when the field was not visible by default, ans was set visible thanks to attrs and other fields values. opw-629394
2015-02-27[MERGE] forward port of branch 8.0 up to 128de18Christophe Simonis
2015-02-27[FIX] web: KanbanSelection and Priority widgetsChristophe Simonis
Use directly datarecord id instead of previously stored value which may not be up to date.
2015-02-26[MERGE] forward port of branch 8.0 up to d4f41a1Christophe Simonis
2015-02-26[FIX] web: prevent set value of priority if readonlyDenis Ledoux
The priority widget did not handle the readonly concept It was therefore possible to set the priority of an issue (for instance) even if the field was marked as readonly. opw-628960
2015-02-26[FIX] web: avoid incoherent actual_mode after refreshMartin Trigaux
When accessing an existing record in form mode directly (enter the url or refresh a page), the daterecord has not been initialized yet. This means that the value of actual_mode will be set to 'edit' before loading the current record (method _actualize_mode() called from do_show()). This was problematic for one2many fields that we loaded in edit mode, showing add/delete icons/buttons in readonly views. (opw 607910) Backport of 7ec7f1ba4088525f3ad612557757deae294fc688 for 7.0 and saas<6. (opw 627885)
2015-02-26[FIX] view_form, web_kanban: KanbanSelection widget in form and kanban: tooltipThibault Delavallée
now takes the stage custom tooltip if present, like the selection value, instead of the default one.
2015-02-24[FIX] web: many2many checkbox widget did not keep checked valuesSomesh Khare
2015-02-19[MERGE] forward port of branch 8.0 up to 9333c62Christophe Simonis
2015-02-18[FIX] web: revoke last_search when the user made his choiceDavid Monjoie
Without this, if the user creates a second line (or more) with another search query and presses tab (or clicks somewhere else) quickly, it will take the previous search result instead of the new one because the new one did not occur yet. With this fix, if the search did not have time to process, the Create a product modal appears, just like it already did for the same behavior on the first line. Fixes 620679.
2015-02-12[IMP] website: create a new web editor in the backend to edit html field ↵Christophe Matthieu
with the website builder
2015-02-11[MERGE] forward port of branch 8.0 up to 33a8989Christophe Simonis
2015-02-10[FIX] models: process onchange methods on new records in the order of the viewRaphael Collet
The onchange() on new records processes fields in non-predictable order. This is problematic when onchange methods are designed to be applied after each other. The expected order is presumed to be the one of the fields in the view. In order to implement this behavior, the JS client invokes method onchange() with the list of fields (in view order) instead of False. The server then uses that order for evaluating the onchange methods. This fixes #4897.
2015-02-09[MERGE] forward port of branch saas-3 up to a8fdc60Denis Ledoux
2015-02-09[MERGE] forward port of branch 7.0 up to 1d76586Denis Ledoux
2015-02-09[FIX] web: context lang & active* in action buttonsDenis Ledoux
This reverts rev. 9f9e7ef0e1ca1d2f5fc5e0a166499c95359dbbf3 As explained in 9f9e7ef0e1ca1d2f5fc5e0a166499c95359dbbf3, if a field "lang" is present in the view, clicking in any action item in the more menu leaded for the action title to be translated in the lang value of the form, such as in the partner form. 9f9e7ef0e1ca1d2f5fc5e0a166499c95359dbbf3 fixed the issue, but has as side-effect to not update correctly the active* keys. So, if "active_id" was used in the context of the action button, and the active_id was set in the dataset context, for example because you come from another form, trough another action button (For instance, Customers > Opportunities > Logged Calls), the active_id was not updated with the current id of the record. opw-620293 opw-617321 fixes #3462
2015-02-03[MERGE] forward port of branch 8.0 up to 4af53deChristophe Simonis
ignore .po and .pot changes
2015-01-30[FIX][IMP] web: radio button: small fix / imp, removing an unnecessaryqsm-odoo
check on the value in the code. Indeed this could prevent from putting the radio button on a selection field holding a 0 integer as selection value.
2015-01-29[MERGE] Forward-port latest saas-3 bugfixes, up to ↵Olivier Dony
c9b690f6b67cbcd382368097d206e07f080d892e
2015-01-29[MERGE] Forward-port latest 7.0 bugfixes, up to ↵Olivier Dony
4c2706d6858c4b7ec6db4b647dc2e3559f650cd8
2015-01-29[FIX] web: saveas_ajax, correct filename when data passed directlyDenis Ledoux
In cases where data is directly given to the saveas_ajax controller, the filename was not correctly set, as no read method was performed. (The read call is useless as the data is already avaiable in such a case) In such cases, the filename must be given in advance opw-626707
2015-01-27[FIX] Web: views.js and view_pivot.js: sidebarAaron Bohy
The sidebar in view pivot was not hidden when switching from view pivot to another view. Thus, the sidebar content of view pivot was still in a dropdown of the sidebar of the new view (when this new view has a sidebar as well). Also changed the way of switching between views: we now first hide the current view before creating and displaying the new one. This prevents weird rendering in the header as well. Moreover, the task of hidding/showing the view's buttons is left to the view instead of the ViewManager.
2015-01-26[FIX] web: correct append of the autocomplete widget in the viewmanagerSimon Lejeune
Adapt rev 4a3e5df93abba and rev e1cde4d038312 to the current webclient structure. Without this patch, autocomplete widget is completely broken with multiple viewmanager.
2015-01-22[FIX] web: fix various bugs in FieldCharDomainGéry Debongnie
now, the FieldCharDomain widget should * correctly display the selected records instead of the whole list * allow the removal of the current selection in edit mode (by adding a facet in the searchview) * allow the selection of a full group when the list view is grouped also, it correctly now uses the ReinitializeFieldMixin instead of reimplementing half of it in a buggy way.
2015-01-22[MERGE] forward port of branch 8.0 up to 3735394Christophe Simonis
2015-01-21[FIX] web: rounding of fieldsMartin Trigaux
round_precision expects a decimal (e.g. 0.01) while digits contains the number of digits (e.g. 2) replace by round_decimals
2015-01-21[MERGE] forward port of branch 8.0 up to 592f1cdChristophe Simonis
2015-01-21[FIX] view form: Use digits to round float values on client sideAdrien Peiffer
2015-01-21[FIX] web: properly hide list view in pop up dialogsGéry Debongnie
a many2many field can open a pop up dialog with different views, such as form view and list view. when the user click on the create button, it should hide the list view and display the form view. apparently, this behavior was hardcoded in the pop up dialog, and broken at some point between v8 and master. A proper fix would be to abstract the view manager behavior as a mixin and use it for the selectcreatepopup widget, for the one2many view manager and for the viewmanager. But this will take too much time for now, so a quick fix will do it. (however a task has been created)
2015-01-19[MERGE] forward port of branch 8.0 up to 0aab81cChristophe Simonis
2015-01-15[MERGE] forward port of branch saas-3 up to 8c150c6Denis Ledoux
2015-01-15[MERGE] forward port of branch 7.0 up to f406847Denis Ledoux
2015-01-13[FIX] web: view is not always defined when a many2one is renderedDenis Ledoux
This rev. is associated with rev. 38aa984f31f525539d27f2bf47806352705830ba closes #4660
2015-01-12[ADD][IMP] web: added toogle button for form view. Like alreadyMitesh Savani
done in list view, this is a button used for boolean fields used to switch between pending-grey-false and done-green-true. hr_holidays: use this newly-introduced button on form view. I am sure HR people will love R&D now. Courtesy of RD India: Mitesh Savani (msa@odoo.com) Reviewed by Use Merge: Thibault Delavallée (tde@odoo.com)
2015-01-09[FIX] web: avoid rendering fields on one2many list validationDenis Ledoux
This rev. reverts 91911159f5bc12046d791744ff23562378be047f The above rev. was a good idea, except that internal_set_value expects the raw value, while the records attributes can be tuples(for instance, many2one are tuple(id, name) or list of command(one2many, many2many). set_value must be use here, as all fields (js) override set_value in order to handle their value repr (for instance, many2one fields handle the tuple (id,name). Besides, avoiding the re-render provides a huge performance improvment, as rerendering fields can lead to xmlrpc calls (for instance, re-rendering a many2one field implies calling the name_get method) opw-620111 opw-622108
2015-01-08[REM] modelines: Gotta catch 'em allRichard Mathot
2015-01-07[IMP] Mass mailings send in cronJulien De Coster
1. The merge of the "email_template" module into the "mail" module. 2. The send action of the mass mailing has been moved from the frontend to a cron, because it was too slow to send over 10,000 mails (the user's browser was blocked for 15 - 20 minutes). Mass mailings have now their own process in the kanban view. 3. Mails sent from the mail form are sent immediatly instead of from the mail queue (for instance, when you go to sales > customers > list view > select 2 -3 customers > More > Partner Mass Mailing). 4. Users have now the choice from which mailing list they want to unsubscribe when they click on the unsubscribe link at the bottom of the mail. 5. Mass mailings inherit from their campaign UTMs and mass mailing campaigns are linked to an UTM campaign. 6. Many little improvements
2015-01-06[MERGE] forward port of branch saas-3 up to 879fca0Denis Ledoux
2015-01-06[MERGE] forward port of branch 7.0 up to 9191115Denis Ledoux
2015-01-06[FIX] web: editable list, no re-rendering on field validationDenis Ledoux
When adding several lines in an editable list (adding 7 lines to an invoice for instance), then clicking on the first row direcly after having filled the last line, the value of the cell sometimes had the value of the last line. Just a display bug, but still. Using internal_set_value avoid the re-rendering of the cell, and solve the above issue opw-620111
2015-01-06[MERGE] forward port of branch 8.0 up to ea54d4aChristophe Simonis