Commit Graph
115 Commits
Author SHA1 Message Date
Christophe Simonis e3658d6f56 [MERGE] forward port branch saas-15 up to d44cd77884 2018-06-12 16:31:54 +02:00
Christophe Simonis d44cd77884 [MERGE] forward port branch saas-14 up to 284ed9216c 2018-06-12 12:19:14 +02:00
Adrien Peiffer (ACSONE) 52f5bb27ce [FIX] website_event: improve registration modal behavior
Currently there are 3 ways of going out of the modal: clicking cancel
registration, hitting the close button or clicking outside the modal.
The latter one however does not trigger the close event for modals and
therefore buttons of event registration are not reset correctly. This
commit fixes that behavior by preventing to close modal by clicking
outside of it. Buttons should be used and flow is now fixed.

Closes #25174 .
2018-06-11 11:23:28 +02:00
Christophe Simonis e7f0dffb6a [MERGE] forward port branch saas-15 up to c301122b5f 2018-06-05 15:10:45 +02:00
Nicolas Lempereur 57a64bbc86 [FIX] website_event: unblock button when no reserve
In 11.0, this change e9454e79 solved the use case of:

- opening the registration of a ticket
- discard

=> the page must be reloaded to register a ticket

A new report is that since 9.0, if we try to register 0 ticket we would
also have to reload the page.

This commit backports e9454e79 and solves the 0 ticket registration.

10.0 version of 9.0's #24966
opw-1851622
closes #24991
2018-06-04 10:20:27 +02:00
Nicolas Lempereur f71b934ce6 [FIX] website_event: unblock button when no reserve
The website_event_questions override EventRegistrationForm's method
on_click and expects the returns is a deferred.

This commit provides a deferred in all instances avoiding an error.

Also what was done in e9454e79 and enables back the Register Now
button if no ticket was selected.

opw-1850527

In 11.0, this change e9454e79 solved the use case of:

- opening the registration of a ticket
- discard

=> the page must be reloaded to register a ticket

A new report is that since 9.0, if we try to register 0 ticket we would
also have to reload the page.

This commit backports e9454e79 and solves the 0 ticket registration.
Also if website_event_questions was installed there was an error
preventing an error message to be displayed.

saas-15 version of 9.0's #24966
opw-1851622
closes #24967
2018-06-01 15:55:56 +02:00
Nicolas Lempereur e9454e79e2 [FIX] website_event: typo tickets not disappear
Since 809aaf9e, when clicking on "Register Now" on a ticket registering
page, the ticket list disappeared because of a typo.

opw-1841488
closes #24607
2018-05-08 13:53:29 +02:00
Christophe Simonis e918271f76 [MERGE] forward port branch saas-16 up to 8fdac4b6b2 2017-10-27 14:09:20 +02:00
Christophe Simonis 991ba1d861 [MERGE] forward port branch saas-14 up to a2890c1e76 2017-10-26 19:36:23 +02:00
Christophe Simonis bbc226cd6c [MERGE] forward port branch 9.0 up to 809aaf9e7b 2017-10-26 18:33:33 +02:00
Jeremy Kersten 809aaf9e7b [FIX] website_event: avoid double subscription
Before this commit, you was able to double click on the button when
are in registration flow. In this case, you subscribe 2 times and so
take 2x more seats, what can be annoying when you have a limited room.

In the same time, we fix the form in the form that generate
strange behaviour like some events not bubbled correctly.

The attendee form (into the modal) was inside the registration form.
$'attendee_form).on('submit') obviously failed due to this bad dom.

This commit closes opw-778191
2017-10-26 17:52:21 +02:00
rde 4ecbacaf59 [ADD] website: add new page management
website.page = old ir.ui.view with page=True
website.redirect is a new mechanism to replace in the futur the ir.attachment
mechanism of redirect.

From now, we don't have a specific /page controller to serve 'page'.

We use a new model website.page which is rendered if none route matches the url
 and that the field 'url' on website.page matches the request.httprequest.path.

The order to serve a path is:
    - Routes defines in controllers (/shop, /blog, ...)
    - ir.attachment with name matching the path
    - website.page with url matching the path
    - website.redirect with url_from matching the path
    - 404

