Commit Graph
4634 Commits
Author SHA1 Message Date
qsm-odoo 3444e0a0da [FIX] web_editor, *: use explicit string keys for color maps
* website

```
$map: (
    test: 1,
    black: 2,
);
@​debug map-get($map, 'test');
@​debug map-get($map, test);
@​debug map-get($map, 'black');
@​debug map-get($map, black);
```

The above code leads to a:
1
1
null
2

This is because maps' keys can be *anything* in sass (even other maps).
In the example, the map is defined with unquoted `test` and `black` as
keys which are understood as the string 'test' and the *color* black.
When asking for the value for the 'black' string key... there isn't any.

This commit forces the use of quoted string as color maps' keys.
2018-09-07 13:57:14 +02:00
Odoo Translation Bot 55a5aca6d9 [I18N] Update translation terms from Transifex 2018-09-05 11:24:24 +02:00
Martin Trigaux cdb4b1c7c2 [I18N] export saas-11.5 source terms 2018-09-05 10:59:44 +02:00
qsm-odoo ab7385db1a [IMP] website: allow to select buttons' font
Needed for themes migration.
2018-09-03 18:40:35 +02:00
qsm-odoo cde3c9261e [FIX] website: review website customize dialog
Make some changes which are needed for theme migration.

- Theme colors as user colors fallback only (not hard choice)
- Review option dependency system
2018-09-03 18:40:35 +02:00
Odoo Translation Bot e8606ce00b [I18N] Update translation terms from Transifex 2018-09-02 02:24:05 +02:00
qsm-odoo 4bc79da943 [FIX] website, *: avoid top menu flickering
* portal, web
2018-08-31 18:57:12 +02:00
qsm-odoo 7253b55f41 [FIX] website, *: BS4, restore website menu dropdowns
* website_event, website_event_track
2018-08-31 18:57:12 +02:00
Jeremy Kersten 7566a8c205 [FIX] website: page manager visual fix
sort by url by default
don't show multi level if not in multi website mode
2018-08-31 18:04:23 +02:00
Romain Derie 6bfb0810b0 [FIX] web_editor, website(_*): fix bs4
[FIX] web_editor: adapt col size to avoid too small select

We should avoid col-md-3 in col-md-9 as the menu dialog is instanciated at 2
places:
  - When creating a link in the editor
  - When editing website navbar menu

In the second case, there is a hack in `content.js` to remove `modal-lg`
lowering the width of the modal and making the select too small.

[FIX] website: lower navbar font size

With BS4, font-size of navbar element went from 13px to ~17px (rem unit
computation).

14px seems better than previous 13px as the frontend content size is
higher than the backend one. Thus, 13px looks too small in contrast with the
frontend page content.

[FIX] website_crm_partner_assign, website_customer, website_membership: fix layout

This commit fixes multiple layout issues, mainly by aligning code of the 3
modules:
  - Add margin right to avoid text to be against image
  - Using image_medium everywhere
  - Fixing search input width

publish toggle red + odoo primary is weird -> gray
navbar now has a background & float-right not working since flex
-> remove navbar class, use d-flex and ml-auto so the right element will be floating since using all available width

task-1878150
2018-08-31 16:37:45 +02:00
Romain Derie 47b00c5d53 [FIX] base,website,web_editor: handle key field on ir.ui.view for multi website
With multi-websites, we expect qweb views to have a key set as it is the key
that is used to find duplicates (two views with same keys are duplicate, the
one with a website_id set is more specific than the one without a website_id)

Thus, 5ff87e8039 sort on key in order to find the most suitable one.

It would crash if a qweb view is created without a key (False) as it can't sort
`bool` and `str`.

This commit:
  - Adds a generated key to scss views
  - Adds an SQL constraint to avoid QWeb views without a `key`
  - Generates a random key when creating a QWeb view without a `key`
  - Handle False key in `filter_duplicate()` by extracting views with False key
    before sorting, and then adding these views to the recordset

Note: We also want the key to be editable as it is now an important field with
      multiwebsite. Thus, we removed the readonly on this field.

+ fix python tests as we now force key on qweb views with sql constraint
+ pep8
2018-08-31 16:37:45 +02:00
Jeremy Kersten 9b1d1d5728 [FIX] website: allow to switch from company from the front end
In some case, you can be on website 2 (where company_id = 2) with your user into the company 1.
In this case, you will not see the product on ecommerce from company 2 while you stay in company 1.
2018-08-31 16:37:45 +02:00
Jeremy Kersten ba2116838e [FIX] website, mass_mailing: fix social network
- Remove useless onchange company id from website, now that we configure it
in the res config.
- Add the onchange company into the res_config_settings
- Remove left duplicate data from mass_mailing
- Add ALL social links into the res config
2018-08-31 16:37:45 +02:00
Yenthe666 288bcccc8e [FIX] website, social_media, mass_mailing: add default value for missing media
+ add instagram

