Commit Graph
8446 Commits
Author SHA1 Message Date
Adrien Dieudonne a9b0561106 [FIX] *: use new JS module to read from/write in localStorage
to prevent errors when the localStorage capacity is 0, which is the case e.g.
on private browsing with Safari.
2016-06-16 13:48:18 +02:00
Adrien Dieudonne 8580636bad [ADD] web: js module to communicate with localStorage
Private browsing in Safari doesn't allow to store anything in the localStorage,
and it throws an error when you try to do so. This new JS module is a connector
to the browser's localStorage if it is enabled, and if not, it simply keeps its
own storage in RAM.
2016-06-16 13:48:18 +02:00
Aaron Bohy 6c9567ae3c [IMP] base,web: ir_action: target main to clear breadcrumbs
New value for the selection field 'target' of ir_actions_act_window which
forces the breadcrumbs to be cleared before executing the action.
2016-06-16 13:48:18 +02:00
Aaron Bohy 2e29f388c5 [FIX] calendar,pos,web: show_application should return a deferred
Also remove unused options dict from WebClient (especially action_post_login)
2016-06-16 13:48:18 +02:00
Aaron Bohy d632679a72 [FIX] web: allow overriding webclient rendering context 2016-06-16 13:48:18 +02:00
Christophe Simonis 9fe4cf5f72 [MERGE] forward port of branch saas-11 up to dda0d3d
# Conflicts:
#	addons/product_uos/i18n/lo.po
#	addons/sales_team/models/__init__.py
#	addons/website_payment/views/website_payment_templates.xml
#	addons/website_portal_sale/views/templates.xml
#	openerp/addons/base/ir/ir_qweb.py
2016-06-15 13:10:45 +02:00
Christophe Simonis dda0d3d62d [MERGE] forward port of branch saas-10 up to baf494c
# Conflicts:
#	addons/hr_timesheet/project_timesheet.py
#	addons/sale_layout/i18n/es_PE.po
#	addons/sale_layout/i18n/hu.po
#	addons/sale_layout/i18n/lo.po
#	addons/sale_layout/i18n/pl.po
#	addons/sale_service/i18n/es_MX.po
#	addons/sale_service/i18n/es_PE.po
#	addons/sale_service/i18n/lo.po
#	addons/stock/stock.py
#	addons/stock/stock_view.xml
#	addons/warning/i18n/es_PE.po
#	addons/warning/i18n/lo.po
#	addons/warning/i18n/ru.po
#	addons/web/i18n/cs.po
#	addons/web/i18n/ja.po
#	addons/web/i18n/lo.po
#	addons/web/i18n/th.po
2016-06-15 12:59:39 +02:00
Christophe Simonis baf494c67b [MERGE] forward port of branch saas-9 up to 1d81bb0
# Conflicts:
#	addons/account_extra_reports/i18n/ca.po
#	addons/account_extra_reports/i18n/fi.po
#	addons/account_extra_reports/i18n/pl.po
#	addons/account_extra_reports/i18n/te.po
#	addons/account_extra_reports/i18n/zh_CN.po
#	addons/account_full_reconcile/i18n/hu.po
#	addons/account_full_reconcile/i18n/pl.po
#	addons/crm/crm_lead_menu.xml
#	addons/crm_claim/i18n/es_PE.po
#	addons/crm_claim/i18n/hu.po
#	addons/crm_claim/i18n/ja.po
#	addons/crm_claim/i18n/pl.po
#	addons/delivery/views/delivery_view.xml
#	addons/product/product_view.xml
#	addons/project_timesheet/i18n/es_PE.po
#	addons/stock/stock_view.xml
2016-06-15 12:40:59 +02:00
Christophe Simonis f9072c789d [MERGE] forward port of branch 9.0 up to bfbe2d6
# Conflicts:
#	addons/marketing/i18n/es_PE.po
#	addons/marketing/i18n/hu.po
2016-06-14 19:27:16 +02:00
Foram Shah 052dcd3ee8 [IMP] web: 'Not Archived' becomes 'Active', 'Not published' becomes 'Unpublished'
Another reason why it’s better to change ‘not archived’ into ‘active’ is
because ‘active’ is the functional name of this field in the filter list in list view.