To improve:
    - allow regexp in website.redirect model
    - allow to edit the view_arch from the page.management via redirect backend
      (needed when traceback in the page, or when modifying a js/css/less/...)
2017-09-15 15:29:37 +02:00
qsm-odoo 2972976962 [REF] web_editor, website, *: complete refactoring
* mass_mailing, payment, point_of_sale, portal, survey, web, web_tour,
  website_blog, website_crm_partner_assign, website_event,
  website_event_questions, website_form, website_forum, website_gengo,
  website_hr_recruitment, website_links, website_mail,
  website_mail_channel, website_mass_mailing, website_quote,
  website_sale, website_sale_options, website_slides, website_twitter

This commit reviews the whole "JS side" of the web_editor and website
apps. This is a first step to be able to improve them with new and
better functionnalities; this commit is not supposed to change any
visual behavior.

The main goal was to achieve a structure similar to the backend one.
Now, the frontend side also has a root widget (like the WebClient)
and all other widgets are attached to it one way or another. This allows
the benefits of using the 'trigger_up' functionnality for example.

As RPC are now mainly done with the `this._rpc` functionnality (being
possible thanks to the parent hierarchy), the frontend will also be
possible to test thanks to QUnit in a future update (besides the "text"
editor side which still requires a refactoring to be able to do that).

---

Here are some of the changes:

(-) conventions and documentation

The code has been updated to follow JS conventions and a lot of code has
been commented (around +2000 lines of comment). This also means that
lots of functions have been renamed to use camelCase or simply to make
their name understandable.
See https://github.com/odoo/odoo/wiki/Javascript-coding-guidelines.

(-) deprecated: web_editor.base

The "web_editor.base" module has been split and does not force the
modules which require it to wait for DOM ready anymore. This was indeed
slowing loading times, but also prevented to use some modules in some
contexts (see the LESS editor use in web_studio which is the subject of
another task).
Now the "editor context" can be got thanks to the "web_editor.context"
JS module with its "get" function.
The "web_editor.base" module should probably not be used anymore (see
its code and recent updates).

(-) new: web.dom_ready

If a JS module should wait for the DOM to be ready to be executed, a
new JS module has been created: "web.dom_ready". This should always
be used in a module which only want to instantiate stuff. Do not
extend (or worst, include) classes after DOM ready.

(-) website.website

The "website.website" module has been split. "website.website" does not
return anything useful anymore, it just initialize some miscellaneous
stuff, without waiting for the DOM to be ready. You might want to check
"website.utils", "website.content.compatibility" or `WebsiteRoot`. Also
`website.form` has been deleted (use `this._rpc`), so has been
`website.error`. `website.prompt` will be removed in a future update to
be replaced by `Dialog.prompt`.

(-) widgets are great

Many classes which were not widgets are now widgets. This allows them to
use the 'events', the 'xmlDependencies' and the 'this._rpc' features for
example. Here are some of the main ones:

- Snippet options: these were classes with a `$el` for the menu element
    and `$target` for the customized element. This is still the case
    but following standard `Widget` structure (one exception: using
    `this.$(...)` searches in the `$target` as before this update).

- Snippet animations: instead of class instances with a `$target`
    element which can be `start` and `stop`, these are now standard
    widgets which can be `start` and `destroy`. `this.$target` is
    an alias to `this.$el` for ease of compatibility.

- Snippet editors: instead of class instances in charge of an editor
    overlay, these are now widgets. Each "child" snippet editor is
    properly attached as a "child", which allows editors to communicate
    and to be properly destroyed.

(-) root widgets and website navbar

The frontend is different of the backend. In the backend, the page has
an empty <body/> element and all the components are instantiated from
parent to children (i.e. the `WebClient` is instantiated and is in
charge of instantiating the `ControlPanel`, etc). The frontend cannot
work like that on page loadings as they are way more frequent than in
the backend and we do not want them to flicker. A frontend page is
loaded as a <body/> element which already contains the website navbar
and its menus and the whole content page. JS code has to be "attached"
to these existing elements. This is possible thanks to the `RootWidget`
instances and the specialized `WebsiteRoot`, `IframeRoot` and
`WebsiteNavbar` (see code for details).

