I am working through the developer tutorial [here][1].
I have added two `action` buttons to a tree view.
Everything worked fine until I restarted the server after adding the `button` tags to the XML `view`. I then received the following error:
```
Traceback (most recent call last):
File "/home/keith/src/odoo/odoo/service/server.py", line 1246, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/odoo/modules/registry.py", line 87, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/odoo/modules/loading.py", line 470, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/odoo/modules/loading.py", line 363, in load_marked_modules
loaded, processed = load_module_graph(
File "/odoo/modules/loading.py", line 222, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "/odoo/modules/loading.py", line 69, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "/odoo/tools/convert.py", line 745, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "/odoo/tools/convert.py", line 811, in convert_xml_import
obj.parse(doc.getroot())
File "/odoo/tools/convert.py", line 731, in parse
self._tag_root(de)
File "/odoo/tools/convert.py", line 691, in _tag_root
raise ParseError(msg) from None # Restart with "--log-handler odoo\.tools\.convert:DEBUG"\ for\ complete\ traceback
odoo\.tools\.convert\.ParseError:\ while\ parsing\ /custom/estate/views/estate_property_offer_views\.xml:3
Invalid\ view\ estate\.property\.offer\.tree\ \(estate\.estate_property_offer_view_tree\)\ definition\ in\ estate/views/estate_property_offer_views\.xml
View\ error\ context:
'\-no\ context\-'
```
If\ I\ remove\ the\ button\ tags,\ the\ server\ starts\ without\ error
\(`\./odoo\-bin\ \-\-addons\-path=\.\./custom,addons\ \-d\ rd\-demo\ \-u\ estate\ \-\-dev\ xml`\)\.
I\ can\ then\ add\ the\ buttons\ back\ and\ they\ work\ correctly\ but\ as\ soon\ as\ I\ restart\ the\ server,\ I\ get\ the\ error\ again\.
Here\ is\ the\ complete\ record\ from\ the\ `view`:
```
\ \ \ \ "\ rel="ugc">ir\.ui\.view">
\ \ \ \ \ \ \ \ estate\.property\.offer\.tree
\ \ \ \ \ \ \ \ estate\.property\.offer
\ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \
\ \ \ \
```
\ \ \[1\]:\ https://www.odoo.com/documentation/15.0/developer/howtos/rdtraining/10_actions.html
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ờ
1
Trả lời
6374
Lượt xem
This was answered here: https://stackoverflow.com/questions/70652196/odoo-tools-convert-parseerror-when-restarting-odoo-bin/70654854#70654854
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 | |
---|---|---|---|---|
|
3
thg 4 24
|
9625 | ||
|
1
thg 6 22
|
6179 | ||
|
6
thg 9 17
|
8267 | ||
|
1
thg 3 15
|
4479 | ||
|
2
thg 3 15
|
9978 |
if you are new to odoo, check this tutorials: https://www.youtube.com/watch?v=DJyPx5u6sd0&list=PLqRRLx0cl0homY1elJbSoWfeQbRKJ-oPO
---- On Mon, 10 Jan 2022 14:26:47 +0100 niyasraphyk@gmail.com wrote ----