Commit Graph
3923 Commits
Author SHA1 Message Date
Yannick Tivisse 3055b00c44 [IMP] base: Introduce generic methods get_default_field and set_fields
Method `get_default_fields`
===========================

Currently all the methods beginning by `get_default` are used to fetch their default values, usually by looking in the ir.config_parameter table.

As several methods `get_default_fields` have been defined in res_config classes, it better to define it in base and calling to super to avoid side effects like the following example
- 2 classes that override the same class and define the same method. In that case one method will never be called, as it is ovewritten by the other.

Method `set_fields`
===================

Currently all the methods beginning by `set_` are used to set their values, usually in the ir.config_parameter table.

As several methods `set_fields` have been defined in res_config classes, it better to define it in base and calling to super to avoid side effects like the following example
- 2 classes that override the same class and define the same method. In that case one method will never be called, as it is ovewritten by the other.

Methods `get_default_foo` and `set_foo`
=======================================

This commit deprecates the method starting with `get_default_` or `set_` in the res.config models. A warning is raised in that case.
2017-06-19 17:37:38 +02:00
Yannick Tivisse a38a3e93c2 [MOV] *: Reorganize configuration files according to guidelines 2017-06-19 17:37:38 +02:00
Hiral Bhavsar 100ab909e6 [IMP] website: Restructure the 'Google Analytics' wizard.
* Set the blocking warning if the user enters a 'Client ID' without
   any 'Tracking ID'.
 * 'Google Analytics in Dashboard' field is visible only if
   'Google Analytics' is checked in website settings.
 * Get/Set the value of 'google_analytics_key' and
   'google_management_client_id' from 'website' model instead of
   'ir.config_parameter' on 'Google Analytics' wizard.
 * If ID is set on 'Google Analytics' wizard then activated the related
 features and populate fields in website settings.
2017-06-19 17:37:38 +02:00
Thibault Delavallée e331c0bd19 [IMP] website: improve setting ga_client_id from dashboard
It now update the website settings parameter use_google_analytics_dashboard
so that the settings are correctly updated with the user choice.

Implementation is changed so that the dashboard uses a jsonRpc call instead
of directly calling ir_config_parameter set_param.
2017-06-19 17:37:38 +02:00
Thibault Delavallée ac23ca499e [REF] website: use config parameter instead of ir values in settings
Fields like `default_foo` still used ir.values although those are system-wide
parameters and should therefore be stored in ir.config_parameter
table.

When no default_model is set on a field, don't prefix it by `default_`.
2017-06-19 17:37:38 +02:00
Thibault Delavallée a3301757f0 [FIX] website: dashboard should correctly check user groups
Probably to backport.
2017-06-19 17:37:38 +02:00
qsm-odoo 0bd189d280 [FIX] website(_*): properly style primary buttons
* portal, sale

Some primary buttons had both the 'btn-primary' and 'btn-default'
classes, which is wrong. In standard bootstrap, the 'btn-default'
class seems to be masked by the use of 'btn-primary' but it is not
the case in some of our themes.
2017-06-19 16:10:30 +02:00
Christophe Simonis ed2ddeccdf [MERGE] forward port branch saas-16 up to 1b50c829ef 2017-06-15 18:46:47 +02:00
Christophe Simonis 1b50c829ef [MERGE] forward port branch saas-15 up to 9713dc2e1f 2017-06-15 18:44:16 +02:00
Christophe Simonis 9713dc2e1f [MERGE] forward port branch saas-14 up to 96595772e0 2017-06-15 18:39:59 +02:00
Christophe Simonis 96595772e0 [MERGE] forward port branch 10.0 up to dc8b473a03 2017-06-15 18:35:46 +02:00
Nicolas Lempereur b79b27c2b2 [FIX] website: browser lang > default lang revert 174d7e8
This reverts commit 174d7e8e49.

The default language is the language if no lang corresponding to
the current language is found. Thus the browser language if available in
languages has priority over the default language.

opw-746776
closes #17637
2017-06-15 13:39:05 +02:00
Deep Patel ef9fcdeaea [FIX] web_editor: make sure gallery images are editable
When added for the first time, they were not editable until the page
was saved.
2017-06-14 17:49:56 +02:00
dbh 2fe1b0c0a6 [IMP] website, web_editor: reorganize background snippet option 2017-06-14 17:49:56 +02:00
dbh e011d58bee [IMP] website, web_editor: improve the gallery snippet
- Change the info message "Add Images from Customize menu" to
  "Add Images" and make it clickable

- Reorganize snippet options menu

- Improve the image dialog to be able to select/unselect

- Make sure previews are adapted when changing gallery images
2017-06-14 17:49:56 +02:00
dbh c083133255 [IMP] website: reorganize the customize menu
- Change the submenus order
- rename "Install Apps" to "Add Feature" and redirect to the website settings
2017-06-14 17:49:56 +02:00
qsm-odoo f8285ef439 [IMP] website: add a way for css to detect if flex can be used
Website content is not supposed to use flex as it is not supported by
some old browsers. This commit provides a way to use flex only for
browsers which support it. When designing a snippet, you can use flex
to design elements and then write other style for when flex is not
supported.