For the rest, it’s just a better en_US way of saying it.
2016-06-14 16:23:50 +02:00
Martin Trigaux 0ec664d1a7 [FIX] web: close popup after backup
All actions of the database manager redirect the user after an action except the
backup option which returns an octet stream.
Close the modal after form submission to mimic the same behaviour.

Do not close the modal for other actions than database manager to avoid waiting
time for create that may be long to process.

Add message to warn the user about backup waiting time after cliking on submit
to be less confusing for big databases that may take a lot of time to be ready.

Fixes #10803
2016-06-14 13:42:14 +02:00
Nicolas Martinelli e0c4ec54ca [FIX] web: new record on editable list
On an editable list view, an issue occurs with the following procedure:
- Click "Add an item", write something
- Press "Enter" key --> a new item is added, write something
- Click outside of the list, then click on the last item created
- Press "Enter" key --> the cursor is set at the beginning of the list

This is an issue for two reasons. First, the behavior is not the same if
we have clicked outside of the list before pressing "Enter", which is
not logical. Then, in some undetermined cases, the focus can be lost
then retrieved on the last record. It means that suddenly, the cursor
goes back at the beginning of the list without notice.

The latter issue is problematic when batch-encoding data, for example
encoding the lot numbers of incoming products thanks to a scanner.

opw-680758
2016-06-14 12:39:11 +02:00
Christophe Matthieu 710a7cee14 [FIX] website: t-att-*** display empty string attribute
Remove attribute only if the result is False or None
2016-06-14 09:46:26 +02:00
Christophe Matthieu 956bb2b6e9 [IMP] base ir.qweb: add and update tests for the new ir.qweb 2016-06-14 09:46:25 +02:00
Christophe Matthieu 7ede9bcb2d [IMP] base ir.qweb: compile template (and use ast) to improve rendering speed
* The compiled templates are cached per user, lang, inherit context values
* ir.ui.fields: attributes method return an dict, and record_to_html return only the content value of the field
* all rendered text use build_text and all attributes use build_attribute
* t-esc-options is removed and replace by format_value method
* AssetsBundle receive the list files and remains
2016-06-14 09:46:25 +02:00
Jainik Patel eda051f43d [REM] web: Remove GTK icons and replace them by Font-awesome 2016-06-13 12:04:17 +02:00
Géry Debongnie dcc13079b7 [FIX] web: action manager and modals should interact correctly
Before this commit, the action manager could in some case have a
reference of a modal dialog, even after it has been destroyed (for
example, when the "X" button has been clicked to close a modal).

Unfortunately, it has some unexpected consequences, for example, the
do_push_state method check the existence of self.dialog to update the
url.
2016-06-13 10:43:37 +02:00
Odoo Translation Bot 596398a759 [I18N] Update translation terms from Transifex 2016-06-12 00:39:18 +02:00
Christophe Simonis 7306e888a6 [MERGE] forward port of branch saas-11 up to ac50230 2016-06-08 12:28:16 +02:00
Christophe Simonis ac5023060c [MERGE] forward port of branch saas-10 up to 2f948c7 2016-06-08 12:19:23 +02:00
Christophe Simonis 2f948c76aa [MERGE] forward port of branch saas-9 up to 3ed483c 2016-06-07 19:45:02 +02:00
Christophe Simonis 3ed483caa1 [MERGE] forward port of branch 9.0 up to fa4a371 2016-06-07 19:21:18 +02:00
Nicolas Martinelli 83e7f2749c [FIX] web: set title on Many2Many tags
When the content of a Many2Many tag is too large, it is truncated. This
is an issue since there is no easy way to see it.

The fix adds a title on the tag with the content.

