Commit Graph

13 Commits

Author SHA1 Message Date
Harsh Modi
c7a6b67a87 [FIX] coding_guidelines: fix the alphabetic orders for the import
In odoo, as we suggest everyone to follow an alphebetic order.

The translator(`_`), ASCII is 95 and `a` ASCII value is 97
which '_' < 'a', the translator should be defined first in the
import before the `api` not at the end of the import

This commits adds an example to import static class `Command`
with a Capital alphabet with a ASCII value of `C` as 67
which will be before than the `_`
'C' < '_' < 'a'

This order of import should be followed while the import

closes odoo/documentation#11983

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2025-02-07 10:51:04 +00:00
Aurelien van Delft (avd)
ac8f3d2aa4 [IMP] contributing/git: add [PERF] to the valid commit tags
The [PERF] commit tag passes the runbot minimal check and has been
used in lots of patches. E.g.
 - odoo/odoo@f02bcfadcb
 - odoo/odoo@b30b059898
 - odoo/odoo@780a2bb601

However this tag was not listed in the documentation yet. This led
to confusion for reviewers not accustomed with it. This commit
fixes that.

closes odoo/documentation#11290

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2024-10-29 07:53:45 +00:00
Nicolas (vin)
9cab0fdb75 [IMP] coding_guidelines: fix python code indents
A few python code blocks on the coding guidelines are indented twice
(8 spaces instead of 4), which is not correct.

closes odoo/documentation#3903

X-original-commit: 16176fb508
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-03-27 17:40:05 +02:00
poma-odoo
6b35cacb2a [FIX] contributing/coding_guidelines: remove mention to assets.xml
We no longer load assets by xml files, but we use __manifest__.py for that.

closes odoo/documentation#3720

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-03-08 23:57:52 +01:00
Jonathan Castillo (jcs)
17319f92b2 [FIX] *: RST cleanup
RST cleanup to comply with the RST guidelines. This is required so we
can use "make test", as there are currently hundreds of errors. For now,
it is unusable because of the oldest code in this repo.

closes odoo/documentation#3581

Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
2023-02-15 12:51:21 +01:00
nle-odoo
420c066e01 [FIX] developer/guidelines: odoo addons import order
The example for import order is a little confusing since it is wrong.

closes odoo/documentation#3379

X-original-commit: f7b1f66b8c
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2023-01-20 16:08:15 +01:00
stefanorigano (SRI)
2ca32b40bc [IMP] scss: update, improve preexisting content
Add a new content focused on SCSS and user-interface.

- SCSS coding guidelines: regroup information already available (eg [1])
  or based on "oral tradition".
  The aim is not to establish new rules, ~99% of the current codebase
  is already compliant.

- SCSS inheritance: explain how SCSS assets management works in odoo.
  For example, people still find confusing that overrides are defined
  *before* the variable to customize.

- SCSS optimization tips: suggestions to lean SCSS code. Based on SCSS
  optimization task's know-how [2].

- CSS variables: explain how this feature is commonly used in odoo to
  adapt layout & design without raw CSS overrides.

- UI Icons: Add link to fontAwesome4 library . Replace the picture of
  odoo icons with the actual font (90kb image VS 15Kb font)

[1] https://github.com/odoo/odoo/wiki/SCSS-coding-guidelines
[2] https://www.odoo.com/web#id=2704984&menu_id=4720&cids=1&model=project.task&view_type=form

task-3090800

closes odoo/documentation#3093

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-01-12 18:19:27 +01:00
Antoine Vandevenne (anv)
8d94f66d81 [ADD] contributing/development: add a guide to contribute to the codebase
In addition, this commit extracts the git guidelines from the coding
guidelines. This helps link the git guidelines and unclutter the coding
guidelines, which should focus on only the programming languages.

task-2897123

Part-of: odoo/documentation#3260
2023-01-03 13:27:05 +01:00
Victor Feyens
c367974170 [FIX] *: remove trailing whitespaces
Part-of: odoo/documentation#2983
2022-11-18 20:30:01 +01:00
Victor Feyens
c8ab8908da [FIX] developer/guidelines: do not mention deprecated xml tags
act_window & report xml tags have been deprecated by
6835aeb0de
two years ago, we should avoid mentioning them in the guidelines.

Furthermore, in 17.0 they won't be available anymore.

closes odoo/documentation#2861

X-original-commit: 758463edd4
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-10-25 18:59:54 +02:00
Xavier-Do
811510fbcb [ADD] developer/reference: add a reference page on performance
closes odoo/documentation#2793

X-original-commit: 4d8e3f9785
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-10-06 13:13:02 +02:00
Valentin Vallaeys (vava)
7de62ec00e [FIX] coding_guidelines: fix typos and add sql contraints
task-2977263

closes odoo/documentation#2701

X-original-commit: 8061470577
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
2022-09-08 19:30:43 +02:00
Antoine Vandevenne (anv)
cb8d65d5e3 [MOV] developer/misc: move all pages to a more logical location
Before this commit, the "Developer/Misc" directory of the doc, and
more particularly the "Developer/Misc/Other" sub-directory, was used as
a garbage dump where we moved all the pages that didn't fit elsewhere.
Due to that, interesting and important pages, such as the Coding
Guidelines, were buried in that directory never to be read again by Odoo
developers.

This commit moves most pages under "Misc" one or two levels up to be
located directly under "Developer" hence making them more accessible. A
new "Contributing/Development" directory is added to host the Coding
Guidelines page and soon many other pages.

task-2897143

closes odoo/documentation#2381

X-original-commit: 12ff9f118b
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-07-04 17:47:43 +02:00