Add support for datetime_field to Many2One, Reference
issue4579 review30671002
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
* Add support for datetime_field to Many2One, Reference
|
||||
* Add calendar view
|
||||
* Move info-bar to the top
|
||||
* Add noeval to PYSONDecoder
|
||||
|
||||
@@ -1783,6 +1783,15 @@
|
||||
Sao.field.Many2One._super.set_client.call(this, record, value,
|
||||
force_change);
|
||||
},
|
||||
get_context: function(record) {
|
||||
var context = Sao.field.Many2One._super.get_context.call(
|
||||
this, record);
|
||||
if (this.description.datetime_field) {
|
||||
context._datetime = record.get_eval()[
|
||||
this.description.datetime_field];
|
||||
}
|
||||
return context;
|
||||
},
|
||||
validation_domains: function(record, pre_validate) {
|
||||
return this.get_domains(record, pre_validate)[0];
|
||||
},
|
||||
@@ -2297,6 +2306,15 @@
|
||||
return Sao.field.Reference._super.get_on_change_value.call(
|
||||
this, record);
|
||||
},
|
||||
get_context: function(record) {
|
||||
var context = Sao.field.Reference._super.get_context.call(
|
||||
this, record);
|
||||
if (this.description.datetime_field) {
|
||||
context._datetime = record.get_eval()[
|
||||
this.description.datetime_field];
|
||||
}
|
||||
return context;
|
||||
},
|
||||
validation_domains: function(record, pre_validate) {
|
||||
return this.get_domains(record, pre_validate)[0];
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user