(-) lazy loading

No more (or at least a lot less) XML/JS has to be loaded on page
loading, thanks to the use of the `Widget.xmlDependencies` feature.
XML which have to be lazy loaded is loaded only on related Widget
instantiation if necessary, which allows to execute a lot of JS code
before the DOM is ready and to start many widgets on DOM ready (not
later). A visual benefit of this is clicking on the 'edit' button as
soon as it is possible: before this commit, this was sometimes not
doing anything as event handlers were not binded yet.

Still a possible exception: loading the session and locales. This may
be asynchronous stuff which is still required before widget
instantiations but this will be the subject of another task.

(-) deprecated code and code location

More than reviewing code and organizing it, many apparent dead code was
removed. More importantly, mislocated code was put in the right app.
This is the case for snippet animations which is a concept for website
apps but was defined in the web_editor app, or some translation concepts
which were part of website but should have been part of web_editor.

---

There are probably more things to say about this commit but I will let
the comments speak for those.
2017-08-16 11:04:14 +02:00
Mitali Patel 5d4dd98af2 [IMP] website_event: apply checkout / buy process improvements
* reword various texts in website_event to avoid references to a sell
   or checkout process as website_event does not handle sakes;
 * if there is only one ticket available, propose to take one by default.
   Display Register Now instead of Order Now if tickets are free. Display
   an error if the user chooses no tickets in its registration.;
 * link in cart for event tickets redirects to event, not product;
 * confirm attendees only at invoice payment;
 * improve wording, use schedule instead of agenda.
2017-03-03 13:09:17 +01:00
qsm-odoo fb363b572b [FIX] *: adapt odoo interface violet
Change color #a24689 to #875A7B

Commit https://github.com/odoo/enterprise/commit/8ac1c19fac7615fecd51e670f798d13158a4e53c
changed the odoo interface violet by changing the main LESS variable
but forgot there was many direct occurences in XML/HTML/... (for
example for the mobile browser color).

Even if it's community the odoo interface violet is used at many places
(module description, XML demo data, ...).
2016-10-05 10:29:00 +02:00
Denis Vermylen (dve) e9426b03e7 Revert "[IMP] website, doc: replace eCommerce by e-Commerce"
This reverts commit b4d7b7e6dc.
Odoo always uses term eCommerce
2016-09-06 13:55:12 +02:00
Denis Vermylen (dve) b4d7b7e6dc [IMP] website, doc: replace eCommerce by e-Commerce 2016-09-02 17:42:42 +02:00
qsm-odoo f9a84b5ebc [IMP] web_tour, *: allow to properly extend tours
* crm, project, website, website_event, website_blog, website_forum,
website_sale

Eg: the tour 'shop_buy_product' is extended by the website_sale_options
addons to add a step to close a modal.

The current solution was requiring the module that defines the tour
to extend, then add/remove steps in the "step" key of the tour
definition.
Some of the problems with this method were:
* The "register" method calls the "update" method to immediately
search for tip to place once registered (as register may be called
after the DOM is ready). So extensions of tours were happening after
the tours were started (and the tours were not restarted).
* The addition/removal of steps was happening after they were filtered
according to the "edition" key.

To allow extension, the system is changed as follow:
* The "register" method now only saves the steps and options without
modifying them and does not call the "update" method.
* Once the DOM was ready, the tour service started listening to DOM
mutations and called the "update" tour method. Now, this "update" call
is replaced by a "_register_all" call, on DOM ready and at the end of
the current call stack (which makes sure all modules are loaded). This
"_register_all" method marks the registered tours as ready after having
filtered the steps according to the "edition" key and initialized the
current step to trigger.
* Also, tours can now define a "wait_for" option which allow them to
be marked as ready for run and update after the given deferred. Those
tours can now also be extended without having to wait for the deferred.
PhamtomJS must wait for the "ready" key to be true to run the tour.
2016-08-26 13:39:55 +02:00
qsm-odoo eaf8e82efb [IMP] *: activate automatic tour tests
* project, crm, point_of_sale, website, website_sale, website_blog,
website_event, website_forum
2016-07-18 14:22:29 +02:00
qsm-odoo 3247400291 [IMP] website(_*): tours
* Adapt modals for new pages/product/... to leave some space for tour
tips on the right
* Remove the "click on add page" step which was the start of each tours
and leave it to be the last of the website tour
* Change position of some tips
* Remove step "click on parent button" in website tour as it is not
necessary anymore
* Remove the possibility to skip the frontend tours
2016-07-05 18:05:24 +02:00
qsm-odoo cd16749564 [IMP] website(_*): adaptation of tours to new system
+ Adapt website welcome message

