_columns = {
#This fills the Many2one with all data from res.currency
'currency_id_invoices': fields.many2one('res.currency', string="Valuta", required=True),
_defaults = {
#This makes the function go off that sets EUR.
'currency_id_invoices': _get_default_currency,
Changes in sale_view.xml:
<field name="currency_id_invoices"/>
<h3>Module scheduler_demo</h3>
This module is a new module, from scratch, which creates a new model (scheduler.demo), new views and an automated action (scheduler). This module will learn you how to create an automated action from scratch, how to loop over all records in a model and how to update those values from within a scheduler.
<h3>Module static_resources_demo</h3>
This module is a new module, from scratch which creates a new CSS and JavaScript file.
This module will learn you how to create new static files and how to add them to the main Odoo CSS / JavaScript.
<h3>Module statusbar_demo</h3>
This module is a new module, from scratch, which creates a new model (statusbar.demo) and new views.
This module will learn you how to create a statusbar (selection) and how to handle different states and writing on the current record. You will learn how to add buttons, how to trigger functions and how to change the state of your record.
<h3>Module upload_images</h3>
This module is a new module, from scratch, which creates a new model (upload_images.tutorial), a new report (report_images.xml) and a new menu_item named 'Images' under Sales. In this new menu item you can upload images in multiple sizes and you will see a new report detail here. With this report you will see the image printed in multiple sizes.
<h3>Module user_access_rights_demo</h3>
This module creates a new security selection on the user settings. This allows you to add users to groups under Settings > Users and gives you the ability to show views and fields only to specific user groups.
<h3>Module web_widget_color</h3>
This module adds a colour picker widget to Odoo. The picker itself is inspired on the <a href="http://jscolor.com">jsColor </a> library.
To use this widget you need to create a char field in with a size of atleast 7 characters in the database:
color = fields.Char(
string="Color",
help="Choose your color"
)
Afterwards call it in the view with ```widget="color"```: