Commit Graph
46 Commits
Author SHA1 Message Date
Christophe Simonis f3fa5a5ef7 [MERGE] forward port branch saas-11.3 up to 1e0a92c996 2018-09-13 19:30:33 +02:00
Christophe Simonis 826cd9b3d3 [MERGE] forward port branch 11.0 up to c3ea0a7811 2018-09-10 19:21:57 +02:00
Lucas Perais (lpe) 8fca115b04 [FIX] web_settings_dashboard: give context to search_read planners
Before this commit, the planner section of the settings weren't translated.
This was because the context was not sent along with the search_read that fetches planners data

After this commit, the planner section is correctly translated

OPW 1881092
closes #26766
2018-09-10 12:04:13 +02:00
Thibault Delavallée 6502c98b99 [FIX] web_settings_dashboard: lessen constraint on email when inviting
Even completely valid simple email like alfred+toto@example.com was not
considered as valid. As email may contain a lot of characters and strange
stuff let us be less strict on validation.

This commit is related to task ID 1839609. Closes #24576.
2018-05-28 13:29:48 +02:00
dip-odoo 362613a2fa [IMP] auth_signup: change email invitation condition
Currently if a user has already been invited you cannot invite him again
via the web_settings_dashboard as it automatically tries to create a new
user.
This commit changes that behaviour in case you have the mail app
installed odoo will now send an invitation email to the invited user as
long as this user has never connected.

1) Mail app not installed:
   - if user is active     > display error (this email is already in use)
   - if user not active    > activate the user
   - if user doesn't exist > create new user

2) Mail app installed:
   - if user is active && state confirmed > display popup (this email is
   already in use)
   - if user is active && never connected > resend invitation mail
   - if user is inactive > activate the user
   - if user doesn't exist > create new user and send invitation mail

This commit is related to task #54023
Closes #23081
2018-05-04 18:07:31 +02:00
Christophe Matthieu 07cd24b1ec [IMP] web: convert notification popup in service and add buttons params
this.call('web.Notification', 'notify', params)

Display a notification at the appropriate location, and returns the
reference id to the same widget. Note that this method does not wait
for the appendTo method to complete.

@param {Object} params
@param {string} params.title notification title
@param {string} params.message notification main message
@param {string} params.type 'notification' or 'warning'
@param {boolean} [params.sticky=false] if true, the notification will stay
  visible until the user clicks on it.
@param {string} [params.className] className to add on the dom
@param {function} [params.onClose] callback when the user click on the x
  or when the notification is auto close (no sticky)
@param {Array<Object>} params.buttons
@param {function} params.buttons[0].click callback on click
@param {Boolean} [params.buttons[0].primary] display the button as primary
@param {string} [params.buttons[0].text] button label
@param {string} [params.buttons[0].icon] font-awsome className or image src
@returns {Number} notification id

this.call('web.Notification', 'close', notificationId)
2018-04-19 17:17:54 +02:00
qsm-odoo 6e4db7d13a [REF] *: review scss variables handling
Unlike LESS, SCSS variables are not lazy loaded. Our system has thus
to be updated. This commit creates new templates which are t-called
in assets bundles (to replace the old less_helpers template):

- web._assets_utils: regroups the mixins and functions which *can*
  (and so should) be available in every asset bundle

- web._assets_primary_variables: regroups the variables (or mixins
  used as variables) which *can* (and so should) be available in
  every asset bundle

- web._assets_secondary_variables: same as above but provides an
  environnement where all the 'primary' ones are accessible. This is
  for example useful to handle the community/enterprise split:

  // Community primary variables
  $o-pink-color: pink; // enterprise color
  $o-brand-primary: blue;

  // Enterprise primary variables
  $o-brand-primary: $o-pink-color;

  // Community secondary variables
  $o-my-darker-primary: darken($o-brand-primary, 5%);

  => If there was only one variable template, enterprise edition would
     have been able to define its primary color at the end but the
     darker primary would not have been updated. Using the "!default"
     system and putting enterprise definition above would not have
     solved the problem as the $o-pink-color would not have been
     accessible.

- web._assets_backend_helpers: regroups the variables, mixins and
  functions which *can* (and so should) be available in the backend
  asset bundle only. This is especially (only?) useful for bootstrap
  variables overriddes.