Using flex should however still be avoided when possible. But hopefully,
this commit will allow to build greater snippets whose ugly non-flex
style can be disabled on demand or dropped in a future odoo version.
2017-06-12 14:04:56 +02:00
Xavier Morel a5283f90ce [FIX] P3: QueryURL relying on kw iteration order 2017-06-12 11:04:23 +02:00
Odoo Translation Bot 264c2c64f2 [I18N] Update translation terms from Transifex 2017-06-11 07:07:07 +02:00
Christophe Simonis ab02bf34b0 [MERGE] forward port branch saas-16 up to cc38b93ab2 2017-06-09 17:11:47 +02:00
Christophe Simonis cc38b93ab2 [MERGE] forward port branch saas-15 up to 49f819a7a7 2017-06-09 16:43:27 +02:00
Christophe Simonis 49f819a7a7 [MERGE] forward port branch saas-14 up to b6c7d71899 2017-06-09 16:21:15 +02:00
Christophe Simonis b6c7d71899 [MERGE] forward port branch 10.0 up to cd1a8f6252 2017-06-09 13:28:06 +02:00
qsm-odoo 78fee1c634 [FIX] website: restore some website rpc since new views
The website is not ready. It is still too young to understand what the
beautiful `_rpc` function can bring to its life. Someday it will, but
for now, it can at least rely on the `rpc.query` function or to the
'Ace' menu which now understands the beauty of `_rpc`.

---

-> Replace website `_rpc` calls with deprecated `rpc.query` as the
   website is not structured enough yet to handle 'trigger_up' events.

-> As the `_rpc` calls cannot be replaced for the ace editor because it
   is also used and tested in the backend, promote the 'Ace' menu (which
   instantiate the ace editor) to be a `ServiceProvider` so that the
   `_rpc` method works in this particular case.
2017-06-08 14:30:50 +02:00
Denis Ledoux b4863378ef [FIX] website, website_sale: product website price and pricelist without request
Attempting to read the field `website_price` directly
with the XMLRPC API failed because, in such a case,
the request is unbound, and attempting to read
anything from it (`request.session` whatever)
resulted to the raise of an exception.

e.g.
This prevented to perform a `search_read`
with all fields on the `product.product` model

Closes #14939
opw-745733
2017-06-08 10:29:16 +02:00
Christophe Simonis 99c34c4119 [MERGE] forward port branch saas-16 up to 6f3eada2c3 2017-06-06 19:38:29 +02:00
Christophe Simonis 6f3eada2c3 [MERGE] forward port branch saas-15 up to f687a27b79 2017-06-06 19:23:03 +02:00
Christophe Simonis f687a27b79 [MERGE] forward port branch saas-14 up to c0e7f9b0b1 2017-06-06 18:57:56 +02:00
stefanorigano 3ac160aa09 [IMP] website: company logo sizing
Rather than use a fixed height, make the logo fill the navbar height.
2017-06-06 17:37:33 +02:00
Odoo Translation Bot 9ca236685d [I18N] Update translation terms from Transifex 2017-06-04 07:07:18 +02:00
Olivier Dony de38d0262b [MERGE] Forward-port 10.0 up to 76cd8d2558 2017-06-03 01:24:21 +02:00
Dharmraj Jhala c11723d4ef [IMP] website: hide homepage editor tooltip in mobile
As edition is not allowed in mobile mode, only show "Welcome to your
homepage" instead of indicating what to do to edit the page.
2017-06-02 10:26:39 +02:00
Dharmraj Jhala 288a471a26 [IMP] website: improve snippets' design
- Feature grid snippet: enable copy and move of inner containers

- Accordion snippet:
    - add the ability to change box headers & background colors
    - improve the text contents

- Comparison snippet:
    - add ability to change header colors
    - prevent unwanted text color changes
2017-06-02 10:26:38 +02:00
Dharmraj Jhala a33ec972ab [FIX] web_editor, website: allow to detect indirect clones
When cloning a snippet section thanks to the editor, the associated
snippet options' `on_clone` methods are called. Now these methods
receive a new argument `options`. The option this commit introduces
is the `isCurrent` one. It allows the method to know if the snippet
section it is associated to is the one that was cloned or if it is a
child of the one that was cloned.

This is useful to solve a known bug when cloning elements which have
bootstrap columns:

- When one column is cloned we want it to lose its col-*-offset-*
  classes so that the offset is not duplicated (only the column).

- When a container with column children is cloned we do not want
  these column' offsets to be removed (we want the whole cloned
  container to be the same).
2017-06-02 10:26:24 +02:00
Dharmraj Jhala 29ac4004cf [IMP] website: allow to detect the active menu on a slugified URL
Some default website menu were not marked as active when landing on
their associated page, e.g. clicking on "Blog" loads the blog page
but the "Blog" menu is not marked as active.

