对象已移动

可在此处找到该文档 CLOC tools using ODOO CLI – New Self New Life
New Self New Life
No Result
View All Result
  • Home
  • Entertainment
  • Celebrity
  • Cinema
  • Music
  • Digital Lifestyle
  • Social Media
  • Softwares
  • Devices
  • Home
  • Entertainment
  • Celebrity
  • Cinema
  • Music
  • Digital Lifestyle
  • Social Media
  • Softwares
  • Devices
New Self New Life
No Result
View All Result
Home Softwares

CLOC tools using ODOO CLI

by admin
2 years ago
in Softwares
CLOC tools using ODOO CLI
Share on FacebookShare on Twitter


This text offers an outline of how we are able to work with the CLOC instrument in Odoo as a developer.

Earlier than beginning this tutorial, you must have a primary thought of CLI in Odoo. Should you don’t have primary information of Odoo CLI, learn a newbie information to Odoo CLI.

Why do we want CLOC Software in Odoo CLI?

  • CLOC Software in Odoo helps to rely the variety of related strains written in Python, Javascript, CSS, SCSS, or XML.
  • Counting strains of code may also help you estimate the hassle required for upkeep, debugging, and additional improvement of your Odoo customization.
  • It helps in understanding the scale and complexity of a codebase.

Earlier than transferring forward, try our Odoo improvement providers & an intensive vary of high quality Odoo Apps.

The way to use the CLOC Software in Odoo CLI?

1.) Counting the strains of code with addons path

It should rely the strains of code for all of the modules or directories which can be current within the add-ons path.

Syntax

Trying to find an skilled
Odoo Firm ?
Learn Extra


odoo-bin cloc --addons-path=addons -d my_database

Right here is the command for counting the strains of code with addons path.

./choose/odoo/odoo-bin cloc --addons-path=/choose/odoo-custom-addons -d extra-fee-check --db_host=localhost --db_user=odoo --db_password=odoo

The place, “.” denotes the present listing. “-d” or “–database” denotes the database title, and in addition if we use “-d” or “–database” then it can rely the strains of code just for put in modules.

Notice:- If we use an add-ons path for counting the strains of code. Then, we have to use db_user, db_password, db_host, and many others.. if out there in your Odoo config file.

Output for higher command

counting-line-of-code-in-cloc-tool-in-odoo-1

Right here is the command for counting the strains of code with addons path and -v or –verbose.

./choose/odoo/odoo-bin cloc --addons-path=/choose/odoo-custom-addons -d extra-fee-check --db_host=localhost --db_user=odoo --db_password=odoo -v

or

./choose/odoo/odoo-bin cloc --addons-path=/choose/odoo-custom-addons -d extra-fee-check --db_host=localhost --db_user=odoo --db_password=odoo --verbose

The place, “-v” or “–verbose” is used to point out the main points of strains counted for every file.

Output similar to this

counting-line-of-code-in-cloc-tool-in-odoo-2

2.) Counting the strains of code with the config file

It should rely the strains of code for all of the modules or directories which can be current within the add-ons path.

Learn to carry out database operations utilizing Odoo CLI.

Syntax

odoo-bin cloc -c config.conf -d my_database

Right here is the command for counting the strains of code with the config file.

./choose/odoo/odoo-bin cloc -c /and many others/odoo/odoo-server.conf -d extra-fee-check

Right here we’ve handed our {custom} config file path utilizing “-c”.

Output

counting-line-of-code-in-cloc-tool-in-odoo-usinf-config-files

Notice:- We are able to additionally use the “-v” or “–verbose” within the higher instructions.

3.) Counting the strains of code with the path of the module or listing

It should rely the strains of code for explicit modules or directories which can be current within the add-ons path.

Syntax

odoo-bin cloc -p addons/account

Right here is the command for counting the strains of code for a single module.

./choose/odoo/odoo-bin cloc -p /choose/odoo-custom-addons/variant_price_extra

The place, “-p” or “–path” denotes the add-ons path.

Output

counting-line-of-code-for-partiular-directory

Right here is one other command for counting the strains of code for a number of modules.

Syntax

odoo-bin cloc -p addons/account -p addons/sale

Right here is the code

./choose/odoo/odoo-bin cloc -p /choose/odoo-custom-addons/variant_price_extra -p /choose/odoo-custom-addons/odoo_magento_connect

Output

counting-line-of-code-in-for-multiple-directories

Notice:- We are able to additionally use the “-v” or “–verbose” within the higher instructions.

Some information are excluded from the rely by default:

  • The manifest (__manifest__.py or __openerp__.py).
  • The contents of the folder static/lib.
  • The assessments outlined within the folder assessments and static/assessments.
  • The migration scripts outlined within the folder migrations and upgrades.
  • The XML information declared within the demo or demo_xml sections of the manifest.

The way to exclude the {custom} information and directories(modules) from the rely:

This may be executed by the cloc_exclude entry within the manifest file.

Right here is the syntax of cloc_exclude:

"cloc_exclude": [
    "lib/common.py", # exclude a single file
    "data/*.xml",    # exclude all XML files in a specific folder
    "example/**/*",  # exclude all files in a folder hierarchy recursively
    "**/*.scss",     # exclude all scss file from the module
]

The sample "**/*” can be utilized to disregard a complete module. This may be helpful to exclude a module from upkeep service prices. Like as,

"cloc_exclude": [
    "**/*",     # exclude a module
]

NEED HELP?

Hope you discover the information useful! Please be at liberty to share your suggestions within the feedback beneath.

Should you nonetheless have any points/queries relating to the identical, please increase a ticket on the UV Desk.

