Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
1500 Lượt xem

Hello,

I understand that Odoo charges for “Custom Code Maintenance” per 100 lines of code per year, especially for custom modules and Odoo Studio customizations (e.g., automated actions, computed fields, etc.).

I’m a bit confused about:

  • How can I know how many lines of custom code I currently have?
  • What exactly is counted: only Python code, automated actions, computed fields, or even small Studio changes?
  • How can I identify which fields or models are considered “untouchable” or will lead to extra charges if customized?
  • If Odoo releases a major upgrade, will my customizations or Studio changes be affected or break?

It would help to have guidance or tools to measure or track this, and to understand what happens during upgrades.

Thanks in advance for your help!

Ảnh đại diện
Huỷ bỏ
Tác giả

I am using web Odoo and not community. Is it possible to check in Web?

Câu trả lời hay nhất

This method works with Odoo Online / Odoo.sh and Odoo On Premise:


Create a Server Action of type Execute Code.


Copy/Paste version of the Code

raise UserError(str(env['publisher_warranty.contract']._get_verbose_maintenance()))


Example Output

This shows:

  • A Server Action with ID 807 has 1 line of code and 1 total line
  • A Custom Field with ID 16582 has 4 lines of code and 7 total lines (comments/blanks)


Note: the Server Action itself will generate a line of code, so be sure to identify the ID of it (via the URL) so you can exclude it. (In this example it is the Server Action with ID 807)

Also, delete the Server Action after use so the LOC count for it will update to not include it.


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

You can use this module it will help you to resolve some of your query like the number code line etc

apps.odoo.com/apps/modules/18.0/odoo_health_report


Hope it helps

Ảnh đại diện
Huỷ bỏ
Tác giả

Does this module will help calculating number of code for web Odoo?

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 24
2476
1
thg 2 24
2294
1
thg 12 21
3743
2
thg 1 21
3347
2
thg 8 19
1669