2026 Mexican ERP System
Odoo custom module for SAT/CFDI 4.0 — modules, menus, security, views
Need SAT and CFDI 4.0 compliance
Somehow docker with my local github code didn't work, need to use the docker image
Odoo:
Enable developer mode to load custom modules
Module:
Manifest File: Define module name, description etc
- Icon goes in modulename-static-description
Model: (Normal, Wizzard, ?)
- modulename-models
- Python class: _name, _description, fields.Char()
Menu: (Main menu, Sub Menu, Action Menu)
-
Needs to be loaded last into the manifest
- 'data':["other action xml", "path of menu xml"]
-
Defined in an XML file
-
modulename-views-modulename_menus.xml
-
<odoo><menuitem id="" name="" action="" (parent) sequence="" web_icon="" > </odoo>
-
Have window action saved as xml and called by action of menu
-
-
Action: Window action, Server action, Report action (generate report), URL action (redirecting), Client Action (JS action), Scheduled Action
Security:
-
Acess control list (create read update delete) ir.model.access.csv
-
modulename-security-ir.model.access.csv
- Id, name, model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-
Add to manifest in data
-
-
Record Rules security.xml: res.group
- User Groups, Category_id, Implied_id
Fields
- Simple Fields: Text field, Multipline text, integer, decimal, monetary, html, date (date&time, remaining, date range), selection, priority, file, image, binary
- Relational Fields: Many2One, One2Many, Many2Many
- Properties / Attributes: Invisible, Label, Helptooltip, Required, Readonly, Widget (appearance of bool), Placeholder, Defaultvalue, Form Attribute: Create (if user can create new record or not), Edit, Delete, Groups (permissions)
Addon: web_responsive: Nice interface
Views
- Form, List(Tree), Kanban, Search, graph, pivot, calendar, activity, map, cohort
- Form view: Sheet-group-form, notebook-page