documentation icon indicating copy to clipboard operation
documentation copied to clipboard

[ADD] Developer: data module tutorial

Open bouvyd opened this issue 1 year ago • 5 comments

Introduce a new tutorial about creating Odoo modules using XML data files instead of Python code.

This guide is follows closely the 'Server Framework 101' tutorial and covers the following:

  • Module structure and deployment
  • Defining models and fields
  • Setting up security and access rights
  • Creating views and actions
  • Implementing relational fields (many2one, many2many, one2many)
  • Working with computed and related fields
  • Adding business logic through server actions and automation rules
  • Creating website controllers for API endpoints

The tutorial includes practical exercises and code examples to reinforce learning, catering to developers who need to customize Odoo without writing Python code (e.g. Odoo PS-Tech employees, partners that focus on SaaS instances or author of Industry modules).

Task-4167176

bouvyd avatar Sep 19 '24 10:09 bouvyd

Pull request status dashboard

robodoo avatar Sep 19 '24 10:09 robodoo

Will need a new entry in codeowners (doc-review team i guess, same as the other tutorials?)

bouvyd avatar Sep 19 '24 10:09 bouvyd

Hey there

Thx for both your reviews!

@vava-odoo

Tiny last point: I don't know if this tutorial needs to be exhaustive, but maybe mentioning the following items, although a bit advanced wouldn't hurt:

use of <function/>

Could be a good idea, though i have few useful examples and can't really think of one that makes sense in the context of the 'Real Estate' app. Even for industry modules, i'm not convinced it's a frequent need?

add image/file as ir.attachment

You mean like adding an image in a knowledge article, or an html description, etc.? Makes sense for your case; a bit less for a ps-tech training. Could actually be included in the 'define module data' imho.

add some JS like a tour

Yes, i thought i included some info about including js files but apparently not. The tour seems like a simple enough example. (done)

add ir.model.data records to exclude from cloc

Not sure this is something that should be included in a generic tutorial that is on the documentation website? Seems more like internal stuff 🤔

bouvyd avatar Oct 16 '24 13:10 bouvyd

@AntoineVDV my newbie will need this next week, if we can merge this week it would be swell

anything missing on your end? any way i can help?

bouvyd avatar Oct 21 '24 10:10 bouvyd

I added the odoo/doc-review team as codeowner of this new tutorial to keep it simple, but we'll make sure to tag you if your review is needed for future PRs.

AntoineVDV avatar Oct 21 '24 13:10 AntoineVDV

@robodoo r+

bouvyd avatar Oct 31 '24 11:10 bouvyd