diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-01-07 17:30:57 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-01-07 17:30:57 +0100 |
| commit | e1c7fefe89438bbfc669dfec0476921145f8fd5d (patch) | |
| tree | f408ff54f0d23abb99a00206bb89b0fadcf9603b /addons | |
| parent | 6e933e42efb8e11087db63cfb5302f37f8e8b72d (diff) | |
| parent | cdb0c08cb9a3b61466f8cdf368bac831839be8bf (diff) | |
[MERGE] forward port branch saas-14 up to cdb0c08cb9a
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/account/models/company.py | 6 | ||||
| -rw-r--r-- | addons/hr_holidays/views/hr_holidays_views.xml | 2 | ||||
| -rw-r--r-- | addons/purchase/models/purchase.py | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/addons/account/models/company.py b/addons/account/models/company.py index 80cb1b4e31d..d809be80210 100644 --- a/addons/account/models/company.py +++ b/addons/account/models/company.py @@ -115,7 +115,11 @@ Best Regards,''')) last_month = self.fiscalyear_last_month last_day = self.fiscalyear_last_day if (date.month < last_month or (date.month == last_month and date.day <= last_day)): - date = date.replace(month=last_month, day=last_day) + # FORWARD-PORT UP TO v11 + if last_month == 2 and last_day == 29 and date.year % 4 != 0: + date = date.replace(month=last_month, day=28) + else: + date = date.replace(month=last_month, day=last_day) else: if last_month == 2 and last_day == 29 and (date.year + 1) % 4 != 0: date = date.replace(month=last_month, day=28, year=date.year + 1) diff --git a/addons/hr_holidays/views/hr_holidays_views.xml b/addons/hr_holidays/views/hr_holidays_views.xml index b189a04c349..6029dcb9855 100644 --- a/addons/hr_holidays/views/hr_holidays_views.xml +++ b/addons/hr_holidays/views/hr_holidays_views.xml @@ -224,7 +224,7 @@ <field name="name">hr.holidays.tree</field> <field name="model">hr.holidays</field> <field name="arch" type="xml"> - <tree decoration-danger="state == 'refuse'" decoration-info="state == ' draft'" string="Leave Requests" + <tree decoration-danger="state == 'refuse'" decoration-info="state == 'draft'" string="Leave Requests" decoration-bf="message_needaction == True"> <field name="employee_id"/> <field name="holiday_type" string="Mode" groups="base.group_no_one"/> diff --git a/addons/purchase/models/purchase.py b/addons/purchase/models/purchase.py index fedfa9196c1..979f48e5336 100644 --- a/addons/purchase/models/purchase.py +++ b/addons/purchase/models/purchase.py @@ -299,6 +299,7 @@ class PurchaseOrder(models.Model): 'default_use_template': bool(template_id), 'default_template_id': template_id, 'default_composition_mode': 'comment', + 'purchase_mark_rfq_sent': True, 'custom_layout': "purchase.mail_template_data_notification_email_purchase_order" }) return { @@ -1182,7 +1183,7 @@ class MailComposeMessage(models.TransientModel): @api.multi def mail_purchase_order_on_send(self): - if not self.filtered('subtype_id.internal'): + if self._context.get('purchase_mark_rfq_sent'): order = self.env['purchase.order'].browse(self._context['default_res_id']) if order.state == 'draft': order.state = 'sent' |
