When deinstalling a module, the server deletes its records when possible.
There is an issue when deleting a record is not possible: deleting its xmlid
will introduce duplicate records when the module is installed again. Therefore
one should not delete its xmlid.
In case of syntax error, show where the error is.
e.message is enmpty for syntax errors
Before:
Can't validate view:
After:
Can't validate view:
SyntaxError('invalid syntax', ('', 1, 51, "{'invisible': [('external_sale', '=', 'internal')]]}"))
by auto-extending addons path with odoo.addons.__path__.
This patch also introduce
* an explicit declaration of odoo.addons as a namespace package
This is necessary because the standard way of declaring namespace
packages in setup.py does not work as long as odoo/__init__.py
contains code.
* a more reliable way to find odoo root path.
and move it under the setup package. Since the rename of the
openerp directory into odoo, having a script named "odoo.py"
conflicts with a package named "odoo".
The combinaison of `web_icon` and `web_icon_data` is used
to determine if the menu has:
* no icon
* an image icon: [module, path]
* a built icon: [icon_class, icon_color, background_color]
This allows people to create modules under the 'Odoo Proprietary
License' version 1.0 rather than having to rely on the rather vague
'Other Priorietary' license.
The text of the license can be found at:
https://www.odoo.com/loempia/static/examples/LICENSE
This should already have been in Odoo 9 but was mistakenly left out.
It will be used in various email templates to avoid having either badly
formatted emails either not formatted emails. As this is a not stored
function field it does not impact model.
It often occurs that users get nasty error messages like "missing value
for column xxx" when trying to create objects. It can happen if the
objects uses a sequence as default value that is not defined in an
available company.
We try to give a hint to the glory support person who could be confused
by that.
The dictionary `_group_by_full` is replaced by a field parameter `group_expand`
that is assigned to the method name. The API of the method has been simplified
as well:
@api.multi
def _read_group_stage_ids(self, domain, read_group_order=None, access_rights_uid=None):
# the stages are given by self.ids (wrong model);
# read_group_order is the order given to read_group() on self;
# return stages.name_get(), {stage.id: stage.fold)
_group_by_full = {'stage_id': _read_group_stage_ids}
is now written:
stage_id = fields.Many2one(..., group_expand='_read_group_stage_ids')
@api.model
def _read_group_stage_ids(self, stages, domain, order):
# stages is a recordset;
# order is the order to use on stages' model;
# return a recordset which is a superset of stages