diff --git a/addons/calendar/calendar.py b/addons/calendar/calendar.py index 1e8f9c19986..85dc1035b3f 100644 --- a/addons/calendar/calendar.py +++ b/addons/calendar/calendar.py @@ -1236,7 +1236,7 @@ class calendar_event(osv.Model): """ if data['interval'] and data['interval'] < 0: raise UserError(_('interval cannot be negative.')) - if data['count'] and data['count'] <= 0: + if data['end_type'] == 'count' and int(data['count']) <= 0: raise UserError(_('Event recurrence interval cannot be negative.')) def get_week_string(freq, data): @@ -1542,6 +1542,7 @@ class calendar_event(osv.Model): recurrent_id=real_event_id, recurrent_id_date=data.get('start'), rrule_type=False, + end_type=False, rrule='', recurrency=False, final_date=datetime.strptime(data.get('start'), DEFAULT_SERVER_DATETIME_FORMAT if data['allday'] else DEFAULT_SERVER_DATETIME_FORMAT) + timedelta(hours=values.get('duration', False) or data.get('duration')) diff --git a/addons/calendar/static/src/js/base_calendar.js b/addons/calendar/static/src/js/base_calendar.js index 4f9b43ddc70..64d7d084557 100644 --- a/addons/calendar/static/src/js/base_calendar.js +++ b/addons/calendar/static/src/js/base_calendar.js @@ -133,8 +133,11 @@ widgets.SidebarFilter.include({ }, }); this.ir_model_m2o.appendTo(this.$el); - this.ir_model_m2o.on('change:value', self, function() { - self.add_filter(); + this.ir_model_m2o.on('change:value', self, function() { + // once selected, we reset the value to false. + if (self.ir_model_m2o.get_value()) { + self.add_filter(); + } }); }, add_filter: function() { diff --git a/addons/google_calendar/google_calendar.py b/addons/google_calendar/google_calendar.py index a429f50a80d..9520cfd4ccb 100644 --- a/addons/google_calendar/google_calendar.py +++ b/addons/google_calendar/google_calendar.py @@ -355,9 +355,10 @@ class google_calendar(osv.AbstractModel): url = "/calendar/v3/calendars/%s/events/%s" % ('primary', google_id) try: status, content, ask_time = self.pool['google.service']._do_request(cr, uid, url, params, headers, type='GET', context=context) - except: + except Exception, e: _logger.info("Calendar Synchro - In except of get_one_event_synchro") - pass + _logger.info(exception_to_unicode(e)) + return False return status_response(status) and content or False diff --git a/addons/payment_paypal/models/paypal.py b/addons/payment_paypal/models/paypal.py index fcb5c443dea..aacfbed5590 100644 --- a/addons/payment_paypal/models/paypal.py +++ b/addons/payment_paypal/models/paypal.py @@ -117,8 +117,8 @@ class AcquirerPaypal(osv.Model): 'currency_code': values['currency'] and values['currency'].name or '', 'address1': values.get('partner_address'), 'city': values.get('partner_city'), - 'country': values.get('partner_country') and values.get('partner_country').name or '', - 'state': values.get('partner_state') and values.get('partner_state').name or '', + 'country': values.get('partner_country') and values.get('partner_country').code or '', + 'state': values.get('partner_state') and (values.get('partner_state').code or values.get('partner_state').name) or '', 'email': values.get('partner_email'), 'zip_code': values.get('partner_zip'), 'first_name': values.get('partner_first_name'), diff --git a/addons/product/product.py b/addons/product/product.py index cf6c28b5c9f..c1c6887fc9d 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -238,7 +238,7 @@ class produce_price_history(osv.osv): 'company_id': fields.many2one('res.company', required=True), 'product_id': fields.many2one('product.product', 'Product', required=True, ondelete='cascade'), 'datetime': fields.datetime('Date'), - 'cost': fields.float('Cost'), + 'cost': fields.float('Cost', digits_compute=dp.get_precision('Product Price')), } def _get_default_company(self, cr, uid, context=None): diff --git a/doc/cla/individual/gouravchawla.md b/doc/cla/individual/gouravchawla.md new file mode 100644 index 00000000000..cbdd94b3ebe --- /dev/null +++ b/doc/cla/individual/gouravchawla.md @@ -0,0 +1,9 @@ +India, July 10, 2016 + +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, + +Gourav Chawla gouravchawla@live.com https://github.com/Gouravchawla diff --git a/doc/reference/views.rst b/doc/reference/views.rst index fd674beaa8f..4622716ff7e 100644 --- a/doc/reference/views.rst +++ b/doc/reference/views.rst @@ -502,12 +502,6 @@ The states are shown following the order used in the field (the list in a selection field, etc). States that are always visible are specified with the attribute ``statusbar_visible``. -``statusbar_colors`` - can be used to give a custom color to specific states. - - .. deprecated:: 9.0 - - ::