diff --git a/addons/account/wizard/account_financial_report.py b/addons/account/wizard/account_financial_report.py index aca71bfc333..7712d1fa9cb 100644 --- a/addons/account/wizard/account_financial_report.py +++ b/addons/account/wizard/account_financial_report.py @@ -48,4 +48,4 @@ class AccountingReport(models.TransientModel): def _print_report(self, data): data['form'].update(self.read(['date_from_cmp', 'debit_credit', 'date_to_cmp', 'filter_cmp', 'account_report_id', 'enable_filter', 'label_filter', 'target_move'])[0]) - return self.env['report'].get_action(self, 'account.report_financial', data=data) + return self.env['report'].get_action(self, 'account.report_financial', data=data, config=False) diff --git a/addons/auth_signup/data/auth_signup_data.xml b/addons/auth_signup/data/auth_signup_data.xml index 2cc3d07195c..2b6ceeeed79 100644 --- a/addons/auth_signup/data/auth_signup_data.xml +++ b/addons/auth_signup/data/auth_signup_data.xml @@ -20,7 +20,7 @@ Auth Signup: Reset Password - ]]> + ]]> ${object.email|safe} Password reset Auth Signup: Odoo Connection - ]]> + ]]> ${object.email|safe} 1 or (len(employee_ids) == 1 and employee_ids != self.employee_id): + raise ValidationError(_('You cannot add expense lines of another employee.')) \ No newline at end of file diff --git a/addons/sale/data/mail_template_data.xml b/addons/sale/data/mail_template_data.xml index 72b2dae500c..23eaa72eac3 100644 --- a/addons/sale/data/mail_template_data.xml +++ b/addons/sale/data/mail_template_data.xml @@ -18,7 +18,7 @@ % set access_action = object.with_context(force_website=True).get_access_action() % set is_online = access_action and access_action['type'] == 'ir.actions.act_url' % set doc_name = 'quotation' if object.state in ('draft', 'sent') else 'order confirmation' -% set access_name = is_online and object.template_id and 'Accept and pay %s online' % doc_name or 'View %s' % doc_name +% set access_name = is_online and object.template_id and doc_name == 'quotation' and 'Accept and pay %s online' % doc_name or 'View %s' % doc_name % set access_url = is_online and '/mail/view?model=sale.order&res_id=%d' % (object.id) or '' % if object.partner_id.parent_id: diff --git a/addons/sale/models/account_invoice.py b/addons/sale/models/account_invoice.py index 3d61900129d..dcd930d3eb1 100644 --- a/addons/sale/models/account_invoice.py +++ b/addons/sale/models/account_invoice.py @@ -101,4 +101,4 @@ class AccountInvoiceLine(models.Model): layout_category_id = fields.Many2one('sale.layout_category', string='Section') layout_category_sequence = fields.Integer( related='layout_category_id.sequence', - string='Layout Sequence', store=True, default=0) + string='Layout Sequence', store=True) diff --git a/addons/stock/models/stock_warehouse.py b/addons/stock/models/stock_warehouse.py index 9242aeefa2a..bb4916e30de 100644 --- a/addons/stock/models/stock_warehouse.py +++ b/addons/stock/models/stock_warehouse.py @@ -611,7 +611,8 @@ class Warehouse(models.Model): pull.write({'name': pull.name.replace(warehouse.name, new_name, 1)}) for push in route.push_ids: push.write({'name': push.name.replace(warehouse.name, new_name, 1)}) - warehouse.mto_pull_id.write({'name': warehouse.mto_pull_id.name.replace(warehouse.name, new_name, 1)}) + if warehouse.mto_pull_id: + warehouse.mto_pull_id.write({'name': warehouse.mto_pull_id.name.replace(warehouse.name, new_name, 1)}) for warehouse in self: sequence_data = warehouse._get_sequence_values() warehouse.in_type_id.sequence_id.write(sequence_data['in_type_id']) diff --git a/addons/web/static/src/js/fields/field_utils.js b/addons/web/static/src/js/fields/field_utils.js index 534ae68bbf5..afc15b7a882 100644 --- a/addons/web/static/src/js/fields/field_utils.js +++ b/addons/web/static/src/js/fields/field_utils.js @@ -392,7 +392,7 @@ function parseInteger(value) { value = value.replace(new RegExp(core._t.database.parameters.thousands_sep, "g"), ''); var parsed = Number(value); // do not accept not numbers or float values - if (isNaN(parsed) || parsed % 1) { + if (isNaN(parsed) || parsed % 1 || parsed < -2147483648 || parsed > 2147483647) { throw new Error(_.str.sprintf(core._t("'%s' is not a correct integer"), value)); } return parsed; diff --git a/addons/website_forum/data/forum_data.xml b/addons/website_forum/data/forum_data.xml index b4a2a56ceba..939fac46191 100644 --- a/addons/website_forum/data/forum_data.xml +++ b/addons/website_forum/data/forum_data.xml @@ -138,7 +138,7 @@ Forum: Email Verification - ]]> + ]]> ${object.email|safe} + + hr_employee: Portal + + [('website_published', '=', True)] + + + + + + \ No newline at end of file diff --git a/addons/website_hr/security/ir.model.access.csv b/addons/website_hr/security/ir.model.access.csv index 6f038a47ba9..53be505e42e 100644 --- a/addons/website_hr/security/ir.model.access.csv +++ b/addons/website_hr/security/ir.model.access.csv @@ -1,3 +1,5 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_hr_employee_public,hr.employee.public,hr.model_hr_employee,base.group_public,1,0,0,0 +access_hr_employee_portal,hr.employee.portal,hr.model_hr_employee,base.group_portal,1,0,0,0 access_resource_public,resource.resource.public,resource.model_resource_resource,base.group_public,1,0,0,0 +access_resource_portal,resource.resource.portal,resource.model_resource_resource,base.group_portal,1,0,0,0 diff --git a/doc/cla/corporate/boolit.md b/doc/cla/corporate/boolit.md new file mode 100644 index 00000000000..855d545d408 --- /dev/null +++ b/doc/cla/corporate/boolit.md @@ -0,0 +1,16 @@ +Lithuania, 2017-01-26 + +Boolit JSC agrees to the terms of the Odoo Corporate Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Andrius Laukavičius dev@boolit.eu https://github.com/oerp-odoo + +List of contributors: + +Dainius Kaniava dka@boolit.eu https://github.com/boolit-dka +Andrius Laukavičius dev@boolit.eu https://github.com/oerp-odoo diff --git a/odoo/addons/base/ir/ir_model.py b/odoo/addons/base/ir/ir_model.py index c6879746be8..ef41aedfb7e 100644 --- a/odoo/addons/base/ir/ir_model.py +++ b/odoo/addons/base/ir/ir_model.py @@ -1440,16 +1440,22 @@ class IrModelData(models.Model): record = record.create(values) if xml_id: - for parent_model, parent_field in record._inherits.iteritems(): - if parent_model in existing_parents: - continue - self.sudo().create({ - 'name': xml_id + '_' + parent_model.replace('.', '_'), - 'model': parent_model, - 'module': module, - 'res_id': record[parent_field].id, - 'noupdate': noupdate, - }) + #To add an external identifiers to all inherits model + inherit_models = [record] + while inherit_models: + current_model = inherit_models.pop() + for parent_model_name, parent_field in current_model._inherits.iteritems(): + inherit_models.append(self.env[parent_model_name]) + if parent_model_name in existing_parents: + continue + self.sudo().create({ + 'name': xml_id + '_' + parent_model_name.replace('.', '_'), + 'model': parent_model_name, + 'module': module, + 'res_id': record[parent_field].id, + 'noupdate': noupdate, + }) + existing_parents.add(parent_model_name) self.sudo().create({ 'name': xml_id, 'model': model, diff --git a/odoo/tools/sql.py b/odoo/tools/sql.py index bd947dd913c..c4e9a143a8e 100644 --- a/odoo/tools/sql.py +++ b/odoo/tools/sql.py @@ -77,12 +77,14 @@ def convert_column(cr, tablename, columnname, columntype): log_exceptions=False) except psycopg2.NotSupportedError: # can't do inplace change -> use a casted temp column - query = 'ALTER TABLE "{0}" RENAME COLUMN "{1}" TO __temp_type_cast; ' \ - 'ALTER TABLE "{0}" ADD COLUMN "{1}" {2}; ' \ - 'UPDATE "{0}" SET "{1}"= __temp_type_cast::{2}' \ - 'ALTER TABLE "{0}" DROP COLUMN __temp_type_cast CASCADE' - cr.execute(query.format(tablename, columntype, columntype)) - _schema.debug("Table %r: column %r changed to type %s", tablename, columntype, columntype) + query = ''' + ALTER TABLE "{0}" RENAME COLUMN "{1}" TO __temp_type_cast; + ALTER TABLE "{0}" ADD COLUMN "{1}" {2}; + UPDATE "{0}" SET "{1}"= __temp_type_cast::{2}; + ALTER TABLE "{0}" DROP COLUMN __temp_type_cast CASCADE; + ''' + cr.execute(query.format(tablename, columnname, columntype)) + _schema.debug("Table %r: column %r changed to type %s", tablename, columnname, columntype) def set_not_null(cr, tablename, columnname): """ Add a NOT NULL constraint on the given column. """