(Note: temporary duplicate tour: use old version for tests and new
version for onboarding)
2016-07-04 17:24:00 +02:00
Mohammed Shekha 58d57f9154 [IMP] website_event_question: Front-end register display improvements
Purpose:
Registration form needs some improvement : When there is lots of question
and answer and sometimes question is too long then view is mashed/weired

Improve the view and show one question and one answer on line, next question
and answer will come on next line,
Also change the common question/answers view, put question answer in
inline and each question/answer should come into next line

Mockup : http://bit.ly/1zpoWju
2016-06-16 15:09:54 +02:00
Yannick Tivisse a7e57d6d1a [IMP] Appswitcher: Better icons for some modules
For Manufacturing and Repairs, replace the gavel by a wrench. A gavel is a small hammer used by a judge; it is not used in manufacturing. Keep it for when we will have a Law app.

For POS, replace the briefcase by a screen:

For timesheet, replace the calendar by a clock:

For calendar, use the calendar:

For event, use a ticket, it's more generic than a martini glass:
2016-05-25 13:12:53 +02:00
Foram Shah c714e1b1fc updated the description of 'website_event' 2016-05-10 15:24:49 +02:00
Fabien Pinckaers 4b2091e8c9 [FIX] account: demo data invoice line without required name
[IMP] account: d'ont create journal items for invoice lines with quantity 0 (not amount because of tax)
[IMP] crm: usability kanban view and schedule an activity
[FIX] crm: schedule an activity bug when no activity yet
[IMP] website: app for website (not a menu in website admin)
2016-04-20 00:17:17 -07:00
Fabien Pinckaers 4c8e908b49 [IMP] Speed up app switcher loading: 645k --> 137k lossless compression for all icons 2016-02-26 11:39:38 +01:00
qsm-odoo ed46965dbe [FIX] web*: tours
Selector changes + No need to open the snippet panel anymore.
2016-02-24 13:47:36 +01:00
Xavier Morel f01c4e84b0 [FIX] website_event: unnecessary POST call 2015-10-01 01:36:49 +02:00
Yannick Tivisse 47a82a8e9c [REM] Remove useless button in some module descriptions 2015-09-30 16:42:18 +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
Darshan Kalola 50a043d979 [IMP] website, website_sale, crm, web_planner : add planner for website modules
This commit impact crm, website, website_sale and web_planner modules because it
- add planner for website and website_sale
- improve planner notebook by setting texterea and input size to 100% and using col-md-* class
- split js code into common part (used in backend and frontend) and backend part (only for backend)
- adapt some tour, since every page will have the planner modal in its DOM, the tour selectors msut be more accurate
- introduce some style fixes and adaptations
- ...
2015-05-15 10:59:42 +02:00
Géry Debongnie 4fdf74fe21 [IMP] web+addons: improvement to module system
The module system needs to know the dependencies of a given module
before executing the function.  This is why the dependencies were
defined once in an array, and then were described one more times in the
call to require.

But a trick can simplify this: the boot function can parse the string
representation of the module and extract the calls to require from it.
It is more work for the processor, but it leads to simpler module
definitions.
2015-03-18 09:23:37 +01:00
Géry Debongnie da73f624b2 [REF] website_event: update to the new module system 2015-03-18 09:23:35 +01:00
Christophe Simonis bc2fd0515b [MERGE] forward port of branch 8.0 up to 017f346 2015-03-04 15:16:10 +01:00
Goffin Simon 092c64b76f [FIX] website: translations for qweb templates not applied.
-Website.tours must be loaded after the translation data:
"website.ready" before the tour ensure that the translations are loaded.

