Dear all, Concerning Model attributes, it was mentioned as following in “Odoo 10 Development Essentials - Daniel Reis”:
_table is the name of the database table supporting the model. Usually, it is left to be calculated automatically, and is the model name with the dots replaced by underscores. But it's possible to set to indicate a specific table name.
Does it mean that Odoo also support short table name, like: pur_line,sale_line, ect? If it is "yes", how the short table name will affect the related .py and .xml file for a new model?
Any advice will be highly appreciated, thanks! Henry
_name = 'todo.task'
it's convert into database as todo_task
it's default behave of _table
all over in odoo you use self.env['todo.task'] to access this model.
and in database it's todo_task
if you do
_name = 'todo.task'
_table = 'etc'
then you use in odoo todo.task and in database table created etc