[MERGE] forward port branch saas-14 up to 6441ea28b3
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<record id="reset_password_email" model="mail.template">
|
||||
<field name="name">Auth Signup: Reset Password</field>
|
||||
<field name="model_id" ref="base.model_res_users"/>
|
||||
<field name="email_from"><![CDATA[${object.company_id.name} <${(object.company_id.email or user.email)|safe}>]]></field>
|
||||
<field name="email_from"><![CDATA["${object.company_id.name|safe}" <${(object.company_id.email or user.email)|safe}>]]></field>
|
||||
<field name="email_to">${object.email|safe}</field>
|
||||
<field name="subject">Password reset</field>
|
||||
<field name="body_html"><![CDATA[
|
||||
@@ -56,7 +56,7 @@
|
||||
<record id="set_password_email" model="mail.template">
|
||||
<field name="name">Auth Signup: Odoo Connection</field>
|
||||
<field name="model_id" ref="base.model_res_users"/>
|
||||
<field name="email_from"><![CDATA[${object.company_id.name} <${(object.company_id.email or user.email)|safe}>]]></field>
|
||||
<field name="email_from"><![CDATA["${object.company_id.name|safe}" <${(object.company_id.email or user.email)|safe}>]]></field>
|
||||
<field name="email_to">${object.email|safe}</field>
|
||||
<field name="subject"><![CDATA[${object.company_id.name} invitation to connect on Odoo]]></field>
|
||||
<field name="body_html"><![CDATA[
|
||||
|
||||
@@ -550,3 +550,11 @@ class HrExpenseSheet(models.Model):
|
||||
res['domain'] = [('id', 'in', self.mapped('account_move_id').ids)]
|
||||
res['context'] = {}
|
||||
return res
|
||||
|
||||
|
||||
@api.one
|
||||
@api.constrains('expense_line_ids')
|
||||
def _check_employee(self):
|
||||
employee_ids = self.expense_line_ids.mapped('employee_id')
|
||||
if len(employee_ids) > 1 or (len(employee_ids) == 1 and employee_ids != self.employee_id):
|
||||
raise ValidationError(_('You cannot add expense lines of another employee.'))
|
||||
@@ -18,7 +18,7 @@
|
||||
% set access_action = object.with_context(force_website=True).get_access_action()
|
||||
% set doc_name = 'quotation' if object.state in ('draft', 'sent') else 'order confirmation'
|
||||
% set is_online = access_action and access_action['type'] == 'ir.actions.act_url'
|
||||
% 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 access_action['url'] or ''
|
||||
|
||||
% if object.partner_id.parent_id:
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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'])
|
||||
|
||||
@@ -130,7 +130,7 @@ function parse_value (value, descriptor, value_if_empty) {
|
||||
} while(tmp !== value);
|
||||
tmp = Number(value);
|
||||
// do not accept not numbers or float values
|
||||
if (isNaN(tmp) || tmp % 1)
|
||||
if (isNaN(tmp) || tmp % 1 || tmp < -2147483648 || tmp > 2147483647)
|
||||
throw new Error(_.str.sprintf(_t("'%s' is not a correct integer"), value));
|
||||
return tmp;
|
||||
case 'monetary':
|
||||
|
||||
@@ -700,17 +700,17 @@ var CalendarView = View.extend({
|
||||
date_start_day = new Date(event.start.getFullYear(),event.start.getMonth(),event.start.getDate(),7);
|
||||
date_stop_day = new Date(event_end.getFullYear(),event_end.getMonth(),event_end.getDate(),19);
|
||||
}
|
||||
data[this.date_start] = time.datetime_to_str(date_start_day);
|
||||
data[this.date_start] = time.auto_date_to_str(date_start_day, this.fields[this.date_start].type);
|
||||
if (this.date_stop) {
|
||||
data[this.date_stop] = time.datetime_to_str(date_stop_day);
|
||||
data[this.date_stop] = time.auto_date_to_str(date_stop_day, this.fields[this.date_stop].type);
|
||||
}
|
||||
diff_seconds = Math.round((date_stop_day.getTime() - date_start_day.getTime()) / 1000);
|
||||
|
||||
}
|
||||
else {
|
||||
data[this.date_start] = time.datetime_to_str(event.start);
|
||||
data[this.date_start] = time.auto_date_to_str(event.start, this.fields[this.date_start].type);
|
||||
if (this.date_stop) {
|
||||
data[this.date_stop] = time.datetime_to_str(event_end);
|
||||
data[this.date_stop] = time.auto_date_to_str(event_end, this.fields[this.date_stop].type);
|
||||
}
|
||||
diff_seconds = Math.round((event_end.getTime() - event.start.getTime()) / 1000);
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
<record id="validation_email" model="mail.template">
|
||||
<field name="name">Forum: Email Verification</field>
|
||||
<field name="model_id" ref="base.model_res_users"/>
|
||||
<field name="email_from"><![CDATA[${object.company_id.name} <${(object.company_id.email or user.email)|safe}>]]></field>
|
||||
<field name="email_from"><![CDATA["${object.company_id.name|safe}" <${(object.company_id.email or user.email)|safe}>]]></field>
|
||||
<field name="email_to">${object.email|safe}</field>
|
||||
<field name="subject"><![CDATA[${object.company_id.name} Forums validation]]></field>
|
||||
<field name="body_html"><![CDATA[
|
||||
|
||||
@@ -10,4 +10,14 @@
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_unlink" eval="False"/>
|
||||
</record>
|
||||
<record id="hr_employee_portal" model="ir.rule">
|
||||
<field name="name">hr_employee: Portal</field>
|
||||
<field name="model_id" ref="hr.model_hr_employee"/>
|
||||
<field name="domain_force">[('website_published', '=', True)]</field>
|
||||
<field name="groups" eval="[(4, ref('base.group_portal'))]"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_unlink" eval="False"/>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -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
|
||||
|
||||
|
@@ -0,0 +1,26 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * website_sale
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.saas~14\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-02-08 09:59+0000\n"
|
||||
"PO-Revision-Date: 2017-02-08 09:59+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: website_sale
|
||||
#: model:ir.ui.menu,name:website_sale.menu_orders_abandonned_orders
|
||||
msgid "Abandonned Orders"
|
||||
msgstr "Abandoned Orders"
|
||||
|
||||
#. module: website_sale
|
||||
#: model:ir.actions.act_window,name:website_sale.action_abandonned_orders_ecommerce
|
||||
msgid "Abandonned eCommerce Orders"
|
||||
msgstr "Abandoned eCommerce Orders"
|
||||
@@ -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
|
||||
@@ -1442,16 +1442,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,
|
||||
|
||||
Reference in New Issue
Block a user