This commit closes #26644 and closes #26649
2018-08-31 16:37:45 +02:00
qsm-odoo 7ce1e60be4 [FIX] website: properly show theme colors in customize dialog 2018-08-31 16:00:10 +02:00
Sanjay Jamod 2b51fefa5e [FIX] *: BS4, adapt page-header class
Closes https://github.com/odoo/odoo/pull/26420
2018-08-31 12:01:36 +02:00
qsm-odoo 8a0b39be24 [FIX] website: add an ID to the main colorpicker option
Needed for theme migration.
2018-08-30 11:10:56 +02:00
qsm-odoo fc13c53837 [FIX] website: wrap footer copyright in a full-width div
Needed for themes migration.
2018-08-30 11:10:56 +02:00
qsm-odoo aa24a2cad4 [FIX] website: use variables for boxed layout option
- More efficient
- Needed for theme migration
2018-08-30 11:10:56 +02:00
qsm-odoo 77402a4efc [REF] web_editor, *: review color theming system
* web, website

- Introduce gray color palettes (needed for themes migration)

- Synchronize BS4 color maps with individual variables (see comments
 about this in the code).

- Review alpha/primary, beta/secondary matching:

Before this commit, we decided that the common way to define a color
palette was defining primary, secondary, gamma, delta and epsilon.
alpha and beta were then forced to primary and secondary without other
possibility.
The new system makes more sense:
1) define alpha, beta, gamma, delta and epsilon
2) primary and secondary will automatically be set to your alpha and
  beta (allowing to style the default UI with BS4-independant
  variables)
3) if you are not happy with (2), you can define primary / secondary
  in your color palette so that they are not automatically set to
  alpha / beta

This commit also changes what classes the editor uses. Background colors
and text colors will now use alpha/beta/gamma/delta/epsilon (not primary
and secondary anymore). For buttons, all the possibilities are suggested
but color duplicates are hidden (so if your primary and alpha are equal,
only one button color is suggested).
2018-08-30 11:10:56 +02:00
qsm-odoo 6e33301693 [REF] website: simplify color preview system in theme dialog
Only one color palette is shown at a time, so no need for the extra
css rules.
2018-08-30 11:10:56 +02:00
Martin Trigaux 4136072588 [FIX] sale,website: correct translatable content
Remove untranslated terms
Rephrase unclear content
2018-08-30 10:02:27 +02:00
Jeremy Kersten 19cc218d03 [FIX] website: make field required once feature enable via checkbox
Now that this field is computed (true if value), once the user check a feature, it is required to fill in the field.

Before this commit, you can click on checkbox, and save without key in field, and a refresh checkbow was again unchecked.
2018-08-29 15:18:19 +02:00
Jeremy Kersten 2a9a514551 [FIX] website, website_theme_install: improve flow for new website creation 2018-08-29 15:18:19 +02:00
Jeremy Kersten e24fedb757 [FIX] website: create public user in sudo
If new user is not in the current company, once created you will not be able to read it and
a traceback is raised.
2018-08-29 15:18:13 +02:00
Odoo Translation Bot f22e61dc74 [I18N] Update translation terms from Transifex 2018-08-29 14:19:27 +02:00
Odoo Translation Bot 0da9da4c44 [I18N] Update translation terms from Transifex 2018-08-26 02:17:37 +02:00
Jeremy Kersten d8064099da [FIX] website: move action action_website_add_features
Since we use it in website_form which one is included before res_config_setting,
we need to declare it before.
2018-08-24 22:58:55 +02:00
Romain Derierde-odoojke-odoo
65d8177b55 [REF] website*: revamp res_config_settings for website
Reorder res.config.settings for website
Make website_id in no create in most view
Revamp res.configsetting and view Form simplified

Transform old 'useless' stored field for presentation by computed field.
We can consider that if there are not key, feature is disable.

Co-authored-by: rde-odoo
Co-authored-by: jke-odoo
2018-08-24 20:01:02 +02:00
Odoo Translation Bot b8c6c24bbb [I18N] Update translation terms from Transifex 2018-08-24 15:54:45 +02:00
Odoo Translation Bot 10c9f07286 [I18N] Update translation terms from Transifex 2018-08-24 15:22:47 +02:00
Martin Trigaux a183a5125a [I18N] export saas-11.5 source terms
Create the odoo-12 project
2018-08-24 14:34:57 +02:00
Romain Derie f6e4f3aa0f [FIX] website: don't suffix cloned menu/page with 'Copy'
This behavior is useless in the front end (`clone_page`) as people cloning a
page will leave the page with copy in the page name without even noticing it.

Furthermore, creating or copying a website will bootstrap (clone) some pages,
suffixing all of these page by 'Copy'.
2018-08-24 09:21:46 +02:00
Romain Derie 8c701f2c9b [FIX] website: move main_object_request event in website_root
`main_object_request` was added in the navbar widget.
It would not work with `PageManagement` widget as it is added in the
website_root widget and not the navbar.