-Translations for qweb templates not applied:
Translate all text nodes in qweb templates when translation data
are loaded.

-Add some translations in website tours.

opw:619786
2015-03-03 16:05:34 +01:00
Christophe Matthieu 3be4468945 [FIX] website: need to wait the editor to continue the tour 2015-03-02 16:58:59 +01:00
Christophe Matthieu a65fee458a [IMP] website editor: display snippet block on the left side and open it on mouse enter 2015-01-26 10:14:02 +01:00
Christophe Matthieu 9069d0127c [IMP] website: use the new summernote editor 2015-01-05 10:59:42 +01:00
Paramjit Singh Sahota ca862e7b85 [IMP] event: Split Ticket: registration are now for one attendee only.
Registration are now for one attendee only. When buying several seats for an event
you have now one registration for each attendee.

event: nb_register field is removed; as well as unnecessary user_id and it subscribe /
unsubscribe behavior. Also slighly cleaned some views.
event_sale: do not auto confirm registrations linked to a draft sale order. Note: strange
origin is a char field, not a sale_order_id. Added a small wizard to edit attendees
data when confirming a sale order containing event related lines.
website_event: when buying free tickets, ask for attendee details. Added template,
controllers to handle that behavior.
website_event_sale: when buying tickets, ask for attendee details. Events ecommerce
should be better integrated with online events, using inheritance to add details
instead of being very different.
2014-10-09 10:09:06 +02:00
rlu-odoo 8b67a7202d [REF] OpenERP --> Odoo in various UI texts
Rebranding has been done in:
- data/demo files
- html templates
- help notices
- comments
- logger messages
- and other various messages

(Commit taken from odoo-dev:8.0-improve-openerp-odoo-rlu at rev 7deaa08)

Closes #1260
2014-07-18 13:45:41 +02:00
Simon Lejeune 195fa93168 [MERGE] backend front end integration
Render the top-menu (backend menu or frontend editbar) server-side.
Use Fontawesome icons (mail, timezone, chat).
Refactor website widgets, split Website.editorBarin editorbar, ace, editorbar- content, editorbarCustomize.
2014-06-27 11:03:34 +02:00
Christophe Matthieu bc3fc54fac [IMP] Tour: add tour in web module; tour became available in backend. 2014-06-18 12:25:13 +02:00
Fabien Meghazi b0cbaf330a [IMP] website: load website.xml templates only in editable mode
bzr revid: fme@openerp.com-20140505113800-wv5vh802us270oez
2014-05-05 13:38:00 +02:00
chm@openerp.com be5fe933ec [MERGE] from trunk
bzr revid: chm@openerp.com-20140408080736-6b70rlfsvj3to0od
2014-04-08 10:07:36 +02:00
Christophe Simonis 0fad8159f3 [MERGE] forward port of branch saas-3 up to revid 9380 chs@openerp.com-20140407144439-10n8fs6zovodwwtx
bzr revid: chs@openerp.com-20140407163318-hh3jwfkj3o2c83lk
2014-04-07 18:33:18 +02:00
Denis Ledoux 73b3c851da [FIX] website*: remove unusable demo links from manifests
bzr revid: dle@openerp.com-20140403145128-9w92v4mmasz66mqj
2014-04-03 16:51:28 +02:00
chm@openerp.com 94cf489dfc [MERGE] from trunk
bzr revid: chm@openerp.com-20140327095038-ycs4991u11o9oywv
2014-03-27 10:50:38 +01:00
chm@openerp.com 60bdd78706 [IMP] website tour: refactoring and change api for create tour and test
bzr revid: chm@openerp.com-20140320083055-z5ys4oey5brd439v
2014-03-20 09:30:55 +01:00
Dharmraj Jhala (OpenERP) 9f51a6d453 [IMP] removed terminal slash from url and route
bzr revid: dizzy.zala@gmail.com-20140320063728-kuie1id6t7shvbc7
2014-03-20 12:07:28 +05:30
Dharmraj Jhala (OpenERP) ac8b0fcfc5 [IMP] improved code as suggested
bzr revid: dizzy.zala@gmail.com-20140318130903-6u2t94bfvh98jby7
2014-03-18 18:39:03 +05:30