[REF] account_analytic_plans: update to the new module system
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
openerp.account_analytic_plans = function(instance) {
|
||||
odoo.define('account_analytic_plans.custom', ['account.widgets', 'web.core'], function (require) {
|
||||
"use strict";
|
||||
|
||||
var _t = instance.web._t,
|
||||
_lt = instance.web._lt;
|
||||
var QWeb = instance.web.qweb;
|
||||
var widgets = require('account.widgets');
|
||||
var core = require('web.core');
|
||||
|
||||
instance.web.account.bankStatementReconciliation.include({
|
||||
var _t = core._t;
|
||||
|
||||
widgets.bankStatementReconciliation.include({
|
||||
init: function(parent, context) {
|
||||
var FieldMany2One = core.form_widget_registry.get('many2one');
|
||||
this._super(parent, context);
|
||||
delete this.create_form_fields.analytic_account_id;
|
||||
this.create_form_fields["analytic_plan"] = {
|
||||
@@ -17,7 +19,7 @@ instance.web.account.bankStatementReconciliation.include({
|
||||
required: false,
|
||||
tabindex: 14,
|
||||
group: "analytic.group_analytic_accounting",
|
||||
constructor: instance.web.form.FieldMany2One,
|
||||
constructor: FieldMany2One,
|
||||
field_properties: {
|
||||
relation: "account.analytic.plan.instance",
|
||||
string: _t("Analytic Distribution"),
|
||||
@@ -25,14 +27,9 @@ instance.web.account.bankStatementReconciliation.include({
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
start: function() {
|
||||
return this._super().then(function() {
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
instance.web.account.bankStatementReconciliationLine.include({
|
||||
widgets.bankStatementReconciliationLine.include({
|
||||
prepareCreatedMoveLineForPersisting: function(line) {
|
||||
var dict = this._super(line);
|
||||
if (line.analytics_id) dict['analytics_id'] = line.analytics_id;
|
||||
@@ -40,4 +37,5 @@ instance.web.account.bankStatementReconciliationLine.include({
|
||||
return dict;
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user