X-port of commit odoo/enterprise@bd3bfe0422
2016-06-07 17:03:40 +02:00
Denis Ledoux 4601b044a6 [FIX] web: prevent search dropdowns to close on click inside
In the Filters, Group By and Favorites dropdowns,
when clicking outside the `li` elements but still
inside the dropdown menu itself
(like on the dividers,
or next to the advanced search `Apply` button),
the dropdowns was closed.

This behavior was annoying when doing an advanced search
with a field using the datetime picker, as, to close the datetime
picker, you have to click outside it, and when you did, it closed
automatically the filter dropdown... So you had to open it again to
finally apply the filter.

opw-674310
2016-06-07 16:48:58 +02:00
Christophe Simonis 7889d7e0ff [FIX] web,auth_signup: prevent login autocapitalization
Mobile virtual keyboards will often capitalize the first letter of
an input text field, which is annoying as odoo logins are case-sensitive.
This will no longer happen thanks to this new attribute.

X-port of commit odoo/enterprise@b8632f8bb6
2016-06-07 16:15:47 +02:00
Odoo Translation Bot d1fa3350bb [I18N] Update translation terms from Transifex 2016-06-05 00:30:55 +02:00
Denis Ledoux f2e9d412d1 [FIX] web: allow cross origin on /web/webclient/qweb
This revision is similar to edc4b0b9bb

Since revision 7f8fe10766
the route `/web/webclient/qweb` must allow cross origin
so this route can be called from HTTP pages

e.g. To allow a HTTP loaded point of sale to call this route in
HTTPS

opw-679288
2016-06-03 13:26:52 +02:00
Christophe Simonis e54fb3eb22 [MERGE] forward port of branch saas-9 up to 30864b6 2016-06-03 12:33:58 +02:00
Aaron Bohy 17461a57a0 [FIX] web: data_manager: load_action: return deep copy of action
The action object, and in particular its context, is modified by the Action
Manager and by some views (e.g. sales_team_dashboard Kanban). So, as the action
is stored in cache, the same object was returned each time the action was
requested, and previous modifications of its context still applied.

This produced a bug with the sales_team_dashboard when following those steps:
  - click on the link to today's activities, it opens an action with
    'search_default_today' in the context,
  - come back to the dashboard
  - click on the link to this week's activities, it opens an action with
    'search_default_this_week' in the context, but the formerly added key
    'search_default_today' is still there as well, so the domain is wrong.
2016-06-03 11:25:57 +02:00
Yannick Tivisse ed12bfd775 [IMP] web: Navigation improvement in editable list view (v2)
1/ On create new record focus field should select already existing value of field,
   So user doesn't have to remove  the old value first and then enter new value.

2/ Forget about it
2016-06-03 10:49:24 +02:00
Géry Debongnie 0ce2583157 [REVERT] revert web: Navigation improvement in editable list view"
This reverts commit c43a97f353.

If you use a setTimeout in your js code, you might want to have a
serious look at what you are doing.  You are almost certainly doing it
wrong.

If you chain a deferred with the number returned from a setTimeout, you
definitely don't know what you are doing.

If you try to fix editable list view by magically adding timeout,
potentially inversing the order of execution, and without understanding
how deferred works, it is clear that you are just changing stuff until
your particular bug disappear in your particular case, and that you have
no idea what other bugs you just introduced.

Please study how deferred works, how the basic JS methods works, learn
what setTimeout returns.  Also, you might want to have a basic
understanding of how and when expressions are evaluated.  For example,
if you cannot explain why a if statement cannot be replaced by a
function, you might want to stop what you are doing and educate yourself.
2016-06-03 10:24:38 +02:00
Ravi Gadhia c43a97f353 [IMP] web: Navigation improvement in editable list view
1/ On create new record focus field should select already existing value of field,
   So user doesn't have to remove  the old value first and then enter new value.