Moving it to the website_root will make the event accessible when triggering up
the event.
2018-08-24 09:21:46 +02:00
Raphael Collet f67649a6d1 [FIX] website: side effects in get_current_website() 2018-08-23 21:38:57 +02:00
Raphael Collet 2f7c03d9ca [IMP] base: add regular user admin as uid 2
User 1 simply becomes a technical user (inactive, no password).
2018-08-23 21:38:57 +02:00
Jeremy Kersten 5b0327f650 [IMP] website, website_forum: add a class modal_shown on modal once css animation is completed
Use this new class in website_forum to avoid that the tour click during
the animation and fail randomly.

https://getbootstrap.com/docs/4.0/components/modal/#events
2018-08-23 13:49:01 +02:00
qsm-odoo 5c9e3e0060 [FIX] website: separate main content from footer content
The edition dropzones for the bottom of the main content and the top of
the footer content are at the exact same locations.

Until commit https://github.com/odoo/odoo/commit/514722d783d504151b6b835375de036eda88279f,
when trying to drop a snippet there, there were two cases:
- The user drops a snippet above/below the location -> the snippet
  is added to the main content (as the code searches for the nearest
  dropzone, and always return the first one in the DOM if several are
  found).
- The user drops a snippet around the location, seeing a snippet preview
  -> the snippet is added to the footer content

With the mentioned commit, the second case changed: the snippet is now
also dropped in the main content. While this is more logic, there is
no way to drop a snippet in the footer anymore. Adding a border on top
of the footer content solves the problem for now (as the dropzone will
now be at 1px different location).
2018-08-22 16:52:48 +02:00
qsm-odoo 11143aafb8 [IMP] website: only allow one snippet inside the custom footer
It was easy to mess with the footer unintentionally when dropping
snippets in the page. Now we only allow one "main" snippet in the
footer, solving the problem.
2018-08-22 16:11:48 +02:00
XavierDo a4dfa6e354 [FIX] web, website: fix tests giving 404 error
-Some tests where moved without addapting the path to them:
path is now update and tests fixed.

-A picture was removed in commit 4dce6cc98b but
still referenced in template website_twitter_snippet.

-A test was missing a data leading to the wrong path to image beeing loaded
2018-08-22 14:41:02 +02:00
Kishan Gajjar 156955de6b [ADD] website: Added a feature to set opengraph/twitter meta image from SEO dialog.
With this commit now user can set custom meta image from the seo dialog. If the
user sets such image then it will be displayed when the user shares that URL in
social sites.

By default, it will show the list of images used in the current page.
Alternatively, user can use media dialog to select/upload images. By default, it
will take the company logo as a meta-image.

We also improved how custom meta tags are handled for different pages, Now we can
set custom meta tags based on the model and we can override '_default_website_meta'
method in case you want to change default meta values from the specific model.
e.g. For products displayed on the shop, if we want to change the value of
og:image to product specific images instead of default logo

In future, it will be used to add model specific metas like og:price, og:currency

We passed 'website_company_id' in frontend session info because we display
company logo in dialog for all pages. We can't use /logo.png as it is not
updating in multicompany and multiwebsite.

task id: 1835370
Closes: #25430
2018-08-22 14:01:32 +02:00
qsm-odoo 7c1695650a [REF] website, *: clean demo data and some default main data
* social_media

- Remove action server demo (out-dated and buggy)
- Remove website app / themes app actions (useless)
- Move demo social media to the social_media addons
- Use same contact us page for demo website 2
- Improve edition of contact us and about us pages by using snippets
  as default contents
- ...
2018-08-22 11:02:25 +02:00
Jeremy Kersten 2431e2a9ea [FIX] web_editor, website: remove useless code / comment
Rebase failed, these lines should be no more there.
2018-08-22 10:08:30 +02:00
Jeremy Kersten 50217184d2 [IMP] website: make abandoned cart parameter website_specific
+ implement specific_user_account option

Now you can choose if when you create an user on a website,
it this user is dedicated to this website or not.
2018-08-20 18:07:59 +02:00
qsm-odoo 66a46c3e3a [FIX] website: border-width of inputs was raised for no good reasons 2018-08-20 17:46:46 +02:00
qsm-odoo 604a6673a6 [FIX] website, portal: BS4, force list-group-item colors
Placing a list-group inside an element whose text color is forced is
buggy as the background of list-group items is forced to white and
the text color left untouched.
2018-08-20 17:46:46 +02:00
Cocographique 3babdebc5b [FIX] website: snippets usability improvements
- Suggest correct colors for <hr/> snippet
- Make alignment options more obvious for s_three_column
- Add alignment options for s_share snippet
- Review carousel design
2018-08-20 12:22:33 +02:00
Cocographique 5637dea114 [IMP] web_editor, website: review we options' style 2018-08-20 12:21:32 +02:00
qsm-odoo 6b84bdeaf9 [REF] website: BS4, smaller footer titles
Using <h5/> for those seems semantically more consistent and looks
better with default BS4 sizes.
2018-08-19 16:57:14 +02:00
qsm-odoo 7debf9deb0 [FIX] website: BS4, language selector should be smaller 2018-08-19 16:57:14 +02:00