- web._assets_frontend_helpers: regroups the variables, mixins and
  functions which *can* (and so should) be available in the frontend
  asset bundle only. This is especially (only?) useful for bootstrap
  variables overriddes.

Note: bootstrap variables are not accessible in any of those anymore.
If you have variables that should depend on bootstrap, you have 3
solutions:

- Find another way: your variable is probably useless, use bootstrap
  variables directly or create a variable that will influence the
  value of bootstrap variables. E.g. instead of declaring:
  `$myvar: $bootstrapvar * 3`
  and using $myvar alone, declare:
  `$myvar: 3` and use `$myvar * $bootstrapvar` where needed.

- Declare a copy of the bootstrap variable and use that one. In that
  case, you should also force-set the real bootstrap one to be sure
  they match (this should be done in appropriate templates mentioned
  above). E.g.
  ```
  $o-boostrapvar: 5;
  ...
  $boostrapvar: $o-bootstrapvar;
  ```

- Set your variable to null and set it to your bootstrap expression
  in the file you will need it (where bootstrap variables are accessible)
  without forgetting to add the !default flag to allow overriddes.
  ```
  $myvar: null;
  ...
  $myvar: $bootstrapvar * 5 !default;
  ```

This commit also partly changes the variable names to follow the
convention:
$o-<app_id>-<name> where 'app_id' is the current's app name or a
meaningful unique identifier ("theme" for all themes for example, as
no multiple themes can be installed).
2018-04-18 15:59:19 +02:00
qsm-odoo 97aa0a8dec [REF] *: convert less content to scss content
Convert content so that the assets compile on app installation. The
style is still broken after this as the variables/mixins/... are not
defined in the right order (as it did not matter in LESS but does in
SCSS).

This commit basically changes:
- Variables: @​var_hello -> $var-hello
- Mixins: .mixin_world() {} -> @​mixin mixin-world {}
- Classes used as mixin: .my_class() -> @​extend .my_class
    - Here there were no other solution than to convert the use of
      a mixin call by the use of an extend as a first approximation
- LESS functions -> SCSS functions (e.g. fade -> rgba)
- Move first variable definition before the variable is used
    - Still need to make sure last variable definition is at the
      right place
2018-04-18 15:59:16 +02:00
qsm-odoo b04dec4025 [REF] *: rename all LESS files to SCSS
This is a simple renaming without adaptation.
2018-04-18 15:59:15 +02:00
Jigar PatelandAaron Bohy 89050f61b7 [IMP] web_settings_dashboard,*: improve UX
*crm,project: css selector adapted in tours

This rev. improves the UX of the 'Invite users' and 'Pending
invitations' part of the Settings dashboard.

Task 32804
Closes #19531

Co-authored-by: Aaron Bohy <aab@odoo.com>
2018-03-15 08:32:43 +01:00
Christophe Simonis 0f57bdba72 [MERGE] forward port branch saas-11.2 up to 42659dc70c 2018-03-09 16:25:58 +01:00
Géry Debongnie b17ba359db [REF] web,*: introduce the concept of AbstractAction
Before this commit, a client action was simply a subclass of Widget.
This is quite simple, but not really enough for the ActionManager. The
ActionManager needs to handle client actions in a different way that
view actions. Sometimes, it needs to check if a method exists before
calling it.

With this commit, we introduce a new abstraction: the AbstractAction
class, which defines a common API for all actions managed by the web
client.

Note that the API proposed in this commit is just the beginning. We will
introduce other methods in the future, to manage the focus, or the
scroll position, for example.
2018-03-08 16:48:54 +01:00
Nikunj Ladava a44fd6f2df [FIX] web_settings_dashboard: no redirect on social button click
Before this commit, when we click on social tags in the Settings,
it opens a pop-up while redirecting to the home page in the main window.
The redirection is not intended.

This is caused by href="#", which purpose is to show the pointer cursor when
hovering on the links. The issue is that href="#" redirects to the index page
on click, which is the home page.

This commit keeps the href while cancelling the redirection on click in the
main window.
2018-03-07 09:35:15 +01:00
Yannick Tivisse 7ed9a7fabe [REM] web_planner: Remove the module
Purpose
=======

