[MERGE] forward port of branch 7.0 up to d36c8b5
This commit is contained in:
commit
22f2728d22
|
@ -396,7 +396,7 @@ class account_asset_depreciation_line(osv.osv):
|
|||
created_move_ids = []
|
||||
asset_ids = []
|
||||
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)
|
||||
company_currency = line.asset_id.company_id.currency_id.id
|
||||
current_currency = line.asset_id.currency_id.id
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<field eval="2000.0" name="salvage_value"/>
|
||||
<field name="state">open</field>
|
||||
<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 eval="12000.0" name="purchase_value"/>
|
||||
<field name="category_id" ref="account_asset_category_fixedassets0"/>
|
||||
|
|
|
@ -6,4 +6,46 @@
|
|||
category_id: account_asset_category_sale
|
||||
-
|
||||
!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")])
|
||||
|
|
|
@ -5458,11 +5458,9 @@ instance.web.form.FieldMany2ManyBinaryMultiFiles = instance.web.form.AbstractFie
|
|||
$(window).on(this.fileupload_id, _.bind(this.on_file_loaded, this));
|
||||
},
|
||||
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.on("change:effective_readonly", this, function () {
|
||||
this.render_value();
|
||||
});
|
||||
},
|
||||
set_value: function(value_) {
|
||||
value_ = value_ || [];
|
||||
|
|
Loading…
Reference in New Issue