This was because of slugified URL. Indeed, for the "Blog" menu for
example, the URL "/blog/1" redirects to the "/blog/my-super-blog-1"
URL.
2017-06-01 17:29:29 +02:00
Dharmraj Jhala 0485af3786 [IMP] website: properly preserve "style" when changing gallery snippet "mode" 2017-06-01 17:28:26 +02:00
Sagar Ahirrao 5d15bd76c6 [IMP] website: add "Company Team" snippet
Introduce a new snippet to show the company team.

This commit also introduces a new classe "s_no_resize_cols" to put
on a .row element to prevent the size and margins options to be used
on the .col-* children. This allows to build some complex layout without
having a deep hierarchy of snippet options.
2017-06-01 17:22:45 +02:00
Csaba Fazekas d18346a103 [IMP] website: fix gallery snippet paddings 2017-06-01 17:21:45 +02:00
Dharmraj Jhala 22745668cf [FIX] website: properly update parralax image
Fixed some issues with parralax image updates:

- Background updated without clicking
- Default wallpaper not coming back
- Background disappearring sometimes
2017-06-01 17:09:54 +02:00
Dharmraj Jhala dbdbfa7432 [FIX] website: properly rebind background events
In carousel snippet, the target element for background snippet option is
being changed manually. So for the new target, we have to rebind the
associated events that were bound in `start` function of the snippet
option. For that, some code is extracted from the `start` function and
is used to rebind necessary events for new targets.

In particular, this was preventing the carousel slides' backgrounds to
be automatically removed when a background-color was selected.
2017-06-01 17:08:49 +02:00
Olivier Dony 5d2869cbc8 [MERGE] Forward-port saas-16 up to ba15df47cb 2017-06-01 01:46:13 +02:00
Olivier Dony ba15df47cb [MERGE] Forward-port saas-15 up to 17b847c0f6 2017-06-01 01:10:29 +02:00
Olivier Dony 5dd2cc8e63 [MERGE] Forward-port saas-14 up to b9e2207267 2017-06-01 00:37:30 +02:00
Olivier Dony b9e2207267 [MERGE] Forward-port 10.0 up to 7e44444878 2017-06-01 00:15:27 +02:00
Darshan Kalola 07e1bf7850 [FIX] website: fix error while opening SEO wizard
Before this commit, error was giving on browser console when we open seo wizard which is due to the wrong (this) was passed when initializing Configurator
So in this commit, we passed correct this, to get rid of the error.

(PR #17260)
2017-05-31 09:42:00 +02:00
Cocographique 3dcc54ccf4 [FIX] website: Front-end apps dropdown doesn’t appear on mobile
This commit closes #15551
2017-05-30 18:28:22 +02:00
Odoo Translation Bot 20c724479f [I18N] Update translation terms from Transifex 2017-05-28 07:06:53 +02:00
Xavier Morel 6c49715c56 [FIX] P3: leftover exception.message in template 2017-05-26 15:49:12 +02:00
Yannick Tivisse 7e008469e4 [IMP] base: Always load menuitem xmlids on templates
PURPOSE
=======

Currently we can choose to load the xmlid of a menuitem if web_tour is installed by setting the attribute `load_xmlid=True` on the view.

This is strange for 2 reasons:
- Searching all the ir.model.data on menuitems with load_xmlid=True to compute its xmlid, searching the related subtree on the returned structure of the method load_menus is quite complicated for the perfomance gain (if there is any perfomance gain to do it)
- This is not working in community in frontend, as only the root menuitems are loaded, thus it is the `load_menus_root` instead of the `load_menus` that is called. This issue prevent a tour step to be displayed correctly on community and enterprise on a menuitem.

SPECIFICATION
=============

Remove all the `load_xmlid` attributes and the related mechanism and move it into base to always load the xmlids for all the menuitems. It won't bee to heavy as the result is cached.

It's better the keep the current mechanism (Load the xmlids from ir.model.data and insert them into the tree) as we only make 1 search to the ir.model.data
2017-05-26 13:13:12 +02:00
Siddharth Gajjar 6110eb969d [IMP] website_sale: update create product tour
Purpose
=======

People who want to start an ecommerce expect to directly deal with products.
for now they are suggested to design a homepage first.

-> specific onboarding for ecommerce in order to start from shop page

Specs
=====

new tour for website_sale (start in /shop page):
Let's create your first product. https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrT3VOZDk1V3Z0d0k/view?usp=drivesdk
same steps than now to create the first product
once product save, take to the backend:
https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrMjI4TlRZdDBLWVk/view?usp=drivesdk
https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrckNLZWthekFRSXM/view?usp=drivesdk

remove the 2 tips in pictures modal (because people don't follow them)  https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrOEQxUlJDZk1vd3M/view?usp=drivesdk
suggest instead to upload a picture
2017-05-26 13:13:12 +02:00