User tests have been made by the Product Owners team. It showed that the planners are not used by new users on Odoo due to several reasons (They are too static, too heavy to use,...)

Specification
=============

Remove the module and its different applications. The onboarding on the business flow will be improvement in the weeks to come.
2017-10-26 16:14:21 +02:00
Antony Lesuisse 6b22476e20 [ADD] iap: In app purchase
IAP allow app publishers to charge for ongoing services. In that context, Odoo
acts mostly as a payment platform between the service user (client) and the service
provider (Odoo App developer).
2017-10-04 20:22:22 +02:00
Monish Soni 5228daf195 [IMP] web_setting_dashboard: improved dashboard responsivity 2017-09-14 10:53:26 +02:00
Jigar Patel e7b71a4b21 [IMP] web_settings_dashboard: Add a Translations and a Company settings block
Add blocks on settings dashboard to:

- Load a translations
- Set up company information
2017-05-10 13:10:19 +02:00
Géry Debongnie 2106e3dd2e [REF] web, *: simplify our RPC system (in JS)
The RPC system was not completely satisfactory, we decided to prepare
the future and do it properly.  This commit introduces the new rpc
system, which replace the previous new one.  We now simply have a
method, this._rpc, which takes a dictionary of parameters.  The idea is
that depending on the parameters, it is able to add correct default
value when necessary.

For situations where we don't have the this._rpc method, we can use the
rpc.query method, which takes the same arguments, but directly calls
ajax.rpc instead of triggering up some events.
2017-04-11 19:44:38 +02:00
Géry Debongnie 86a87aa8b0 [REF] *: use _rpc method for all rpcs
The _rpc method is now the preferred method to do a rpc, so we need to
update all calls.
2017-04-11 19:44:38 +02:00
Géry Debongnie e574027056 [REF] web,*: remove 'web.model' and 'web.dataModel
Use this.rpc instead of Model object, with web.ajax if necessary.

nb: EventDispatcherMixin include now the custom_events managment instead
of widget
2017-04-11 19:44:38 +02:00
Aaron Bohy f3a811b2b2 [FIX] web_settings_dashboard: remove useless imports
It also allows this module to be loaded in the test environment,
where the module 'web.web_client' is missing.

Also fixes some linting warnings.
2017-04-11 19:44:38 +02:00
mmo 33b09d0d5e [IMP] generic: Open external links in a new tab by default
Purpose
=======

External links in the data sometimes open in the same tab, the users loses times as he has to come back (and looses the context).

Specification
=============

Any external links in data (planners, settings) should open in new tabs.
2017-02-10 14:29:29 +01:00
bpa 9ce73d3cec [IMP] web_settings_dashboard: Display a hand cursor when hovering social sharing icons 2017-01-06 11:19:15 +01:00
qsm-odoo 669336baa9 [REF] web_planner, *: refactor planner code
* Share code between website and backend
* Do not do a [100ms - 500ms] RPC on each app change in the backend
but do it only if the planner is asked to be opened
* Use the Dialog class so that the planner is not broken
* Simplify/optimize code, use standard conventions, lint files, ...
2016-11-15 13:08:59 +01:00
Fabrice Henrion 0d32a44689 [FIX] web_settings_dashboard: typo
Closes #14188
2016-11-14 17:16:32 +01:00
Olivier Dony f18def7175 [FIX] web_settings_dashboard: stop depending on old numbering scheme 2016-10-05 17:28:15 +02:00
Yannick Tivisse 2adae8ff0f [IMP] web,web_settings_dashboard: Move 'About' menu to settings dashboard
Fp request: In the user preferences menu, remove "About Us" and put the version number in the Settings dashboard somewhere, as well as the link to switch to developer mode. Odoo is not a desktop application anymore.
2016-08-22 12:56:49 +02:00
Yannick Tivisse 2aaad4d256 Revert "[IMP] web,web_settings_dashboard: Move 'About' menu to settings dashboard"
This reverts commit 328af5dc86.
2016-08-17 10:07:51 +02:00
Yannick Tivisse 328af5dc86 [IMP] web,web_settings_dashboard: Move 'About' menu to settings dashboard
Fp request: In the user preferences menu, remove "About Us" and put the version
number in the Settings dashboard somewhere, as well as the link to switch to
developer mode. Odoo is not a desktop application anymore.
2016-08-17 09:12:04 +02:00
Fabien Pinckaers 7379f703c0 [IMP] web_settings_dashboard: minor sentence improvement 2016-08-11 10:39:48 -07:00
Denis Ledoux da8c5d054e [FIX] web_settings_dashboard: email TLDs can be longer than 6 chars
This revision is similar to
7f29a23118

