Resources#
https://www.cybrosys.com/blog/how-to-add-a-create-button-near-tree-kanban-view-in-odoo-15
odoo/addons/account/static/src/xml/bills_upload_views.xml
old styleodoo/addons/project/static/src/js/project_kanban.js
new style
Add Wizard#
Just a few notes.
create
tjiko/tjiko_project/models/wizard.py
update
tjiko/tjiko_project/models/__init__.py
create
tjiko/tjiko_project/views/wizard.xml
update
tjiko/tjiko_project/__manifest__.py
Model:
class Wizard(models.TransientModel):
_name = 'tjiko_project.wizard'
_description = '...'
...
def button_continue(self):
...
new_project = self.env['project.project'].create({})
return {
"type": "ir.actions.act_window",
"res_model": 'project.project',
"res_id": new_project.id,
"view_mode": "form",
}
View:
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="wizard" model="ir.ui.view">
<field name="name">tjiko_project.wizard</field>
<field name="model">tjiko_project.wizard</field>
<field name="mode">primary</field>
<field name="arch" type="xml">
<form>
<footer>
<button
string="OK"
class="oe_highlight"
name="button_continue"
type="object"
/>
<button string="Cancel" class="btn-secondary" special="cancel"/>
</footer>
</form>
</field>
</record>
</odoo>
TIL: odoo scaffold
Einkaufszettel