Commit Graph
150 Commits
Author SHA1 Message Date
Louis (wil) 3f6f949fa5 [I18N] export sources
closes odoo/odoo#140002

Related: odoo/enterprise#49687
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-10-27 08:36:16 +00:00
Rémy Voet (ryv) 3c62ca1eb9 [REM] core: remove name_get API
Rationale
=========

Since v8, the `display_name` field is present on all models. By default,
`display_name` uses `name_get` which has pretty much the same purpose
(return record name used by the web client). Gradually, many (backend)
developers (and the ORM: https://github.com/odoo/odoo/commit/6da1c3ac4c036eac289597602976538e243cb939)
started using `display_name` (more convenient than
`record.name_get()[0][1]`) but it still had the `name_get` override.
It becomes more complex than necessary and poeple start to misunderstand
the two (and sometimes override both, leading to inconstiencies between
`display_name`/`name_get`).

To simplify the ORM and the API, we decided to keep only one of them,
the `display_name` field:
- It is much more convenient from a backend point of view
(`record.name_get()[0][1]` vs `record.display_name`)
- It is cached during the same transaction (and invalidated if
its dependencies change)
- It can be overridden like any other compute field (override
`_compute_display_name` with any extra dependencies)
- `name_get` is replaced by `read(['display_name'])`
(API perceptive), which can actually be more efficient
(if `display_name`'s depends are correct, the ORM will only fetch the
fields it needs instead of every prefetchable field)

Changes
=======

- Deprecates `name_get` for the v17 and based the method on
`display_name` (the opposite of before)
- Converts all usage of `name_get`
- Overrides of `name_get` are now overrides of `_compute_display_name`
- For `res.partner`, rename the field store `display_name` into
`complete_name` because `display_name` context-dependent and it makes
no sense to have a compute store that is context-dependent.
- Previously, it was possible to return multiple names for the same
record with `name_get`, but it was tricky and most of the usage of
this `name_get` didn't take this into account. The only example of
this is the `name_get` of `product.product`
(now use `", ".join(<names>)`).

Part-of: odoo/odoo#122085
2023-06-28 17:41:19 +02:00
Brieuc-brd fa60bac197 [IMP] *: app icons : add viewBox attribute
Prior to this commit, the SVG's viewBox attribute was missing, which
prevented svgs from being scaled.

This commit fixes this issue.

task-3326633
Part of task-3326263

X-original-commit: 30300c373ad1c63a6cf8b035cae0785a09c6933f
Part-of: odoo/odoo#121886
2023-05-22 13:54:08 +02:00
Brieuc-brdandElisabeth Dickinson 21d87a3da5 [REF] *: milk graphical assets
- apps icons
- base: replace demo avatars Mitchell, Marc and Joel
- mail: replace odoobot avatar

Part-of: odoo/odoo#116641
Co-authored-by: Elisabeth Dickinson <edi@odoo.com>
2023-05-12 22:59:14 +02:00
niyasraphy 9a976a8c9a [FIX] various: uniquify the the !
Just change double the by single. This fixes various typos in error and
code comments.

closes odoo/odoo#107266

X-original-commit: 09dfedfc19c2bc34c2bb394dcc4bc609c5ac0107
Related: odoo/enterprise#34681
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-12-06 10:52:50 +01:00
Pratik Raval 1ba3cb040f [IMP] website_google_map: display correct partner location on map
Currently, when the geolocation coordinates (latitude & longitude) of
the partner are not set, location for such partners is shown in the
middle of the sea (on /partners page).

With this commit, the coordinates are handled properly so that if they
are not set, instead of sending "0.0" to the map API, we now pass them
as a Falsy value, so that Geocoder API could use the available address
and locate such partners properly in the google map.

taskID-2819772

closes odoo/odoo#88622

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-08 14:40:24 +02:00
Jorge Pinna Puissant bc20eb4790 [IMP] test_lint, *: enable no-unused-vars rule
Part-of: odoo/odoo#85569
2022-03-02 13:05:42 +00:00
Fabien Pinckaers 10a5796d4b [IMP] speed up load_menus() by using SVG icons instead of png
Reduces load_menus answer size by 32% (between 20kb and 200kb savings
for the initial loading of the backend, depending on the number of apps
installed). Support for SVG icons in the web client for menus/apps.

Reduced PNG icons for apps list (8 bits PNG instead of 24 as our icons
don't need more colors as they are flat designs)

closes odoo/odoo#84280

Related: odoo/enterprise#24200
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-02-12 08:55:18 +00:00
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
Jorge Pinna PuissantandSamuel Degueldre f43a0814ae [IMP]*: configuration of ESLint for specific files
This commit will add the needed ESLint configurations on the JS files.
These configurations are added if the JS file uses a different
environment (serviceworker, node, etc) or if it uses a specific global
(google, ace, etc).

Co-authored-by: Samuel Degueldre <sad@odoo.com>
2021-05-04 13:32:49 +00:00
Xavier Morel 50f59471d6 [IMP] website_google_map: de-t-raw-ify
t-raw is used to inject safe-ified JSON into a script tag.

The scriptsafe json pseudo-module takes care of that, so remove
explicit escaping and use a script-safe JSON dump.
2021-04-29 05:34:21 +00:00
Jeremy Kersten fef7ec7c97 [FIX] website,*: remove useless route from sitemap
preparation for cleaning of v13
task-2065018

closes odoo/odoo#39051

X-original-commit: 8a0fc6476c70a4126043de3b3efbd1096e41f968
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-18 14:59:02 +00:00
Victor Feyens 07631a5185 [IMP] * : manifest module categories cleanup
closes odoo/odoo#35754

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-09-25 14:03:45 +00:00
Christophe Simonis 58a83d1222 [MERGE] forward port branch saas-12.4 up to 4a1321bc99
closes odoo/odoo#37127

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-20 14:33:54 +00:00
Jairo Llopis 5dad570423 [FIX] *: remove buggy calls to with_context
When .with_context() is called with a dictionary as 1st positional
argument, it will replace context (and not modify the referenced keys)
It may create bugs when losing the content of the context (e.g. remove
partner's language)

This is a partial merge of #36164 without the inventory part as
discussed.

closes odoo/odoo#36729

X-forward: 4717ccfa
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-12 06:18:18 +00:00
mreficent 355a5dfc36 [IMP] *: fix typos in comments
closes odoo/odoo#35404

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-07 10:28:33 +00:00
Sébastien Theys 1fa10cbc5d [FIX] base,website_google_map: fix partner address not showing
Following commit 983c7e8152.

`_compute_display_name` is overridden in partner to force `show_adress` and some
other context variables to None. When those values are in the context, calling
`display_name` can give a different result than calling `name_get()[0][1]`.

This commit reverts the changes of the mentioned commit where the behavior is
actually different, that is, when `show_address` is in the context.

It also adds a comment on the `_compute_display_name` method to avoid further
mistakes.

closes odoo/odoo#29510
2018-12-13 11:17:23 +00:00
TWA 983c7e8152 [IMP] mail,crm,...: Replace occurences of name_get()[0][1] by display_name
Purpose
=======

display_name is equal to doing name_get()[0][1]

Replacing name_get()[0][1] by display_name could be good for 2 things:
- Uniformization of the code
- Probable optimization if name_get is used inside a for loop on a recordset (as the values will be prefetched and put in the cache).

TaskID: 1849250

closes odoo/odoo#26341
2018-10-09 11:28:00 +00:00
Jeremy KerstenandDerie Romain 8300155cd6 [IMP] website: res_config_setting make most key website specific
google analytics, google map api key, ... can be set by website

Remove useless duplicated label

Co-authored-by: Derie Romain <rde@odoo.com>
Co-authored-by: Kersten Jérémy <jke@odoo.com>
2018-08-13 20:16:34 +02:00
stefanorigano 1d9208c4fa [REF] *: improve app icons, add SVG version
- Uniform colors and design
- Replace duplicated icons (eg. sale / sale_management)
- Improve misleading icons (eg. POS)
- Add icons for new apps

Add SVG versions to lossless future editing and print/marketing use.

task-54681
2018-08-09 15:46:06 +02:00
Priyanka KakadiyaandNimesh Jethva f5a96effb4 [REF] various: update manifests for better wording and names
Time has come to update a bit applications name, summary and website links.
Purpose is to have a website page correctly set for applications to be used
in conjunction with the newly-introduced discover button.

Names and summaries are updated to be more updated and shiny.

This commit is related to task ID 47179 and 1861544. Related PR are #22689
and #25556. First one is about classic applications while second one is about
website applications.

Co-Authored-By: Nimesh Jethva <nje@odoo.com>
2018-08-03 14:55:04 +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
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Martin Trigaux 79a19c1eb8 [I18N] sale_expense, remove website_google_map from translatable modules
As there is no translation for them
2016-09-07 12:00:10 +02:00
Martin Trigaux fb74fec3f5 [I18N] export 10.0 source terms 2016-09-07 11:08:42 +02:00
Olivier Dony 859d443863 [IMP] *: rename manifest files for v10 naming convention 2016-09-05 11:57:50 +02:00
Martin Trigaux 3efa9d39c6 [I18N] Update translation terms from Transifex 2016-09-05 11:34:17 +02:00
Nicolas Martinelli c82b65c855 [IMP] website, website_{*}: Google Maps API Key
As of June 22 2016, the use of API key is required to access the
following:
- Google Maps JavaScript API
- Google Static Maps API
- Google Street View Image API

https://developers.google.com/maps/pricing-and-plans/standard-plan-2016-update

For domains accessing the API before June 22, it will still work without
an API key. Since Google advises to use the API key, we hide the Maps if
no API key is defined.
2016-08-25 16:33:23 +02:00
Nicolas Martinelli 251344903d [IMP] website_google_map: update markerclusterer
An update of the library is necessary, since imarker images ("m*.png")
are not accessible on googlecode anymore. They should now be added
directly with the library.
2016-08-25 15:25:27 +02:00
Christophe Simonis 235ed4b2c1 [MERGE] forward port branch saas-12 up to 9ad5f26 2016-08-20 18:08:19 +02:00
Christophe Simonis 9ad5f26b3f [MERGE] forward port branch saas-11 up to 3a2147d 2016-08-20 17:18:31 +02:00
Martin Trigaux 2331bbf4b0 [I18N] update saas-10 translations by merging 9.0 and master
1. export saas-10 sources terms into .pot files
2. msgcat odoo-9 .po & odoo-master .po into saas-10 .po files
3. msgmerge saas-10 .po with saas-10 .pot files to keep relevant terms
2016-08-18 16:47:23 +02:00
Martin Trigaux c73b2bd079 [I18N] export master source terms 2016-08-18 11:01:50 +02:00
Jérome Maes 8a399930f3 [REF] website_*: remove render method on website
Since saas-3, website controllers use `request.website.render`
to render the template of a web page. This was kept for retro
compatibility. It's time to stop using deprecated stuff.
Same for `_render` method on website.

'json' route don't use `request.render` since
`JsonRequest` has no `render` method.
2016-08-04 12:02:14 +02:00
Christophe Simonis 53015e11a9 [MERGE] forward port branch saas-11 up to eb83ab2 2016-08-03 16:16:30 +02:00
Christophe Simonis c956075f5f [MERGE] forward port branch 9.0 up to cadb481 2016-08-03 15:07:24 +02:00
fwi-odoo d4e813b873 [REF] web, *: change deprecated import openerp.addons.web.http to odoo.http
We also remove the mock in web as there is no need for it anymore.
2016-08-03 13:42:05 +02:00
Odoo Translation Bot b7eb3c6bd0 [I18N] Update translation terms from Transifex 2016-07-31 00:38:56 +02:00
Christophe Simonis f670b3b1df [MERGE] forward port branch saas-11 up to 3aea814 2016-07-29 15:33:51 +02:00
Christophe Simonis 4c7d9cb6a6 [MERGE] forward port branch 9.0 up to e0c0a5f 2016-07-29 12:04:24 +02:00
Christophe Simonis e0c0a5fb1b [MERGE] forward port branch saas-6 up to 50e1486 2016-07-29 11:56:15 +02:00
Christophe Simonis 50e148648d [MERGE] forward port branch 8.0 up to 9fe930e 2016-07-29 11:45:47 +02:00
Olivier Dony c372708b01 [FIX] website_google_map: do not allow invalid partner prefix
The only supported prefixes are the following:
 - /partners/ when website_partner and/or website_crm_partner_assign are installed
 - /customers/ when website_customer is installed
2016-07-28 17:27:54 +02:00
Christophe Simonis a039fc509b [MERGE] forward port of branch 8.0 up to 9650249 2016-07-13 17:26:44 +02:00
Odoo Translation Bot ef83f798d5 [I18N] Update translation terms from Transifex 2016-07-10 03:01:32 +02:00
Christophe Simonis 5a3a06f26f [MERGE] forward port of branch saas-11 up to d4d09df 2016-07-04 13:16:34 +02:00
Olivier Dony f76f4cd0b6 [MERGE] Forward-port 9.0 up to 7f2e748a22 2016-07-01 18:36:24 +02:00
fwi-odoo c03b29b8b2 [MOV] crm_partner_assign: merge into website_crm_partner_assign 2016-07-01 09:59:10 +02:00
Yannick Tivisse 692d41c686 [IMP] Classified each module in its category to display them correctly on odoo/apps
To be displayed correctly on odoo app (In a given category and not only in all or hidden)
the module category in the __openerp__.py file should be one of these:

    "Accounting",
    "Discuss",
    "Document Management",
    "eCommerce",
    "Human Resources",
    "Industries",
    "Localization",
    "Manufacturing",
    "Marketing",
    "Point of Sale",
    "Productivity",
    "Project",
    "Purchases",
    "Sales",
    "Warehouse",
    "Website",
    "Extra Tools",

'Accounting & Finance' will not work, as 'Project Management', ...
2016-06-30 13:27:46 +02:00
Christophe Simonis 93e6316029 [MERGE] forward port of branch saas-11 up to 7153077 2016-06-28 18:05:25 +02:00