For any doubt, contact us at our help mail.

author-thumb

ajay sharma
2 Badges

20 October 2023



Source link

Tags: CLICLOCOdooTools
Previous Post

‘Meat’ S’pore’s and Asia’s first plant-based butcher, Love Handle

Next Post

Creative Pebble V3 Artisan Edition speakers unveiled

Related Posts

Meta and UK Government launch ‘Open Source AI Fellowship’
Softwares

Meta and UK Government launch ‘Open Source AI Fellowship’

by admin
July 12, 2025
Supervised vs Unsupervised Learning: Machine Learning Overview
Softwares

Supervised vs Unsupervised Learning: Machine Learning Overview

by admin
July 10, 2025
Minor update (2) for Vivaldi Desktop Browser 7.5
Softwares

Minor update (2) for Vivaldi Desktop Browser 7.5

by admin
July 9, 2025
20+ Best Free Food Icon Sets for Designers — Speckyboy
Softwares

20+ Best Free Food Icon Sets for Designers — Speckyboy

by admin
July 8, 2025
Luna v1.0 & FlexQAOA bring constraint-aware quantum optimization to real-world problems
Softwares

Luna v1.0 & FlexQAOA bring constraint-aware quantum optimization to real-world problems

by admin
July 7, 2025
Next Post
Creative Pebble V3 Artisan Edition speakers unveiled

Creative Pebble V3 Artisan Edition speakers unveiled

AI Photos Of Celebrities With Normal Jobs

AI Photos Of Celebrities With Normal Jobs

  • Trending
  • Comments
  • Latest
Kanye West entry visa revoked by Australia after ‘Heil Hitler’ song release – National

Kanye West entry visa revoked by Australia after ‘Heil Hitler’ song release – National

July 3, 2025
CBackup Review: Secure and Free Online Cloud Backup Service

CBackup Review: Secure and Free Online Cloud Backup Service

September 18, 2021
Every Van Halen Album, Ranked 

Every Van Halen Album, Ranked 

August 12, 2024
I Tried Calocurb For 90 Days. Here’s My Review.

I Tried Calocurb For 90 Days. Here’s My Review.

January 8, 2025
Bones: All Of Brennan’s Interns, Ranked

Bones: All Of Brennan’s Interns, Ranked

June 15, 2021
Get to Know Ronnie Shacklett – Hollywood Life

Get to Know Ronnie Shacklett – Hollywood Life

December 6, 2023
5 ’90s Alternative Rock Bands That Should’ve Been Bigger

5 ’90s Alternative Rock Bands That Should’ve Been Bigger

April 13, 2025
Clevo CO Review – A Complete Company Details

Clevo CO Review – A Complete Company Details

January 19, 2024
Jeff Lynne Pulls Out of Final ELO Show — See His Statement

Jeff Lynne Pulls Out of Final ELO Show — See His Statement

July 12, 2025
Crypto Billionaire Justin Sun Buys Another $100 Million of Trump’s Memecoin

Crypto Billionaire Justin Sun Buys Another $100 Million of Trump’s Memecoin

July 12, 2025
Paris Haute Couture Week 2025 Best Looks

Paris Haute Couture Week 2025 Best Looks

July 12, 2025
It’s the last day to get up to 50 percent off air fryers, Instant Pots, blenders and more

It’s the last day to get up to 50 percent off air fryers, Instant Pots, blenders and more

July 11, 2025
Hey r/movies! We’re Courtney Stephens and Callie Hernandez, the filmmakers of the recent meta-fictional, experimental feature film INVENTION, that’s now streaming on Mubi. You might also know Callie from La La Land, Alien: Covenant, Blair Witch, Under the Silver Lake, The Endless. Ask us anything!

Hey r/movies! We’re Courtney Stephens and Callie Hernandez, the filmmakers of the recent meta-fictional, experimental feature film INVENTION, that’s now streaming on Mubi. You might also know Callie from La La Land, Alien: Covenant, Blair Witch, Under the Silver Lake, The Endless. Ask us anything!

July 12, 2025
Meta and UK Government launch ‘Open Source AI Fellowship’

Meta and UK Government launch ‘Open Source AI Fellowship’

July 12, 2025
Best Amazon Prime Day 2025 Alternative Sales: Walmart, Target & More

Best Amazon Prime Day 2025 Alternative Sales: Walmart, Target & More

July 11, 2025
Michael Strahan’s extended silence raises questions during GMA absence

Michael Strahan’s extended silence raises questions during GMA absence

July 11, 2025
New Self New Life

Your source for entertainment news, celebrities, celebrity news, and Music, Cinema, Digital Lifestyle and Social Media and More !

Categories

  • Celebrity
  • Cinema
  • Devices
  • Digital Lifestyle
  • Entertainment
  • Music
  • Social Media
  • Softwares
  • Uncategorized

Recent Posts

  • Jeff Lynne Pulls Out of Final ELO Show — See His Statement
  • Crypto Billionaire Justin Sun Buys Another $100 Million of Trump’s Memecoin
  • Paris Haute Couture Week 2025 Best Looks
  • Home
  • Disclaimer
  • DMCA
  • Privacy Policy
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact us

Copyright © 2021 New Self New Life.
New Self New Life is not responsible for the content of external sites. slotsfree  creator solana token

No Result
View All Result
  • Home
  • Entertainment
  • Celebrity
  • Cinema
  • Music
  • Digital Lifestyle
  • Social Media
  • Softwares
  • Devices

Copyright © 2021 New Self New Life.
New Self New Life is not responsible for the content of external sites.

New Self New Life