[MERGE] forward port of branch saas-3 up to 22f2728
This commit is contained in:
commit
b7c912ec68
|
@ -390,7 +390,7 @@ class account_asset_depreciation_line(osv.osv):
|
||||||
created_move_ids = []
|
created_move_ids = []
|
||||||
asset_ids = []
|
asset_ids = []
|
||||||
for line in self.browse(cr, uid, ids, context=context):
|
for line in self.browse(cr, uid, ids, context=context):
|
||||||
depreciation_date = context.get('depreciation_date') or time.strftime('%Y-%m-%d')
|
depreciation_date = context.get('depreciation_date') or line.depreciation_date or time.strftime('%Y-%m-%d')
|
||||||
period_ids = period_obj.find(cr, uid, depreciation_date, context=context)
|
period_ids = period_obj.find(cr, uid, depreciation_date, context=context)
|
||||||
company_currency = line.asset_id.company_id.currency_id.id
|
company_currency = line.asset_id.company_id.currency_id.id
|
||||||
current_currency = line.asset_id.currency_id.id
|
current_currency = line.asset_id.currency_id.id
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
<field eval="2000.0" name="salvage_value"/>
|
<field eval="2000.0" name="salvage_value"/>
|
||||||
<field name="state">open</field>
|
<field name="state">open</field>
|
||||||
<field eval="12" name="method_period"/>
|
<field eval="12" name="method_period"/>
|
||||||
<field eval="10" name="method_number"/>
|
<field eval="5" name="method_number"/>
|
||||||
<field name="name">CEO's Car</field>
|
<field name="name">CEO's Car</field>
|
||||||
<field eval="12000.0" name="purchase_value"/>
|
<field eval="12000.0" name="purchase_value"/>
|
||||||
<field name="category_id" ref="account_asset_category_fixedassets0"/>
|
<field name="category_id" ref="account_asset_category_fixedassets0"/>
|
||||||
|
|
|
@ -6,4 +6,46 @@
|
||||||
category_id: account_asset_category_sale
|
category_id: account_asset_category_sale
|
||||||
-
|
-
|
||||||
!record {model: account.asset.asset, id: account_asset_asset_vehicles0}:
|
!record {model: account.asset.asset, id: account_asset_asset_vehicles0}:
|
||||||
method_number: 10
|
method_number: 5
|
||||||
|
-
|
||||||
|
!record {model: account.fiscalyear, id: data_fiscalyear_plus1}:
|
||||||
|
company_id: base.main_company
|
||||||
|
date_start: !eval "'%s-01-01' %(datetime.now().year+1)"
|
||||||
|
date_stop: !eval "'%s-12-31' %(datetime.now().year+1)"
|
||||||
|
name: !eval "'Fiscal Year X %s' %(datetime.now().year+1)"
|
||||||
|
code: !eval "'FY%s' %(datetime.now().year+1)"
|
||||||
|
-
|
||||||
|
!record {model: account.fiscalyear, id: data_fiscalyear_plus2}:
|
||||||
|
company_id: base.main_company
|
||||||
|
date_start: !eval "'%s-01-01' %(datetime.now().year+2)"
|
||||||
|
date_stop: !eval "'%s-12-31' %(datetime.now().year+2)"
|
||||||
|
name: !eval "'Fiscal Year X %s' %(datetime.now().year+2)"
|
||||||
|
code: !eval "'FY%s' %(datetime.now().year+2)"
|
||||||
|
-
|
||||||
|
!record {model: account.fiscalyear, id: data_fiscalyear_plus3}:
|
||||||
|
company_id: base.main_company
|
||||||
|
date_start: !eval "'%s-01-01' %(datetime.now().year+3)"
|
||||||
|
date_stop: !eval "'%s-12-31' %(datetime.now().year+3)"
|
||||||
|
name: !eval "'Fiscal Year X %s' %(datetime.now().year+3)"
|
||||||
|
code: !eval "'FY%s' %(datetime.now().year+3)"
|
||||||
|
-
|
||||||
|
!record {model: account.fiscalyear, id: data_fiscalyear_plus4}:
|
||||||
|
company_id: base.main_company
|
||||||
|
date_start: !eval "'%s-01-01' %(datetime.now().year+4)"
|
||||||
|
date_stop: !eval "'%s-12-31' %(datetime.now().year+4)"
|
||||||
|
name: !eval "'Fiscal Year X %s' %(datetime.now().year+4)"
|
||||||
|
code: !eval "'FY%s' %(datetime.now().year+4)"
|
||||||
|
-
|
||||||
|
!record {model: account.fiscalyear, id: data_fiscalyear_plus5}:
|
||||||
|
company_id: base.main_company
|
||||||
|
date_start: !eval "'%s-01-01' %(datetime.now().year+5)"
|
||||||
|
date_stop: !eval "'%s-12-31' %(datetime.now().year+5)"
|
||||||
|
name: !eval "'Fiscal Year X %s' %(datetime.now().year+5)"
|
||||||
|
code: !eval "'FY%s' %(datetime.now().year+5)"
|
||||||
|
-
|
||||||
|
!python {model: account.fiscalyear}: |
|
||||||
|
self.create_period(cr, uid, [ref("data_fiscalyear_plus1")])
|
||||||
|
self.create_period(cr, uid, [ref("data_fiscalyear_plus2")])
|
||||||
|
self.create_period(cr, uid, [ref("data_fiscalyear_plus3")])
|
||||||
|
self.create_period(cr, uid, [ref("data_fiscalyear_plus4")])
|
||||||
|
self.create_period(cr, uid, [ref("data_fiscalyear_plus5")])
|
||||||
|
|
|
@ -5764,7 +5764,7 @@ instance.web.form.FieldBinaryImage = instance.web.form.FieldBinary.extend({
|
||||||
* Options on attribute ; "blockui" {Boolean} block the UI or not
|
* Options on attribute ; "blockui" {Boolean} block the UI or not
|
||||||
* during the file is uploading
|
* during the file is uploading
|
||||||
*/
|
*/
|
||||||
instance.web.form.FieldMany2ManyBinaryMultiFiles = instance.web.form.AbstractField.extend({
|
instance.web.form.FieldMany2ManyBinaryMultiFiles = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeFieldMixin, {
|
||||||
template: "FieldBinaryFileUploader",
|
template: "FieldBinaryFileUploader",
|
||||||
init: function(field_manager, node) {
|
init: function(field_manager, node) {
|
||||||
this._super(field_manager, node);
|
this._super(field_manager, node);
|
||||||
|
@ -5780,7 +5780,8 @@ instance.web.form.FieldMany2ManyBinaryMultiFiles = instance.web.form.AbstractFie
|
||||||
$(window).on(this.fileupload_id, _.bind(this.on_file_loaded, this));
|
$(window).on(this.fileupload_id, _.bind(this.on_file_loaded, this));
|
||||||
},
|
},
|
||||||
start: function() {
|
start: function() {
|
||||||
this._super(this);
|
this._super();
|
||||||
|
instance.web.form.ReinitializeFieldMixin.start.call(this);
|
||||||
this.$el.on('change', 'input.oe_form_binary_file', this.on_file_change );
|
this.$el.on('change', 'input.oe_form_binary_file', this.on_file_change );
|
||||||
},
|
},
|
||||||
// WARNING: duplicated in 4 other M2M widgets
|
// WARNING: duplicated in 4 other M2M widgets
|
||||||
|
|
Loading…
Reference in New Issue