2/ Avoid the double empty line creation when pressing enter
step to produce
1 Menu Point of Sale > Configuration > Point of Sale switch to form view
2 Tick the box "Cash Control" , the one2many field will be visible
3 Press the "Tab" from keybord , control jumps to "Add an item" button
4 Press "Enter" from keyboad
5 You will see one extra line will be added..
2016-06-02 16:25:48 +02:00
Christophe Simonis a36f6dbc29 [MERGE] forward port of branch 9.0 up to 928bc26 2016-06-02 15:12:47 +02:00
Géry Debongnie 9be5531f3e [FIX] web: fix actions in sidebar on second reload
When the user visited a view for the second time, the extra actions in the sidebar
were broken.  The reason is that the sidebar code modified in place the
fields_view information.

Note: This was not a problem before, because the field_view_get call was done each
time the view was loaded, but now it is cached.
2016-06-02 14:28:21 +02:00
Christophe Simonis 928bc262a6 [MERGE] forward port of branch saas-6 up to 589751c 2016-06-02 14:26:19 +02:00
Christophe Simonis 589751ca28 [MERGE] forward port of branch 8.0 up to bde083a 2016-06-02 12:58:48 +02:00
Adrien Dieudonne 6739e10b50 [ADD] web: add 'is between' operation for dates in search filters
- Add two datepickers to specify a range of date/datetime
2016-05-31 08:42:24 +02:00
qsm-odoo 969bc66e7a [FIX] web: enterprise navbar toggle button -> a
This commit is a fix of the forward-port of an enterprise commit.
https://github.com/odoo/enterprise/commit/b0f309bc4ea79ff3ae2fe7d890dd60b0b414bd05
2016-05-30 14:59:06 +02:00
Géry Debongnie 2172a6e81c [FIX] web: incorrect reference to openerp
I assume the problem was introduced by a forward port. But whatever the case, we
should not ever use the variable 'openerp' in jsland.
2016-05-30 11:43:06 +02:00
Géry Debongnie f3fb0bfe29 [IMP] web_analytics: remove rpc to version_info
and put it serverside, in the session info.  This saves 1 rpc for every
connections.
2016-05-30 11:43:06 +02:00
Géry Debongnie 58245d4dca [IMP] web: remove useless rpc by user_menu
The UserMenu widget needs the user name, but it is available in the
session informations.
2016-05-30 09:23:08 +02:00
Géry Debongnie 8ccff7dba8 [IMP] web: remove rpc call to get module list
It is already in the web client page source (or more precisely, in the
assets_backent bundle)
2016-05-30 09:23:08 +02:00
Géry Debongnie fdb250942f [IMP] web: move currency rpc to session_info 2016-05-30 09:23:08 +02:00
Géry Debongnie 9c68bc7482 [REF] point_of_sale,web(site): move session info into page source
This commit introduces a mechanism to add information into the session
from a different module, without having to fetch it manually with a rpc.
This is intended to be used with small pieces of info required at the
start of the web client, such as currency informations.

To add information to the session, one can simply inherit from ir.http
and modify the session_info method.
2016-05-30 09:23:07 +02:00
Géry Debongnie 2a8a17024d [IMP] web: start session service as soon as possible 2016-05-30 09:22:38 +02:00
Odoo Translation Bot cb70a8ff98 [I18N] Update translation terms from Transifex 2016-05-29 02:58:42 +02:00
Odoo Translation Bot be91fa4c63 [I18N] Update translation terms from Transifex 2016-05-29 00:29:48 +02:00
Géry Debongnie 4828a00f9e [REF] web: move dom_utils to its own file 2016-05-27 16:08:50 +02:00
Géry Debongnie b107b14e6b [REF] report,web(_editor): services extracted in their own files
session_instance.js moved from framework/ to services/ and renamed into
session.js, which required to change the bundles in report and web_editor
addons.
2016-05-27 16:08:41 +02:00
Nicolas Martinelli 82b9d7d511 [FIX] web: minimum margin
Make sure to define a minimum margin large enough.

opw-678645
2016-05-27 12:29:29 +02:00