I'm new to Odoo and one area where I'm having trouble is understanding the context around the python code you can put in server actions (what I can do, and what I can't), and what I can and can't do through XML data files.
If anybody could point me to examples of addons which do this, and thorough reference documentation and/or tutorials, it would help.
Edit: Digging into the XML, I have a more specific question which could be answered by pointing me at the right documentation. I can see that you add rows to a table in the DB, using XML record tags, like so:
<record id="stock_location_locations" model="stock.location">
<field name="name">Physical Locations</field>
...snip..
</record>
Where model="" the model name, but what is the id attribute? Where can I read about what is supposed to go in there? The stock.location model doesn't have an ID field, but I would expect it to have a surrgate key called that which is managed by the ORM, so I don't know what to put there in the XML. Is it just string which is unique to the XML record tag?
An advice, you might want to pick up how to use grep. It will be an invaluable tool to search for samples within addons.
Hope this example will helps: http://learnopenerp.blogspot.com/2020/01/odoo-server-action.html