[MERGE] forward port branch saas-6 up to 7079a0b
This commit is contained in:
@@ -1236,7 +1236,7 @@ class calendar_event(osv.Model):
|
|||||||
"""
|
"""
|
||||||
if data['interval'] and data['interval'] < 0:
|
if data['interval'] and data['interval'] < 0:
|
||||||
raise UserError(_('interval cannot be negative.'))
|
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.'))
|
raise UserError(_('Event recurrence interval cannot be negative.'))
|
||||||
|
|
||||||
def get_week_string(freq, data):
|
def get_week_string(freq, data):
|
||||||
@@ -1542,6 +1542,7 @@ class calendar_event(osv.Model):
|
|||||||
recurrent_id=real_event_id,
|
recurrent_id=real_event_id,
|
||||||
recurrent_id_date=data.get('start'),
|
recurrent_id_date=data.get('start'),
|
||||||
rrule_type=False,
|
rrule_type=False,
|
||||||
|
end_type=False,
|
||||||
rrule='',
|
rrule='',
|
||||||
recurrency=False,
|
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'))
|
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'))
|
||||||
|
|||||||
@@ -133,8 +133,11 @@ widgets.SidebarFilter.include({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
this.ir_model_m2o.appendTo(this.$el);
|
this.ir_model_m2o.appendTo(this.$el);
|
||||||
this.ir_model_m2o.on('change:value', self, function() {
|
this.ir_model_m2o.on('change:value', self, function() {
|
||||||
self.add_filter();
|
// once selected, we reset the value to false.
|
||||||
|
if (self.ir_model_m2o.get_value()) {
|
||||||
|
self.add_filter();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
add_filter: function() {
|
add_filter: function() {
|
||||||
|
|||||||
@@ -355,9 +355,10 @@ class google_calendar(osv.AbstractModel):
|
|||||||
url = "/calendar/v3/calendars/%s/events/%s" % ('primary', google_id)
|
url = "/calendar/v3/calendars/%s/events/%s" % ('primary', google_id)
|
||||||
try:
|
try:
|
||||||
status, content, ask_time = self.pool['google.service']._do_request(cr, uid, url, params, headers, type='GET', context=context)
|
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")
|
_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
|
return status_response(status) and content or False
|
||||||
|
|
||||||
|
|||||||
@@ -117,8 +117,8 @@ class AcquirerPaypal(osv.Model):
|
|||||||
'currency_code': values['currency'] and values['currency'].name or '',
|
'currency_code': values['currency'] and values['currency'].name or '',
|
||||||
'address1': values.get('partner_address'),
|
'address1': values.get('partner_address'),
|
||||||
'city': values.get('partner_city'),
|
'city': values.get('partner_city'),
|
||||||
'country': values.get('partner_country') and values.get('partner_country').name or '',
|
'country': values.get('partner_country') and values.get('partner_country').code or '',
|
||||||
'state': values.get('partner_state') and values.get('partner_state').name or '',
|
'state': values.get('partner_state') and (values.get('partner_state').code or values.get('partner_state').name) or '',
|
||||||
'email': values.get('partner_email'),
|
'email': values.get('partner_email'),
|
||||||
'zip_code': values.get('partner_zip'),
|
'zip_code': values.get('partner_zip'),
|
||||||
'first_name': values.get('partner_first_name'),
|
'first_name': values.get('partner_first_name'),
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ class produce_price_history(osv.osv):
|
|||||||
'company_id': fields.many2one('res.company', required=True),
|
'company_id': fields.many2one('res.company', required=True),
|
||||||
'product_id': fields.many2one('product.product', 'Product', required=True, ondelete='cascade'),
|
'product_id': fields.many2one('product.product', 'Product', required=True, ondelete='cascade'),
|
||||||
'datetime': fields.datetime('Date'),
|
'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):
|
def _get_default_company(self, cr, uid, context=None):
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -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
|
selection field, etc). States that are always visible are specified with the
|
||||||
attribute ``statusbar_visible``.
|
attribute ``statusbar_visible``.
|
||||||
|
|
||||||
``statusbar_colors``
|
|
||||||
can be used to give a custom color to specific states.
|
|
||||||
|
|
||||||
.. deprecated:: 9.0
|
|
||||||
|
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
<field name="state" widget="statusbar"
|
<field name="state" widget="statusbar"
|
||||||
|
|||||||
@@ -728,6 +728,7 @@ class WorkerHTTP(Worker):
|
|||||||
""" HTTP Request workers """
|
""" HTTP Request workers """
|
||||||
def process_request(self, client, addr):
|
def process_request(self, client, addr):
|
||||||
client.setblocking(1)
|
client.setblocking(1)
|
||||||
|
client.settimeout(0.5)
|
||||||
client.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
|
client.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
|
||||||
# Prevent fd inherientence close_on_exec
|
# Prevent fd inherientence close_on_exec
|
||||||
flags = fcntl.fcntl(client, fcntl.F_GETFD) | fcntl.FD_CLOEXEC
|
flags = fcntl.fcntl(client, fcntl.F_GETFD) | fcntl.FD_CLOEXEC
|
||||||
|
|||||||
Reference in New Issue
Block a user