opw-682116
2016-07-05 14:27:11 +02:00
Denis Ledoux 2e785a8869 [FIX] web_settings_dashboard: Invite new users reload
Before this revision, it wasn't possible to invite new users
(in the Settings Dashboard) multiple times without reloading
the dashboard
e.g. Invite one user, then fill again the textarea, and click
again the `Invite` button

This is because a new widget is created at each reload,
because of:
```
load_invitations: function(data){
    return new DashboardInvitations(this, data.users_info).replace(this.$('.o_web_settings_dashboard_invitations'));
},
```
and
```
reload:function(){
    return this.parent.load(['invitations']);
},
```

and `this.$('#user_emails').val().` is empty at the second reload,
because the textarea retrieved with this selector is the textarea
of the previous widget, which is now empty.

It should probably be proper to make another mechanism for the reload,
that doesn't create a new widget each time,
but we don't take the chances in a stable release. Therefore,
we just use the event delegate target to retrieve the right
textarea.

opw-677680
2016-06-23 11:28:20 +02:00
Khwunchai J a9ea4e7cab [FIX] web_settings_dashboard: Incorrected plural form of "Active Users"
Odoo add the extra letter "s" to the translated word "Active User".
This is caused by adding "s" at the end of the word directly from the template,
which makes no sense in many language.
This prohibits translators from translating the plural form in any language.
The plural form and singular form of "Active User" should be translate
separately.

Fixes #12469
Closes #12470
2016-06-17 10:18:41 +02:00
Mahendra barad 7bc875724e [FIX]web_settings_dashboard: Fix traceback on click of breadcrum, click on X-more invitation and click back on breadcrum it will generate error. 2016-03-14 12:01:52 +01:00
Nicolas Lempereur 516c8de3e9 [FIX] web_settings_dashboard: set undefined installed_apps
opw-657865
2015-12-01 10:14:56 +01:00
Damien Bouvy 414c567dd1 [FIX] web_settings_dashboard: merge apps & enterprise panels
- Makes the panel less obtrusive and does not disrupt the
layout of the dashboard anymore.
- Use the global version info to save an extra RPC call.
2015-11-25 18:13:01 +01:00
Fabien Pinckaers 623bfe644c [FIX] twice url in tweet 2015-11-19 23:08:20 +01:00
Martin Geubelle 94d9658c78 [IMP] web_settings_dashboard: add panel for Odoo Enterprise
This panel fetches the number of active users and redirects to our server with the correct parameters to begin the 'buy' process.
2015-11-17 13:01:09 +01:00
Christophe Simonis ed11d79bd8 [IMP] web_settings_dashboard: speed up Inviation dashboard
Searching on `log_ids` field is slow when there is a lot of users.
Count the number of active/pending users directly in sql.
Only show the last 10 pending users. Add a link to the full list view.
2015-11-05 17:57:48 +01:00
Fabien Pinckaers 1a58579540 [FIX] fix and improve res.config views and typos 2015-10-08 05:42:48 -07:00
Yannick Tivisse d600f86181 [IMP] web_settings_dashboard: Display a cursor on the big clickable icon 2015-09-30 16:42:17 +02:00
Yannick Tivisse c543e1be8b [IMP] web_settings_dashboard: Jump on Apps or Users view by clicking on the fa icon 2015-09-28 10:19:51 +02:00
Martin Geubelle b9cfbbee87 [FIX] web_settings_dashboard: remove grey color when complete planner 2015-09-14 10:33:49 +02:00
Fabien Pinckaers 51c2e3b693 [IMP] Small css improvements 2015-09-05 19:27:42 +02:00
Fabien Pinckaers 6bce8162cc [IMP] better tweet message 2015-09-05 18:14:28 +02:00
Parth Gajjar c6a0af45ef [ADD] web_settings_dashboard: Settings Dashboard 2015-09-04 13:03:21 +02:00