diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index 966a7e08033..0f788c666ee 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -39,7 +39,7 @@ class AccountInvoice(models.Model): _order = "date_invoice desc, number desc, id desc" @api.one - @api.depends('invoice_line_ids.price_subtotal', 'tax_line_ids.amount', 'currency_id', 'company_id') + @api.depends('invoice_line_ids.price_subtotal', 'tax_line_ids.amount', 'currency_id', 'company_id', 'date_invoice') def _compute_amount(self): self.amount_untaxed = sum(line.price_subtotal for line in self.invoice_line_ids) self.amount_tax = sum(line.amount for line in self.tax_line_ids) @@ -47,8 +47,9 @@ class AccountInvoice(models.Model): amount_total_company_signed = self.amount_total amount_untaxed_signed = self.amount_untaxed if self.currency_id and self.currency_id != self.company_id.currency_id: - amount_total_company_signed = self.currency_id.compute(self.amount_total, self.company_id.currency_id) - amount_untaxed_signed = self.currency_id.compute(self.amount_untaxed, self.company_id.currency_id) + currency_id = self.currency_id.with_context(date=self.date_invoice) + amount_total_company_signed = currency_id.compute(self.amount_total, self.company_id.currency_id) + amount_untaxed_signed = currency_id.compute(self.amount_untaxed, self.company_id.currency_id) sign = self.type in ['in_refund', 'out_refund'] and -1 or 1 self.amount_total_company_signed = amount_total_company_signed * sign self.amount_total_signed = self.amount_total * sign diff --git a/addons/calendar/calendar.py b/addons/calendar/calendar.py index 1cc4e4b771b..ab7e11837f5 100644 --- a/addons/calendar/calendar.py +++ b/addons/calendar/calendar.py @@ -1063,6 +1063,7 @@ class calendar_event(osv.Model): attendees[att.partner_id.id] = True new_attendees = [] new_att_partner_ids = [] + attendees_to_mail = [] for partner in event.partner_ids: if partner.id in attendees: continue @@ -1084,7 +1085,7 @@ class calendar_event(osv.Model): if not current_user.email or current_user.email != partner.email: mail_from = current_user.email or tools.config.get('email_from', False) if not context.get('no_email'): - self.pool['calendar.attendee']._send_mail_to_attendees(cr, uid, att_id, email_from=mail_from, context=context) + attendees_to_mail.append((att_id, mail_from, partner.name)) if new_attendees: self.write(cr, uid, [event.id], {'attendee_ids': [(4, att) for att in new_attendees]}, context=context) @@ -1104,6 +1105,9 @@ class calendar_event(osv.Model): if attendee_ids_to_remove: self.pool['calendar.attendee'].unlink(cr, uid, attendee_ids_to_remove, context) + for att_id, mail_from, partner_name in attendees_to_mail: + self.pool['calendar.attendee']._send_mail_to_attendees(cr, uid, att_id, email_from=mail_from, context=context) + res[event.id] = { 'new_attendee_ids': new_attendees, 'old_attendee_ids': all_attendee_ids, diff --git a/addons/hr_expense/models/hr_expense.py b/addons/hr_expense/models/hr_expense.py index 01ca6364ee9..e8ce21a41b3 100644 --- a/addons/hr_expense/models/hr_expense.py +++ b/addons/hr_expense/models/hr_expense.py @@ -295,7 +295,7 @@ class HrExpense(models.Model): # Calculate tax lines and adjust base line taxes = expense.tax_ids.compute_all(expense.unit_amount, expense.currency_id, expense.quantity, expense.product_id) account_move[-1]['price'] = taxes['total_excluded'] - account_move[-1]['tax_ids'] = expense.tax_ids.id + account_move[-1]['tax_ids'] = expense.tax_ids.ids for tax in taxes['taxes']: account_move.append({ 'type': 'tax', diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 3c77c1dfcf9..14a0741ba43 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -299,10 +299,6 @@ class hr_holidays(osv.osv): the date_from. Also update the number_of_days. """ - # date_to has to be greater than date_from - if (date_from and date_to) and (date_from > date_to): - raise UserError(_('The start date must be anterior to the end date.')) - result = {'value': {}} # No date_to set so far: automatically compute one 8 hours later @@ -323,10 +319,6 @@ class hr_holidays(osv.osv): """ Update the number_of_days. """ - # date_to has to be greater than date_from - if (date_from and date_to) and (date_from > date_to): - raise UserError(_('The start date must be anterior to the end date.')) - result = {'value': {}} # Compute and update the number of days diff --git a/addons/mail/models/mail_template.py b/addons/mail/models/mail_template.py index 7ef203f6275..99897cf13de 100644 --- a/addons/mail/models/mail_template.py +++ b/addons/mail/models/mail_template.py @@ -494,7 +494,7 @@ class MailTemplate(models.Model): ) # Add report in attachments: generate once for all template_res_ids - if template.report_template and not 'report_template_in_attachment' in self.env.context: + if template.report_template: for res_id in template_res_ids: attachments = [] report_name = self.render_template(template.report_name, template.model, res_id) diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index 5acc2ebfa66..b1353d9cef1 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -192,7 +192,7 @@ class MailComposer(models.TransientModel): @api.multi def send_mail_action(self): # TDE/ ??? - return self.with_context(report_template_in_attachment=True).send_mail() + return self.send_mail() @api.multi def send_mail(self, auto_commit=False): @@ -358,20 +358,6 @@ class MailComposer(models.TransientModel): if template.user_signature and 'body_html' in values: signature = self.env.user.signature values['body_html'] = tools.append_content_to_html(values['body_html'], signature, plaintext=False) - if template.report_template: - attachment = self.env['ir.attachment'] - attach = self.generate_attachment_from_report(template_id, res_id) - for attach_fname, attach_datas in attach[res_id].pop('attachments', []): - data_attach = { - 'name': attach_fname, - 'datas': attach_datas, - 'datas_fname': attach_fname, - 'res_model': 'mail.compose.message', - 'res_id': 0, - 'type': 'binary', - } - values.setdefault('attachment_ids', list()).append(attachment.create(data_attach).id) - elif template_id: values = self.generate_email_for_composer(template_id, [res_id])[res_id] # transform attachments into attachment_ids; not attached to the document because this will @@ -402,13 +388,6 @@ class MailComposer(models.TransientModel): return {'value': values} - @api.multi - def generate_attachment_from_report(self, template_id, res_id): - fields = ['attachment_ids'] - result = self.env['mail.template'].with_context(tpl_partners_only=True).browse(template_id).generate_email([res_id], fields=fields) - return result - - @api.multi def save_as_template(self): """ hit save as template button: current form value will be a new diff --git a/addons/website/static/src/js/website.js b/addons/website/static/src/js/website.js index 08501d3b48e..7a7e8809b31 100644 --- a/addons/website/static/src/js/website.js +++ b/addons/website/static/src/js/website.js @@ -175,9 +175,10 @@ odoo.define('website.website', function (require) { }); /* ----- PUBLISHING STUFF ---- */ - $(document).on('click', '.js_publish_management .js_publish_btn', function () { + $(document).on('click', '.js_publish_management .js_publish_btn', function (e) { + e.preventDefault(); + var $data = $(this).parents(".js_publish_management:first"); - var self=this; ajax.jsonRpc($data.data('controller') || '/website/publish', 'call', {'id': +$data.data('id'), 'object': $data.data('object')}) .then(function (result) { $data.toggleClass("css_unpublished css_published"); diff --git a/addons/website_blog/static/src/js/website_blog.editor.js b/addons/website_blog/static/src/js/website_blog.editor.js index 42965e68fca..1d074dc0ac0 100644 --- a/addons/website_blog/static/src/js/website_blog.editor.js +++ b/addons/website_blog/static/src/js/website_blog.editor.js @@ -102,8 +102,12 @@ odoo.define('website_blog.editor', function (require) { editor.on('saved', self, function (event, img) { var url = self.$image.attr('src'); self.$cover.css({"background-image": url ? 'url(' + url + ')' : "", 'min-height': $(window).height()-this.$cover.offset().top}); - self.$target.addClass('o_dirty cover cover_full'); + if (!self.$target.hasClass("cover")) { + var $li = self.$el.find("[data-cover_class]").first(); + self.cover_class(type, $li.data("cover_class"), $li); + } self.set_active(); + self.$target.addClass("o_dirty"); }); }, cover_class : function(type, value, $li) { diff --git a/addons/website_sale/static/src/css/website_sale.css b/addons/website_sale/static/src/css/website_sale.css index 1a6a148f6fa..22983ab9c85 100644 --- a/addons/website_sale/static/src/css/website_sale.css +++ b/addons/website_sale/static/src/css/website_sale.css @@ -359,6 +359,7 @@ min-height: 100px; position: relative; padding-bottom: 5px; + padding-left: 180px; } .oe_product.oe_list .oe_product_image { top: 0; @@ -370,9 +371,10 @@ .oe_product.oe_list section { position: relative; border: 0; - top: 0; + top: auto; bottom: auto; - left: 180px; + left: auto; + right: auto; background: transparent; } } diff --git a/addons/website_sale/static/src/css/website_sale.sass b/addons/website_sale/static/src/css/website_sale.sass index f8179bd6bc0..009657b2bcf 100644 --- a/addons/website_sale/static/src/css/website_sale.sass +++ b/addons/website_sale/static/src/css/website_sale.sass @@ -306,6 +306,7 @@ min-height: 100px position: relative padding-bottom: 5px + padding-left: 180px .oe_product_image top: 0 bottom: 0 @@ -315,9 +316,10 @@ section position: relative border: 0 - top: 0 + top: auto bottom: auto - left: 180px + left: auto + right: auto background: transparent .oe_website_sale .row .row .col-md-12 diff --git a/doc/cla/individual/mcb30.md b/doc/cla/individual/mcb30.md new file mode 100644 index 00000000000..b3c601a1ff6 --- /dev/null +++ b/doc/cla/individual/mcb30.md @@ -0,0 +1,11 @@ +United Kingdom, 2016-08-09 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Michael Brown mbrown@fensystems.co.uk https://github.com/mcb30 diff --git a/doc/setup/install.rst b/doc/setup/install.rst index 0f1de4f14c0..3e5940d8ba1 100644 --- a/doc/setup/install.rst +++ b/doc/setup/install.rst @@ -61,11 +61,11 @@ refer to :ref:`setup/enterprise` (except for :ref:`setup/install/source`). If you wish to access the Enterprise installers/source code, you can: * Go to the Download_ page and log in with your customer credentials -* Download the source on GitHub using git_ +* Download the source on GitHub using git_(available to partners only) .. note:: If you do not have access to our Enterprise repository, you can request it be e-mailing your sales representative or our online support with - your subscription number and GitHub username. + your subscription number and GitHub username. (available to partners only) .. warning:: Enterprise deb and rpm packages do not have repositories, so automatic update will not work. Reinstalling the latest package version will be needed