Dear python and odoo community,
What standards / conventions / guidelines do you follow to write beautiful, clean and durable code? Also, how do you make sure that everyone follows them? It can be set as a rule, but how do you ensure that it's respected by all?
I know many people don't see the benefit of a pythonic code, but working with teams and people from different backgrounds and cultures, I always find it's necessary to have some "ground rules" to ensure quality and results, since trying to decrypt a malformed code can be quite frustrating and time consuming
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
Hi,
Odoo has own code guiedlines: https://www.odoo.com/documentation/12.0/reference/guidelines.html. It is reasonable to follow them, plus PEP8 - https://www.python.org/dev/peps/pep-0008/.
Controlling is a sort of complex issue. I guess, here are 2 main ways (to combine):
Automatic tests and, ideally, implemented system of continuous deployment (https://en.wikipedia.org/wiki/Continuous_deployment)
Carefully merge requests check for each commit (not all guidelines might be checked automatically)
The process of introducing such changes would be painful :)
pep20, pep8, pep257 and odoo guidelines
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
2
thg 8 25
|
2407 | ||
|
1
thg 6 24
|
2120 | ||
|
3
thg 2 25
|
3762 | ||
|
0
thg 5 24
|
46 | ||
|
1
thg 4 24
|
3486 |
In my case field name will be....
For many2one:
user_id
for one2many:
user_ids
for many2many
user_ids
for boolean:
is_record
for char:
name
reference: https://learnopenerp.tumblr.com/