-
- Journal :
-
- Period :
-
From 30ea1678309f9ee5f0c62c977634367209b5d881 Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Mon, 19 Nov 2012 12:19:07 +0100
Subject: [PATCH 15/48] Select boxes disabled when editing : )
bzr revid: dle@openerp.com-20121119111907-x59ovkghvjpzh33n
---
.../src/js/account_move_line_quickadd.js | 28 +++++++++++++------
1 file changed, 19 insertions(+), 9 deletions(-)
diff --git a/addons/account/static/src/js/account_move_line_quickadd.js b/addons/account/static/src/js/account_move_line_quickadd.js
index d36565d2ecf..1cc8942cb72 100644
--- a/addons/account/static/src/js/account_move_line_quickadd.js
+++ b/addons/account/static/src/js/account_move_line_quickadd.js
@@ -99,17 +99,27 @@ openerp.account.quickadd = function (instance) {
var compoundContext = self.last_context;
return self.old_search(compoundDomain, compoundContext, self.last_group_by);
},
- /*_next: function (next_record, options) {
- next_record = next_record || 'succ';
+ start_edition: function (record, options) {
+ this.$el.parent().find('.oe_account_select_journal').attr('disabled', 'disabled');
+ this.$el.parent().find('.oe_account_select_period').attr('disabled', 'disabled');
+ return this._super.apply(this, arguments);
+ },
+ cancel_edition: function (force) {
+ this.$el.parent().find('.oe_account_select_journal').removeAttr('disabled');
+ this.$el.parent().find('.oe_account_select_period').removeAttr('disabled');
+ return this._super.apply(this, arguments);
+ },
+ save_edition: function () {
+ var tmp = this._super.apply(this, arguments);
var self = this;
- return this.save_edition().then(function (saveInfo) {
- if (saveInfo.created || self.records.at(self.records.length-1).get("id") === saveInfo.record.get("id")) {
- return self.start_edition();
+ tmp.then(function (saveInfo){
+ console.log(saveInfo);
+ if (saveInfo) {
+ self.$el.parent().find('.oe_account_select_journal').removeAttr('disabled');
+ self.$el.parent().find('.oe_account_select_period').removeAttr('disabled');
}
- var record = self.records[next_record](
- saveInfo.record, {wraparound: true});
- return self.start_edition(record, options);
});
- },*/
+ return tmp;
+ }
});
};
From d831d5bd7c2c4b3cdd39394d5d40cde29c8960f7 Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Mon, 19 Nov 2012 13:32:54 +0100
Subject: [PATCH 16/48] [FIX]Select boxes disabled when editing : ) : Better
implement way
bzr revid: dle@openerp.com-20121119123254-9rb4uxr97ux5iatv
---
.../src/js/account_move_line_quickadd.js | 30 +++++--------------
1 file changed, 8 insertions(+), 22 deletions(-)
diff --git a/addons/account/static/src/js/account_move_line_quickadd.js b/addons/account/static/src/js/account_move_line_quickadd.js
index 1cc8942cb72..5a66e311261 100644
--- a/addons/account/static/src/js/account_move_line_quickadd.js
+++ b/addons/account/static/src/js/account_move_line_quickadd.js
@@ -33,6 +33,14 @@ openerp.account.quickadd = function (instance) {
self.current_period = parseInt(this.value);
self.do_search(self.last_domain, self.last_context, self.last_group_by);
});
+ this.on('edit:after', this, function () {
+ self.$el.parent().find('.oe_account_select_journal').attr('disabled', 'disabled');
+ self.$el.parent().find('.oe_account_select_period').attr('disabled', 'disabled');
+ });
+ this.on('save:after cancel:after', this, function () {
+ self.$el.parent().find('.oe_account_select_journal').removeAttr('disabled');
+ self.$el.parent().find('.oe_account_select_period').removeAttr('disabled');
+ });
return tmp;
},
do_search: function(domain, context, group_by) {
@@ -99,27 +107,5 @@ openerp.account.quickadd = function (instance) {
var compoundContext = self.last_context;
return self.old_search(compoundDomain, compoundContext, self.last_group_by);
},
- start_edition: function (record, options) {
- this.$el.parent().find('.oe_account_select_journal').attr('disabled', 'disabled');
- this.$el.parent().find('.oe_account_select_period').attr('disabled', 'disabled');
- return this._super.apply(this, arguments);
- },
- cancel_edition: function (force) {
- this.$el.parent().find('.oe_account_select_journal').removeAttr('disabled');
- this.$el.parent().find('.oe_account_select_period').removeAttr('disabled');
- return this._super.apply(this, arguments);
- },
- save_edition: function () {
- var tmp = this._super.apply(this, arguments);
- var self = this;
- tmp.then(function (saveInfo){
- console.log(saveInfo);
- if (saveInfo) {
- self.$el.parent().find('.oe_account_select_journal').removeAttr('disabled');
- self.$el.parent().find('.oe_account_select_period').removeAttr('disabled');
- }
- });
- return tmp;
- }
});
};
From ad2c5376b0613f811141f7cc74730af5e5fd906a Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Mon, 19 Nov 2012 13:42:14 +0100
Subject: [PATCH 17/48] [ADD]Period and journal field in tree view with
invisible = 1
bzr revid: dle@openerp.com-20121119124214-0hnx1gg5iksi2gpf
---
addons/account/account_view.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index d3ec35cbea2..f5b21bfcdee 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -1069,6 +1069,8 @@
+
+
From f80d9e61003428021b493691d5db2ef8193e58a5 Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Mon, 19 Nov 2012 14:22:32 +0100
Subject: [PATCH 18/48] [ADD]On_change partner_id and remove useless comments
bzr revid: dle@openerp.com-20121119132232-2ac4n7hodno1r7ju
---
addons/account/account_view.xml | 4 ++--
.../static/src/js/account_move_line_quickadd.js | 17 -----------------
2 files changed, 2 insertions(+), 19 deletions(-)
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index f5b21bfcdee..34e7d3688c2 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -1070,13 +1070,13 @@
-
+
-
+
diff --git a/addons/account/static/src/js/account_move_line_quickadd.js b/addons/account/static/src/js/account_move_line_quickadd.js
index 5a66e311261..a40774b346f 100644
--- a/addons/account/static/src/js/account_move_line_quickadd.js
+++ b/addons/account/static/src/js/account_move_line_quickadd.js
@@ -85,23 +85,6 @@ openerp.account.quickadd = function (instance) {
["journal_id", "=", self.current_journal],
["period_id", "=", self.current_period]
]);
- //1
- /*var ncontext = {
- "journal_id": self.current_journal,
- "period_id" :self.current_period,
- };
- var new instance.web.CompoundDomain(self.last_domain = new instance.web.CompoundContext(this.last_context, ncontext);
-
- _.extend(this.dataset.context, ncontext);
- */
- //2
- /*
- var compoundContext = new instance.web.CompoundContext(self.last_context,{
- "journal_id": self.current_journal,
- "period_id" :self.current_period,
- });
- */
- //3
self.last_context["journal_id"] = self.current_journal;
self.last_context["period_id"] = self.current_period;
var compoundContext = self.last_context;
From 20c09c33936453cdaf49f724baffc9418c0275f3 Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Wed, 21 Nov 2012 15:26:43 +0100
Subject: [PATCH 19/48] [IMP]Journals views in one, comment of fields_view_get
of account.move.line
bzr revid: dle@openerp.com-20121121142643-g29shtxwf9slvvhi
---
addons/account/account_move_line.py | 200 ++++++++++++++--------------
addons/account/account_view.xml | 100 ++++++++++++--
2 files changed, 190 insertions(+), 110 deletions(-)
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index 302a74c27af..98521eb41a8 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -970,126 +970,126 @@ class account_move_line(osv.osv):
'context':context,
}
- def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
- journal_pool = self.pool.get('account.journal')
- if context is None:
- context = {}
- result = super(account_move_line, self).fields_view_get(cr, uid, view_id, view_type, context=context, toolbar=toolbar, submenu=submenu)
- if (view_type != 'tree') or view_id:
- #Remove the toolbar from the form view
- if view_type == 'form':
- if result.get('toolbar', False):
- result['toolbar']['action'] = []
- #Restrict the list of journal view in search view
- if view_type == 'search' and result['fields'].get('journal_id', False):
- result['fields']['journal_id']['selection'] = journal_pool.name_search(cr, uid, '', [], context=context)
- ctx = context.copy()
- #we add the refunds journal in the selection field of journal
- if context.get('journal_type', False) == 'sale':
- ctx.update({'journal_type': 'sale_refund'})
- result['fields']['journal_id']['selection'] += journal_pool.name_search(cr, uid, '', [], context=ctx)
- elif context.get('journal_type', False) == 'purchase':
- ctx.update({'journal_type': 'purchase_refund'})
- result['fields']['journal_id']['selection'] += journal_pool.name_search(cr, uid, '', [], context=ctx)
- return result
- if context.get('view_mode', False):
- return result
- fld = []
- flds = []
- title = _("Accounting Entries") # self.view_header_get(cr, uid, view_id, view_type, context)
+ # def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
+ # journal_pool = self.pool.get('account.journal')
+ # if context is None:
+ # context = {}
+ # result = super(account_move_line, self).fields_view_get(cr, uid, view_id, view_type, context=context, toolbar=toolbar, submenu=submenu)
+ # if (view_type != 'tree') or view_id:
+ # #Remove the toolbar from the form view
+ # if view_type == 'form':
+ # if result.get('toolbar', False):
+ # result['toolbar']['action'] = []
+ # #Restrict the list of journal view in search view
+ # if view_type == 'search' and result['fields'].get('journal_id', False):
+ # result['fields']['journal_id']['selection'] = journal_pool.name_search(cr, uid, '', [], context=context)
+ # ctx = context.copy()
+ # #we add the refunds journal in the selection field of journal
+ # if context.get('journal_type', False) == 'sale':
+ # ctx.update({'journal_type': 'sale_refund'})
+ # result['fields']['journal_id']['selection'] += journal_pool.name_search(cr, uid, '', [], context=ctx)
+ # elif context.get('journal_type', False) == 'purchase':
+ # ctx.update({'journal_type': 'purchase_refund'})
+ # result['fields']['journal_id']['selection'] += journal_pool.name_search(cr, uid, '', [], context=ctx)
+ # return result
+ # if context.get('view_mode', False):
+ # return result
+ # fld = []
+ # flds = []
+ # title = _("Accounting Entries") # self.view_header_get(cr, uid, view_id, view_type, context)
- ids = journal_pool.search(cr, uid, [], context=context)
- journals = journal_pool.browse(cr, uid, ids, context=context)
- for journal in journals:
- for field in journal.view_id.columns_id:
- # sometimes, it's possible that a defined column is not loaded (the module containing
- # this field is not loaded) when we make an update.
- if field.field not in self._columns:
- continue
+ # ids = journal_pool.search(cr, uid, [], context=context)
+ # journals = journal_pool.browse(cr, uid, ids, context=context)
+ # for journal in journals:
+ # for field in journal.view_id.columns_id:
+ # # sometimes, it's possible that a defined column is not loaded (the module containing
+ # # this field is not loaded) when we make an update.
+ # if field.field not in self._columns:
+ # continue
- if not field.field in flds:
- fld.append((field.field, field.sequence))
- flds.append(field.field)
+ # if not field.field in flds:
+ # fld.append((field.field, field.sequence))
+ # flds.append(field.field)
- default_columns = {
- 'period_id': 3,
- 'journal_id': 10,
- 'state': sys.maxint,
- }
- for d in default_columns:
- if d not in flds:
- fld.append((d, default_columns[d]))
- flds.append(d)
+ # default_columns = {
+ # 'period_id': 3,
+ # 'journal_id': 10,
+ # 'state': sys.maxint,
+ # }
+ # for d in default_columns:
+ # if d not in flds:
+ # fld.append((d, default_columns[d]))
+ # flds.append(d)
- fld = sorted(fld, key=itemgetter(1))
- widths = {
- 'statement_id': 50,
- 'state': 60,
- 'tax_code_id': 50,
- 'move_id': 40,
- }
+ # fld = sorted(fld, key=itemgetter(1))
+ # widths = {
+ # 'statement_id': 50,
+ # 'state': 60,
+ # 'tax_code_id': 50,
+ # 'move_id': 40,
+ # }
- document = etree.Element('tree', string=title, editable="top",
- on_write="on_create_write",
- colors="red:state=='draft';black:state=='valid'")
- fields_get = self.fields_get(cr, uid, flds, context)
- for field, _seq in fld:
- # TODO add string to element
- f = etree.SubElement(document, 'field', name=field)
+ # document = etree.Element('tree', string=title, editable="top",
+ # on_write="on_create_write",
+ # colors="red:state=='draft';black:state=='valid'")
+ # fields_get = self.fields_get(cr, uid, flds, context)
+ # for field, _seq in fld:
+ # # TODO add string to element
+ # f = etree.SubElement(document, 'field', name=field)
- if field == 'debit':
- f.set('sum', _("Total debit"))
+ # if field == 'debit':
+ # f.set('sum', _("Total debit"))
- elif field == 'credit':
- f.set('sum', _("Total credit"))
+ # elif field == 'credit':
+ # f.set('sum', _("Total credit"))
- elif field == 'move_id':
- f.set('required', 'False')
+ # elif field == 'move_id':
+ # f.set('required', 'False')
- elif field == 'account_tax_id':
- f.set('domain', "[('parent_id', '=' ,False)]")
- f.set('context', "{'journal_id': journal_id}")
+ # elif field == 'account_tax_id':
+ # f.set('domain', "[('parent_id', '=' ,False)]")
+ # f.set('context', "{'journal_id': journal_id}")
- elif field == 'account_id' and journal.id:
- f.set('domain', "[('journal_id', '=', journal_id),('type','!=','view'), ('type','!=','closed')]")
- f.set('on_change', 'onchange_account_id(account_id, partner_id)')
+ # elif field == 'account_id' and journal.id:
+ # f.set('domain', "[('journal_id', '=', journal_id),('type','!=','view'), ('type','!=','closed')]")
+ # f.set('on_change', 'onchange_account_id(account_id, partner_id)')
- elif field == 'partner_id':
- f.set('on_change', 'onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)')
+ # elif field == 'partner_id':
+ # f.set('on_change', 'onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)')
- elif field == 'journal_id':
- f.set('context', "{'journal_id': journal_id}")
+ # elif field == 'journal_id':
+ # f.set('context', "{'journal_id': journal_id}")
- elif field == 'statement_id':
- f.set('domain', "[('state', '!=', 'confirm'),('journal_id.type', '=', 'bank')]")
- f.set('invisible', 'True')
+ # elif field == 'statement_id':
+ # f.set('domain', "[('state', '!=', 'confirm'),('journal_id.type', '=', 'bank')]")
+ # f.set('invisible', 'True')
- elif field == 'date':
- f.set('on_change', 'onchange_date(date)')
+ # elif field == 'date':
+ # f.set('on_change', 'onchange_date(date)')
- elif field == 'analytic_account_id':
- # Currently it is not working due to being executed by superclass's fields_view_get
- # f.set('groups', 'analytic.group_analytic_accounting')
- pass
+ # elif field == 'analytic_account_id':
+ # # Currently it is not working due to being executed by superclass's fields_view_get
+ # # f.set('groups', 'analytic.group_analytic_accounting')
+ # pass
- if field in ('amount_currency', 'currency_id'):
- f.set('on_change', 'onchange_currency(account_id, amount_currency, currency_id, date, journal_id)')
- f.set('attrs', "{'readonly': [('state', '=', 'valid')]}")
+ # if field in ('amount_currency', 'currency_id'):
+ # f.set('on_change', 'onchange_currency(account_id, amount_currency, currency_id, date, journal_id)')
+ # f.set('attrs', "{'readonly': [('state', '=', 'valid')]}")
- if field in widths:
- f.set('width', str(widths[field]))
+ # if field in widths:
+ # f.set('width', str(widths[field]))
- if field in ('journal_id',):
- f.set("invisible", "context.get('journal_id', False)")
- elif field in ('period_id',):
- f.set("invisible", "context.get('period_id', False)")
+ # if field in ('journal_id',):
+ # f.set("invisible", "context.get('journal_id', False)")
+ # elif field in ('period_id',):
+ # f.set("invisible", "context.get('period_id', False)")
- orm.setup_modifiers(f, fields_get[field], context=context,
- in_tree_view=True)
+ # orm.setup_modifiers(f, fields_get[field], context=context,
+ # in_tree_view=True)
- result['arch'] = etree.tostring(document, pretty_print=True)
- result['fields'] = fields_get
- return result
+ # result['arch'] = etree.tostring(document, pretty_print=True)
+ # result['fields'] = fields_get
+ # return result
def _check_moves(self, cr, uid, context=None):
# use the first move ever created for this journal and period
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index f7d64f43405..fe40121eaeb 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -1063,31 +1063,78 @@
+
account.move.line.tree
account.move.line
-
-
-
-
+
+
-
+
+
-
-
-
-
+
+
+
-
+
+
+
+
+
@@ -1280,6 +1327,39 @@
groups="group_account_user"
/>
+
+ Journal Items
+ account.move.journal
+ form
+ {'journal_type':'sale'}
+ This view is used by accountants in order to record entries massively in OpenERP. If you want to record a customer invoice, select the journal and the period in the search toolbar. Then, start by recording the entry line of the income account. OpenERP will propose to you automatically the Tax related to this account and the counter-part "Account receivable".
+
+
+
+
+ Journal Items
+ account.move.journal
+ form
+ {'journal_type':'purchase'}
+ This view is used by accountants in order to record entries massively in OpenERP. If you want to record a supplier invoice, start by recording the line of the expense account, OpenERP will propose to you automatically the Tax related to this account and the counter-part "Account Payable".
+
+
+
+
+ Journal Items
+ account.move.journal
+ form
+ {'journal_type':'bank'}
+ This view is used by accountants in order to record entries massively in OpenERP. Journal items are created by OpenERP if you use Bank Statements, Cash Registers, or Customer/Supplier payments.
+
+
+
Lines to reconcile
account.move.line
From 0c695e94367f2e4d807c7be0ca5c8748082e92d5 Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Thu, 22 Nov 2012 09:48:10 +0100
Subject: [PATCH 20/48] [REM]Journal.view and journal.column
bzr revid: dle@openerp.com-20121122084810-mrmgbc8lca21v7l7
---
addons/account/account_view.xml | 78 ---------------------------------
1 file changed, 78 deletions(-)
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 164a5fb30d7..19e0f22162c 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -349,84 +349,6 @@
id="menu_unrealized_gains_losses"
parent="account.menu_multi_currency"/>
-
-
-
- account.journal.column.form
- account.journal.column
-
-
-
-
-
- account.journal.column.tree
- account.journal.column
-
-
-
-
-
-
-
-
-
- account.journal.view.search
- account.journal.view
-
-
-
-
-
-
-
- account.journal.view.tree
- account.journal.view
-
-
-
-
-
-
-
- account.journal.view.form
- account.journal.view
-
-
-
-
-
- Journal Views
- account.journal.view
- form
- tree,form
-
-
-
- Click to specify lists of columns to display for a type of journal.
-
- Journal views determine the way you can record entries in
- your journal. Select the fields you want to appear in a journal
- and determine the sequence in which they will appear.
-
- On the journal definition form, you can select the view you
- want to use to display journal items related to this journal.
-
-
-
-
-
-
From bf093ee617fe6c2cadf7ae9ed63c42c5206727be Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Thu, 22 Nov 2012 10:23:02 +0100
Subject: [PATCH 21/48] [ADD]Reconcile function which return the full or
partial reconcile depending on which is setted for the move line
bzr revid: dle@openerp.com-20121122092302-rji8z8bgbb3p8k14
---
addons/account/account_move_line.py | 10 ++++++++++
addons/account/account_view.xml | 5 ++---
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index 9a67a3c9b19..bbdf2468010 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -477,6 +477,15 @@ class account_move_line(osv.osv):
result.append(line.id)
return result
+ def _get_reconcile(self, cr, uid, ids,name, unknow_none, context=None):
+ res = dict.fromkeys(ids, False)
+ for line in self.browse(cr, uid, ids, context=context):
+ if line.reconcile_id:
+ res[line.id] = str(line.reconcile_id.name)
+ elif line.reconcile_partial_id:
+ res[line.id] = str(line.reconcile_partial_id.name)
+ return res
+
_columns = {
'name': fields.char('Name', size=64, required=True),
'quantity': fields.float('Quantity', digits=(16,2), help="The optional quantity expressed by this line, eg: number of product sold. The quantity is not a legal requirement but is very useful for some reports."),
@@ -491,6 +500,7 @@ class account_move_line(osv.osv):
'statement_id': fields.many2one('account.bank.statement', 'Statement', help="The bank statement used for bank reconciliation", select=1),
'reconcile_id': fields.many2one('account.move.reconcile', 'Reconcile', readonly=True, ondelete='set null', select=2),
'reconcile_partial_id': fields.many2one('account.move.reconcile', 'Partial Reconcile', readonly=True, ondelete='set null', select=2),
+ 'reconcile': fields.function(_get_reconcile, type='char', string='Reconcile'),
'amount_currency': fields.float('Amount Currency', help="The amount expressed in an optional other currency if it is a multi-currency entry.", digits_compute=dp.get_precision('Account')),
'amount_residual_currency': fields.function(_amount_residual, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in its currency (maybe different of the company currency)."),
'amount_residual': fields.function(_amount_residual, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in the company currency."),
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 19e0f22162c..c9c95cd8d69 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -1003,8 +1003,7 @@
-
-
+
@@ -1183,7 +1182,7 @@
- Click to register a new journal item.
+ Select the period and the journal you want to fill.
This view can be used by accountants in order to quickly record
entries in OpenERP. If you want to record a supplier invoice,
From 7e1ffaf6132f39baeb3bc1ec7849a43567f09d8a Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Thu, 22 Nov 2012 11:45:04 +0100
Subject: [PATCH 22/48] [REM]Remove all account.journal.view and
account.journal.column references
bzr revid: dle@openerp.com-20121122104504-ezgj2666zkhgybpj
---
addons/account/account.py | 117 -----
addons/account/account_bank.py | 6 -
addons/account/account_view.xml | 2 +-
addons/account/data/account_data.xml | 406 ------------------
addons/account/demo/account_minimal.xml | 3 -
addons/account/security/ir.model.access.csv | 4 -
.../account/test/account_fiscalyear_close.yml | 1 -
.../test/account_validate_account_move.yml | 10 +-
.../account_analytic_plans_view.xml | 9 -
addons/account_check_writing/account_view.xml | 2 +-
.../account_sequence_data.xml | 41 +-
addons/account_voucher/test/case1_usd_usd.yml | 1 -
.../test/case2_suppl_usd_eur.yml | 2 -
.../test/case2_usd_eur_debtor_in_eur.yml | 2 -
.../test/case2_usd_eur_debtor_in_usd.yml | 2 -
addons/account_voucher/test/case3_eur_eur.yml | 1 -
addons/account_voucher/test/case4_cad_chf.yml | 1 -
.../test/case5_suppl_usd_usd.yml | 2 -
addons/account_voucher/test/case_eur_usd.yml | 1 -
.../hr_expense/security/ir.model.access.csv | 2 -
.../hr_timesheet/security/ir.model.access.csv | 2 -
.../security/ir.model.access.csv | 4 -
addons/stock/stock_data.xml | 1 -
.../test/stock_location_pull_flow.yml | 2 -
24 files changed, 8 insertions(+), 616 deletions(-)
diff --git a/addons/account/account.py b/addons/account/account.py
index 30e0b784de8..8f967760201 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -685,44 +685,6 @@ class account_account(osv.osv):
account_account()
-class account_journal_view(osv.osv):
- _name = "account.journal.view"
- _description = "Journal View"
- _columns = {
- 'name': fields.char('Journal View', size=64, required=True, translate=True),
- 'columns_id': fields.one2many('account.journal.column', 'view_id', 'Columns')
- }
- _order = "name"
-
-account_journal_view()
-
-
-class account_journal_column(osv.osv):
-
- def _col_get(self, cr, user, context=None):
- result = []
- cols = self.pool.get('account.move.line')._columns
- for col in cols:
- if col in ('period_id', 'journal_id'):
- continue
- result.append( (col, cols[col].string) )
- result.sort()
- return result
-
- _name = "account.journal.column"
- _description = "Journal Column"
- _columns = {
- 'name': fields.char('Column Name', size=64, required=True),
- 'field': fields.selection(_col_get, 'Field Name', required=True, size=32),
- 'view_id': fields.many2one('account.journal.view', 'Journal View', select=True),
- 'sequence': fields.integer('Sequence', help="Gives the sequence order to journal column.", readonly=True),
- 'required': fields.boolean('Required'),
- 'readonly': fields.boolean('Readonly'),
- }
- _order = "view_id, sequence"
-
-account_journal_column()
-
class account_journal(osv.osv):
_name = "account.journal"
_description = "Journal"
@@ -738,7 +700,6 @@ class account_journal(osv.osv):
" Select 'Opening/Closing Situation' for entries generated for new fiscal years."),
'type_control_ids': fields.many2many('account.account.type', 'account_journal_type_rel', 'journal_id','type_id', 'Type Controls', domain=[('code','<>','view'), ('code', '<>', 'closed')]),
'account_control_ids': fields.many2many('account.account', 'account_account_type_rel', 'journal_id','account_id', 'Account', domain=[('type','<>','view'), ('type', '<>', 'closed')]),
- #'view_id': fields.many2one('account.journal.view', 'Display Mode', required=True, help="Gives the view used when writing or browsing entries in this journal. The view tells OpenERP which fields should be visible, required or readonly and in which order. You can create your own view for a faster encoding in each journal."),
'default_credit_account_id': fields.many2one('account.account', 'Default Credit Account', domain="[('type','!=','view')]", help="It acts as a default account for credit amount"),
'default_debit_account_id': fields.many2one('account.account', 'Default Debit Account', domain="[('type','!=','view')]", help="It acts as a default account for debit amount"),
'centralisation': fields.boolean('Centralised Counterpart', help="Check this box to determine that each entry of this journal won't create a new counterpart but will share the same counterpart. This is used in fiscal year closing."),
@@ -874,37 +835,6 @@ class account_journal(osv.osv):
return self.name_get(cr, user, ids, context=context)
- def onchange_type(self, cr, uid, ids, type, currency, context=None):
- obj_data = self.pool.get('ir.model.data')
- user_pool = self.pool.get('res.users')
-
- type_map = {
- 'sale':'account_sp_journal_view',
- 'sale_refund':'account_sp_refund_journal_view',
- 'purchase':'account_sp_journal_view',
- 'purchase_refund':'account_sp_refund_journal_view',
- 'cash':'account_journal_bank_view',
- 'bank':'account_journal_bank_view',
- 'general':'account_journal_view',
- 'situation':'account_journal_view'
- }
-
- res = {}
- view_id = type_map.get(type, 'account_journal_view')
- user = user_pool.browse(cr, uid, uid)
- if type in ('cash', 'bank') and currency and user.company_id.currency_id.id != currency:
- view_id = 'account_journal_bank_view_multi'
- data_id = obj_data.search(cr, uid, [('model','=','account.journal.view'), ('name','=',view_id)])
- data = obj_data.browse(cr, uid, data_id[0], context=context)
-
- res.update({
- 'centralisation':type == 'situation',
- 'view_id':data.res_id,
- })
- return {
- 'value':res
- }
-
account_journal()
class account_fiscalyear(osv.osv):
@@ -3161,53 +3091,6 @@ class wizard_multi_charts_accounts(osv.osv_memory):
default_account = acc_template_ref.get(template.property_account_income_opening.id)
return default_account
- def _get_view_id(journal_type):
- # Get the journal views
- if journal_type in ('general', 'situation'):
- data = obj_data.get_object_reference(cr, uid, 'account', 'account_journal_view')
- elif journal_type in ('sale_refund', 'purchase_refund'):
- data = obj_data.get_object_reference(cr, uid, 'account', 'account_sp_refund_journal_view')
- else:
- data = obj_data.get_object_reference(cr, uid, 'account', 'account_sp_journal_view')
- return data and data[1] or False
-
- journal_names = {
- 'sale': _('Sales Journal'),
- 'purchase': _('Purchase Journal'),
- 'sale_refund': _('Sales Refund Journal'),
- 'purchase_refund': _('Purchase Refund Journal'),
- 'general': _('Miscellaneous Journal'),
- 'situation': _('Opening Entries Journal'),
- }
- journal_codes = {
- 'sale': _('SAJ'),
- 'purchase': _('EXJ'),
- 'sale_refund': _('SCNJ'),
- 'purchase_refund': _('ECNJ'),
- 'general': _('MISC'),
- 'situation': _('OPEJ'),
- }
-
- obj_data = self.pool.get('ir.model.data')
- analytic_journal_obj = self.pool.get('account.analytic.journal')
- template = self.pool.get('account.chart.template').browse(cr, uid, chart_template_id, context=context)
-
- journal_data = []
- for journal_type in ['sale', 'purchase', 'sale_refund', 'purchase_refund', 'general', 'situation']:
- vals = {
- 'type': journal_type,
- 'name': journal_names[journal_type],
- 'code': journal_codes[journal_type],
- 'company_id': company_id,
- 'centralisation': journal_type == 'situation',
- 'view_id': _get_view_id(journal_type),
- 'analytic_journal_id': _get_analytic_journal(journal_type),
- 'default_credit_account_id': _get_default_account(journal_type, 'credit'),
- 'default_debit_account_id': _get_default_account(journal_type, 'debit'),
- }
- journal_data.append(vals)
- return journal_data
-
def generate_properties(self, cr, uid, chart_template_id, acc_template_ref, company_id, context=None):
"""
This method used for creating properties.
diff --git a/addons/account/account_bank.py b/addons/account/account_bank.py
index 2323f8aaa8a..52b95f1d289 100644
--- a/addons/account/account_bank.py
+++ b/addons/account/account_bank.py
@@ -89,11 +89,6 @@ class bank(osv.osv):
}
acc_bank_id = obj_acc.create(cr,uid,acc,context=context)
- # Get the journal view id
- data_id = obj_data.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_journal_bank_view')])
- data = obj_data.browse(cr, uid, data_id[0], context=context)
- view_id_cash = data.res_id
-
jour_obj = self.pool.get('account.journal')
new_code = 1
while True:
@@ -112,7 +107,6 @@ class bank(osv.osv):
'analytic_journal_id': False,
'default_credit_account_id': acc_bank_id,
'default_debit_account_id': acc_bank_id,
- 'view_id': view_id_cash
}
journal_id = jour_obj.create(cr, uid, vals_journal, context=context)
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index c9c95cd8d69..0116db16f03 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -397,7 +397,7 @@
-
+
diff --git a/addons/account/data/account_data.xml b/addons/account/data/account_data.xml
index dd27cfbab4e..97bea14c1f2 100644
--- a/addons/account/data/account_data.xml
+++ b/addons/account/data/account_data.xml
@@ -59,412 +59,6 @@
-
-
- Bank/Cash Journal View
-
-
-
- Date
- date
-
-
-
-
-
- Journal Entry
- move_id
-
-
-
-
-
- Name
- name
-
-
-
-
-
- Statement
- statement_id
-
-
-
-
- Partner
- partner_id
-
-
-
-
- Account
- account_id
-
-
-
-
-
- Debit
- debit
-
-
-
-
- Credit
- credit
-
-
-
-
- Ref
- ref
-
-
-
-
- Status
- state
-
-
-
-
- Reconcile
- reconcile_id
-
-
-
-
-
- Bank/Cash Journal (Multi-Currency) View
-
-
-
- Date
- date
-
-
-
-
-
- Journal Entry
- move_id
-
-
-
-
-
- Name
- name
-
-
-
-
-
- Statement
- statement_id
-
-
-
-
- Partner
- partner_id
-
-
-
-
- Account
- account_id
-
-
-
-
-
- Currency Amt.
- amount_currency
-
-
-
-
- Currency
- currency_id
-
-
-
-
- Debit
- debit
-
-
-
-
- Credit
- credit
-
-
-
-
- Ref
- ref
-
-
-
-
- Status
- state
-
-
-
-
- Reconcile
- reconcile_id
-
-
-
-
-
- Journal View
-
-
-
- Date
- date
-
-
-
-
-
- Journal Entry
- move_id
-
-
-
-
-
- Ref
- ref
-
-
-
-
- Partner
- partner_id
-
-
-
-
- Account
- account_id
-
-
-
-
-
- Name
- name
-
-
-
-
-
- Debit
- debit
-
-
-
-
- Credit
- credit
-
-
-
-
- Analytic Account
- analytic_account_id
-
-
-
-
- Status
- state
-
-
-
-
-
- Sale/Purchase Journal View
-
-
-
- Date
- date
-
-
-
-
-
- Journal Entry
- move_id
-
-
-
-
-
- Ref
- ref
-
-
-
-
- Account
- account_id
-
-
-
-
-
- Partner
- partner_id
-
-
-
-
- Name
- name
-
-
-
-
-
- Due Date
- date_maturity
-
-
-
-
- Debit
- debit
-
-
-
-
- Credit
- credit
-
-
-
-
- Tax
- account_tax_id
-
-
-
-
- Analytic Account
- analytic_account_id
-
-
-
-
- Status
- state
-
-
-
-
- Reconcile
- reconcile_id
-
-
-
-
- Sale/Purchase Refund Journal View
-
-
-
- Date
- date
-
-
-
-
-
- Journal Entry
- move_id
-
-
-
-
-
- Ref
- ref
-
-
-
-
- Account
- account_id
-
-
-
-
-
- Partner
- partner_id
-
-
-
-
- Name
- name
-
-
-
-
-
- Due Date
- date_maturity
-
-
-
-
- Debit
- debit
-
-
-
-
- Credit
- credit
-
-
-
-
- Tax
- account_tax_id
-
-
-
-
- Analytic Account
- analytic_account_id
-
-
-
-
- Status
- state
-
-
-
-
- Reconcile
- reconcile_id
-
-
-
diff --git a/addons/account/demo/account_minimal.xml b/addons/account/demo/account_minimal.xml
index 984711eceef..d0453cfd365 100644
--- a/addons/account/demo/account_minimal.xml
+++ b/addons/account/demo/account_minimal.xml
@@ -401,7 +401,6 @@
Miscellaneous Journal - (test)
TMIS
general
-
@@ -410,7 +409,6 @@
Opening Entries Journal - (test)
TOEJ
situation
-
@@ -422,7 +420,6 @@
USD Bank Journal - (test)
TUBK
bank
-
diff --git a/addons/account/security/ir.model.access.csv b/addons/account/security/ir.model.access.csv
index 28bedbf65a1..d1f0bbab6b5 100644
--- a/addons/account/security/ir.model.access.csv
+++ b/addons/account/security/ir.model.access.csv
@@ -7,8 +7,6 @@ access_account_tax_internal_user,account.tax internal user,model_account_tax,bas
access_account_account,account.account,model_account_account,account.group_account_user,1,0,0,0
access_account_account_user,account.account user,model_account_account,base.group_user,1,0,0,0
access_account_account_partner_manager,account.account partner manager,model_account_account,base.group_partner_manager,1,0,0,0
-access_account_journal_view,account.journal.view,model_account_journal_view,account.group_account_user,1,0,0,0
-access_account_journal_column,account.journal.column,model_account_journal_column,account.group_account_user,1,0,0,0
access_account_journal_period_manager,account.journal.period manager,model_account_journal_period,account.group_account_manager,1,0,0,0
access_account_tax_code,account.tax.code,model_account_tax_code,account.group_account_invoice,1,0,0,0
access_account_tax,account.tax,model_account_tax,account.group_account_invoice,1,0,0,0
@@ -83,8 +81,6 @@ access_account_entries_report_employee,account.entries.report employee,model_acc
access_analytic_entries_report_manager,analytic.entries.report,model_analytic_entries_report,account.group_account_manager,1,0,0,0
access_account_cashbox_line,account.cashbox.line,model_account_cashbox_line,account.group_account_user,1,1,1,1
access_account_journal_cashbox_line,account.journal.cashbox.line,model_account_journal_cashbox_line,account.group_account_user,1,1,1,0
-access_account_journal_view_invoice,account.journal.view invoice,model_account_journal_view,account.group_account_invoice,1,1,1,1
-access_account_journal_column_invoice,account.journal.column invoice,model_account_journal_column,account.group_account_invoice,1,1,1,1
access_account_invoice_tax_accountant,account.invoice.tax accountant,model_account_invoice_tax,account.group_account_user,1,0,0,0
access_account_move_reconcile_manager,account.move.reconcile manager,model_account_move_reconcile,account.group_account_manager,1,0,0,0
access_account_analytic_line_invoice,account.analytic.line invoice,model_account_analytic_line,account.group_account_invoice,1,1,1,1
diff --git a/addons/account/test/account_fiscalyear_close.yml b/addons/account/test/account_fiscalyear_close.yml
index 1e24d2ca0e7..10c949118c9 100644
--- a/addons/account/test/account_fiscalyear_close.yml
+++ b/addons/account/test/account_fiscalyear_close.yml
@@ -29,7 +29,6 @@
default_debit_account_id: cash
default_credit_account_id: cash
company_id: base.main_company
- view_id: account_journal_bank_view
centralisation: 1
-
I called the Generate Fiscalyear Opening Entries wizard
diff --git a/addons/account/test/account_validate_account_move.yml b/addons/account/test/account_validate_account_move.yml
index f5dbbbc92db..9e0141cfff0 100644
--- a/addons/account/test/account_validate_account_move.yml
+++ b/addons/account/test/account_validate_account_move.yml
@@ -32,8 +32,8 @@
import time
date = self._get_date(cr, uid, {'lang': u'en_US', 'normal_view': False, 'active_model': 'ir.ui.menu',
'search_default_journal_id': 1, 'journal_type': 'sale', 'search_default_period_id': 6, 'journal_id': 1, 'view_mode': False,
- 'visible_id': 1, 'period_id': 6, 'tz': False, 'active_ids': [ref('action_account_manual_account_move_line_quickadd')],
- 'search_default_posted': 0, 'active_id': ref('action_account_manual_account_move_line_quickadd')})
+ 'visible_id': 1, 'period_id': 6, 'tz': False, 'active_ids': [ref('action_account_moves_all_a')],
+ 'search_default_posted': 0, 'active_id': ref('action_account_moves_all_a')})
partner = self.onchange_partner_id(cr, uid, [], False, ref('base.res_partner_12'), ref('account.cash'), debit=0, credit=2000, date=date, journal=False)
account = self.onchange_account_id(cr, uid, [], account_id=ref('account.a_recv'), partner_id= ref('base.res_partner_12'))
vals = {
@@ -62,11 +62,11 @@
!python {model: account.move.line}: |
ids = self._balance_search(cr, uid, self, 'balance', [('balance', '=', 2000.0)], None, {'lang': u'en_US', 'tz': False, 'active_model': 'ir.ui.menu',
'search_default_journal_id': 1, 'journal_type': 'sale', 'search_default_period_id': 6, 'view_mode': False, 'visible_id': 1,
- 'active_ids': [ref('action_account_manual_account_move_line_quickadd')], 'search_default_posted': 0, 'active_id': ref('action_account_manual_account_move_line_quickadd')})
+ 'active_ids': [ref('action_account_moves_all_a')], 'search_default_posted': 0, 'active_id': ref('action_account_moves_all_a')})
bal = self._balance(cr, uid, ids[0][2], 'balance', None,{'lang': u'en_US', 'tz': False, 'active_model': 'ir.ui.menu',
'search_default_journal_id': 1, 'journal_type': 'sale', 'search_default_period_id': 6, 'view_mode': False,
- 'visible_id': 1, 'active_ids': [ref('action_account_manual_account_move_line_quickadd')], 'search_default_posted': 0,
- 'active_id': ref('action_account_manual_account_move_line_quickadd')})
+ 'visible_id': 1, 'active_ids': [ref('action_account_moves_all_a')], 'search_default_posted': 0,
+ 'active_id': ref('action_account_moves_all_a')})
assert bal, 'Balance has not been computed correctly'
-
I check that Initially account move state is "Draft"
diff --git a/addons/account_analytic_plans/account_analytic_plans_view.xml b/addons/account_analytic_plans/account_analytic_plans_view.xml
index e5c02c8640e..3dcbcda6952 100644
--- a/addons/account_analytic_plans/account_analytic_plans_view.xml
+++ b/addons/account_analytic_plans/account_analytic_plans_view.xml
@@ -29,15 +29,6 @@
-
-
-
-
-
-
-
-
-
account.move.line.form.inherit
account.move.line
diff --git a/addons/account_check_writing/account_view.xml b/addons/account_check_writing/account_view.xml
index 53dd1cb1c93..df8d1461a3f 100644
--- a/addons/account_check_writing/account_view.xml
+++ b/addons/account_check_writing/account_view.xml
@@ -11,7 +11,7 @@
account.journal
-
+
diff --git a/addons/account_sequence/account_sequence_data.xml b/addons/account_sequence/account_sequence_data.xml
index b2d40412d0d..21aaaf2baee 100644
--- a/addons/account_sequence/account_sequence_data.xml
+++ b/addons/account_sequence/account_sequence_data.xml
@@ -3,46 +3,7 @@
-
-
-
- Internal Number
- internal_sequence_number
-
-
-
-
-
-
- Internal Number
- internal_sequence_number
-
-
-
-
-
-
- Internal Number
- internal_sequence_number
-
-
-
-
-
-
- Internal Number
- internal_sequence_number
-
-
-
-
-
-
- Internal Number
- internal_sequence_number
-
-
-
+
Account Journal
account.journal
diff --git a/addons/account_voucher/test/case1_usd_usd.yml b/addons/account_voucher/test/case1_usd_usd.yml
index 300d565f229..0f4c2058fc7 100644
--- a/addons/account_voucher/test/case1_usd_usd.yml
+++ b/addons/account_voucher/test/case1_usd_usd.yml
@@ -66,7 +66,6 @@
default_credit_account_id: account_cash_usd_id
currency: base.USD
company_id: base.main_company
- view_id: account.account_journal_bank_view
-
I create the first invoice on 1st January for 200 USD
diff --git a/addons/account_voucher/test/case2_suppl_usd_eur.yml b/addons/account_voucher/test/case2_suppl_usd_eur.yml
index 1a0c250395e..b32228032d3 100644
--- a/addons/account_voucher/test/case2_suppl_usd_eur.yml
+++ b/addons/account_voucher/test/case2_suppl_usd_eur.yml
@@ -23,7 +23,6 @@
default_credit_account_id: account.cash
currency: base.EUR
company_id: base.main_company
- view_id: account.account_journal_bank_view
-
I create a bank journal with USD as currency
-
@@ -37,7 +36,6 @@
default_credit_account_id: account.cash
currency: base.USD
company_id: base.main_company
- view_id: account.account_journal_bank_view
-
I create the first invoice on 1st January for 200 USD
-
diff --git a/addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml b/addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml
index 91f8a629cbb..275e4c58835 100644
--- a/addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml
+++ b/addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml
@@ -59,7 +59,6 @@
default_debit_account_id: account.cash
default_credit_account_id: account.cash
company_id: base.main_company
- view_id: account.account_journal_bank_view
-
I create a bank journal with USD as currency
-
@@ -73,7 +72,6 @@
default_credit_account_id: account_cash_usd_id
currency: base.USD
company_id: base.main_company
- view_id: account.account_journal_bank_view
-
I create the first invoice on 1st January for 200 USD
-
diff --git a/addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml b/addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml
index cc5e819af30..667882e3a32 100644
--- a/addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml
+++ b/addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml
@@ -59,7 +59,6 @@
default_debit_account_id: account.cash
default_credit_account_id: account.cash
company_id: base.main_company
- view_id: account.account_journal_bank_view
-
I create a bank journal with USD as currency
-
@@ -73,7 +72,6 @@
default_credit_account_id: account_cash_usd_id
currency: base.USD
company_id: base.main_company
- view_id: account.account_journal_bank_view
-
I create the first invoice on 1st January for 200 USD
-
diff --git a/addons/account_voucher/test/case3_eur_eur.yml b/addons/account_voucher/test/case3_eur_eur.yml
index 37ea7ea981a..f2f9461c31e 100644
--- a/addons/account_voucher/test/case3_eur_eur.yml
+++ b/addons/account_voucher/test/case3_eur_eur.yml
@@ -27,7 +27,6 @@
default_debit_account_id: account.cash
default_credit_account_id: account.cash
company_id: base.main_company
- view_id: account.account_journal_bank_view
-
I create the first invoice on 1st January for 150 EUR
-
diff --git a/addons/account_voucher/test/case4_cad_chf.yml b/addons/account_voucher/test/case4_cad_chf.yml
index a2b252497cd..bc33e387a85 100644
--- a/addons/account_voucher/test/case4_cad_chf.yml
+++ b/addons/account_voucher/test/case4_cad_chf.yml
@@ -61,7 +61,6 @@
default_credit_account_id: account_cash_chf_id
currency: base.CHF
company_id: base.main_company
- view_id: account.account_journal_bank_view
-
I create the first invoice on 1st January for 200 CAD
-
diff --git a/addons/account_voucher/test/case5_suppl_usd_usd.yml b/addons/account_voucher/test/case5_suppl_usd_usd.yml
index 3cae9667d84..55377825dcb 100644
--- a/addons/account_voucher/test/case5_suppl_usd_usd.yml
+++ b/addons/account_voucher/test/case5_suppl_usd_usd.yml
@@ -46,7 +46,6 @@
default_debit_account_id: account.cash
default_credit_account_id: account.cash
company_id: base.main_company
- view_id: account.account_journal_bank_view
-
I create a bank journal with USD as currency
-
@@ -60,7 +59,6 @@
default_credit_account_id: account_cash_usd_id
currency: base.USD
company_id: base.main_company
- view_id: account.account_journal_bank_view
-
I set the context as would do the action in supplier invoice menuitem
-
diff --git a/addons/account_voucher/test/case_eur_usd.yml b/addons/account_voucher/test/case_eur_usd.yml
index 125277191cb..94f0c718980 100644
--- a/addons/account_voucher/test/case_eur_usd.yml
+++ b/addons/account_voucher/test/case_eur_usd.yml
@@ -40,7 +40,6 @@
default_credit_account_id: account_eur_usd_id
currency: base.USD
company_id: base.main_company
- view_id: account.account_journal_bank_view
-
I create an invoice
-
diff --git a/addons/hr_expense/security/ir.model.access.csv b/addons/hr_expense/security/ir.model.access.csv
index 092424ef7e6..361a3d8c74f 100644
--- a/addons/hr_expense/security/ir.model.access.csv
+++ b/addons/hr_expense/security/ir.model.access.csv
@@ -20,5 +20,3 @@ access_account_move_user,account.move.user,account.model_account_move,base.group
access_account_move_line_user,account.move.line.user,account.model_account_move_line,base.group_hr_user,1,1,1,1
access_account_analytic_line_user,account.ianalytic.line.user,account.model_account_analytic_line,base.group_hr_user,1,1,1,1
access_account_journal_period_manager,account.journal.period.manager,account.model_account_journal_period,base.group_hr_manager,1,1,1,1
-hr.access_account_journal_view_hruser,account.journal.view hruser,account.model_account_journal_view,base.group_hr_user,1,0,0,0
-hr.access_account_journal_column_hruser,account.journal.column hruser,account.model_account_journal_column,base.group_hr_user,1,0,0,0
diff --git a/addons/hr_timesheet/security/ir.model.access.csv b/addons/hr_timesheet/security/ir.model.access.csv
index 069a5a9c170..689d425054a 100644
--- a/addons/hr_timesheet/security/ir.model.access.csv
+++ b/addons/hr_timesheet/security/ir.model.access.csv
@@ -8,7 +8,5 @@ access_product_product_user,product.product user,product.model_product_product,b
access_product_template_hr_timesheet,product.template.hr.timesheet,product.model_product_template,base.group_hr_user,1,1,1,1
access_product_uom_hr_timesheet,product.uom.hr.timesheet,product.model_product_uom,base.group_hr_user,1,1,1,1
access_account_fiscalyear_hr_user,account.account.fiscalyear.user,account.model_account_fiscalyear,base.group_hr_user,1,1,1,1
-hr.access_account_journal_view_hruser,account.journal.view hruser,account.model_account_journal_view,base.group_hr_user,1,0,0,0
-hr.access_account_journal_column_hruser,account.journal.column hruser,account.model_account_journal_column,base.group_hr_user,1,0,0,0
access_hr_analytic_timesheet_user,hr.analytic.timesheet.user,model_hr_analytic_timesheet,base.group_user,1,1,1,0
access_account_analytic_journal_user,account.account.analytic.journal.user,account.model_account_analytic_journal,base.group_user,1,0,0,0
diff --git a/addons/point_of_sale/security/ir.model.access.csv b/addons/point_of_sale/security/ir.model.access.csv
index 74b4bbf5753..1d2c22053fb 100644
--- a/addons/point_of_sale/security/ir.model.access.csv
+++ b/addons/point_of_sale/security/ir.model.access.csv
@@ -42,12 +42,8 @@ access_account_move,account.move,account.model_account_move,group_pos_manager,1,
access_account_journal,account.journal,account.model_account_journal,group_pos_user,1,1,1,0
access_account_journal_period_user,account.journal.period user,account.model_account_journal_period,group_pos_user,1,1,1,1
access_account_journal_period_manager,account.journal.period manager,account.model_account_journal_period,group_pos_manager,1,0,0,0
-access_account_journal_view,account.journal.view,account.model_account_journal_view,group_pos_user,1,1,1,0
-access_account_journal_view_manager,account.journal.view manager,account.model_account_journal_view,group_pos_manager,1,0,0,0
access_account_analytic_line,account.analytic.line,analytic.model_account_analytic_line,group_pos_user,1,1,1,0
access_account_analytic_account,account.analytic.account,analytic.model_account_analytic_account,group_pos_user,1,1,1,0
-access_account_journal_column,account.journal.column,account.model_account_journal_column,group_pos_user,1,1,1,0
-access_account_journal_column_manager,account.journal.column manager,account.model_account_journal_column,group_pos_manager,1,0,0,0
access_ir_property_pos_manager,ir.property manager,base.model_ir_property,group_pos_manager,1,1,1,1
access_account_bank_statement_line_manager,account.bank.statement.line manager,account.model_account_bank_statement_line,group_pos_manager,1,1,1,1
access_account_invoice_manager,account.invoice manager,account.model_account_invoice,group_pos_manager,1,1,1,1
diff --git a/addons/stock/stock_data.xml b/addons/stock/stock_data.xml
index a1ce136e304..6a955d950bb 100644
--- a/addons/stock/stock_data.xml
+++ b/addons/stock/stock_data.xml
@@ -21,7 +21,6 @@ watch your stock valuation, and track production lots upstream and downstream (b
Stock Journal
STJ
general
-
diff --git a/addons/stock_location/test/stock_location_pull_flow.yml b/addons/stock_location/test/stock_location_pull_flow.yml
index a7dd7d82607..0ff1b5d3af8 100644
--- a/addons/stock_location/test/stock_location_pull_flow.yml
+++ b/addons/stock_location/test/stock_location_pull_flow.yml
@@ -58,7 +58,6 @@
name: Purchase Journal For Tests
sequence_id: account.sequence_purchase_journal
type: purchase
- view_id: account.account_journal_bank_view
-
I create a Sale Journal.
@@ -69,7 +68,6 @@
name: Sale Journal For Tests
sequence_id: account.sequence_sale_journal
type: sale
- view_id: account.account_journal_view
-
I create an Expense Account
From eeeae94645a772e26475639f93dd40cfbabe115b Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Thu, 22 Nov 2012 12:05:28 +0100
Subject: [PATCH 23/48] [DEL]view_id references in account_minimal.xml
bzr revid: dle@openerp.com-20121122110528-nxsqszj88fgim2jj
---
addons/account/demo/account_minimal.xml | 7 -------
1 file changed, 7 deletions(-)
diff --git a/addons/account/demo/account_minimal.xml b/addons/account/demo/account_minimal.xml
index d0453cfd365..ce9a09def08 100644
--- a/addons/account/demo/account_minimal.xml
+++ b/addons/account/demo/account_minimal.xml
@@ -312,7 +312,6 @@
Sales Journal - (test)
TSAJ
sale
-
@@ -323,7 +322,6 @@
Sales Credit Note Journal - (test)
TSCNJ
sale_refund
-
@@ -335,7 +333,6 @@
Expenses Journal - (test)
TEXJ
purchase
-
@@ -346,7 +343,6 @@
Expenses Credit Notes Journal - (test)
TECNJ
purchase_refund
-
@@ -358,7 +354,6 @@
Bank Journal - (test)
TBNK
bank
-
@@ -369,7 +364,6 @@
Checks Journal - (test)
TCHK
bank
-
@@ -390,7 +384,6 @@
that test OpenERP arrive directly in the touchscreen UI.
-->
-
From 7e6b2035ae12eddfc72d1b81e44005e74c035811 Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Thu, 22 Nov 2012 12:27:29 +0100
Subject: [PATCH 24/48] [DEL]View_id references missed
bzr revid: dle@openerp.com-20121122112729-0osh95257ssn5sxy
---
addons/account/account.py | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/addons/account/account.py b/addons/account/account.py
index 8f967760201..af0d5147220 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -3300,11 +3300,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
'''
obj_data = self.pool.get('ir.model.data')
obj_journal = self.pool.get('account.journal')
- # Get the id of journal views
- tmp = obj_data.get_object_reference(cr, uid, 'account', 'account_journal_bank_view_multi')
- view_id_cur = tmp and tmp[1] or False
- tmp = obj_data.get_object_reference(cr, uid, 'account', 'account_journal_bank_view')
- view_id_cash = tmp and tmp[1] or False
+
# we need to loop again to find next number for journal code
# because we can't rely on the value current_num as,
@@ -3330,10 +3326,8 @@ class wizard_multi_charts_accounts(osv.osv_memory):
'default_debit_account_id': default_account_id,
}
if line['currency_id']:
- vals['view_id'] = view_id_cur
vals['currency'] = line['currency_id']
- else:
- vals['view_id'] = view_id_cash
+
return vals
def _prepare_bank_account(self, cr, uid, line, new_code, acc_template_ref, ref_acc_bank, company_id, context=None):
From 49f3f3d39f3a844b50d4666bce5bb2ea5a5c4989 Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Thu, 22 Nov 2012 12:55:17 +0100
Subject: [PATCH 25/48] [FIX]Too much deleted in _prepare_all_journals
bzr revid: dle@openerp.com-20121122115517-j1i3srgux7extgp8
---
addons/account/account.py | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/addons/account/account.py b/addons/account/account.py
index af0d5147220..88d6bebb9f5 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -3091,6 +3091,42 @@ class wizard_multi_charts_accounts(osv.osv_memory):
default_account = acc_template_ref.get(template.property_account_income_opening.id)
return default_account
+ journal_names = {
+ 'sale': _('Sales Journal'),
+ 'purchase': _('Purchase Journal'),
+ 'sale_refund': _('Sales Refund Journal'),
+ 'purchase_refund': _('Purchase Refund Journal'),
+ 'general': _('Miscellaneous Journal'),
+ 'situation': _('Opening Entries Journal'),
+ }
+ journal_codes = {
+ 'sale': _('SAJ'),
+ 'purchase': _('EXJ'),
+ 'sale_refund': _('SCNJ'),
+ 'purchase_refund': _('ECNJ'),
+ 'general': _('MISC'),
+ 'situation': _('OPEJ'),
+ }
+
+ obj_data = self.pool.get('ir.model.data')
+ analytic_journal_obj = self.pool.get('account.analytic.journal')
+ template = self.pool.get('account.chart.template').browse(cr, uid, chart_template_id, context=context)
+
+ journal_data = []
+ for journal_type in ['sale', 'purchase', 'sale_refund', 'purchase_refund', 'general', 'situation']:
+ vals = {
+ 'type': journal_type,
+ 'name': journal_names[journal_type],
+ 'code': journal_codes[journal_type],
+ 'company_id': company_id,
+ 'centralisation': journal_type == 'situation',
+ 'analytic_journal_id': _get_analytic_journal(journal_type),
+ 'default_credit_account_id': _get_default_account(journal_type, 'credit'),
+ 'default_debit_account_id': _get_default_account(journal_type, 'debit'),
+ }
+ journal_data.append(vals)
+ return journal_data
+
def generate_properties(self, cr, uid, chart_template_id, acc_template_ref, company_id, context=None):
"""
This method used for creating properties.
From f1bf09c057b3b7b13f0b25646ee679bbeaa037f8 Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Thu, 22 Nov 2012 13:16:11 +0100
Subject: [PATCH 26/48] [DEL]Missed view_id ref in l10n_ch/journal_data.xml
bzr revid: dle@openerp.com-20121122121611-8mwds44161l1n25f
---
addons/l10n_ch/journal_data.xml | 6 ------
1 file changed, 6 deletions(-)
diff --git a/addons/l10n_ch/journal_data.xml b/addons/l10n_ch/journal_data.xml
index ede9136c3d2..607273ed401 100644
--- a/addons/l10n_ch/journal_data.xml
+++ b/addons/l10n_ch/journal_data.xml
@@ -5,7 +5,6 @@
Journal de frais
EXPF
purchase
-
@@ -15,7 +14,6 @@
Banque CHF
BCHF
bank
-
@@ -26,7 +24,6 @@
Banque EUR
BEUR
bank
-
@@ -37,7 +34,6 @@
Caisse
CAI
cash
-
@@ -47,7 +43,6 @@
Opérations Diverses
OD
general
-
@@ -58,7 +53,6 @@
JO
situation
True
-
From e18841b518cfad71a267ced4ab1658d32e602573 Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Thu, 22 Nov 2012 13:37:16 +0100
Subject: [PATCH 27/48] [DEL]Missed view_id ref in
multi_company/multi_company_demo.xml
bzr revid: dle@openerp.com-20121122123716-lohu4xuhjd2nzm4c
---
addons/multi_company/multi_company_demo.xml | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/addons/multi_company/multi_company_demo.xml b/addons/multi_company/multi_company_demo.xml
index 00c68186108..088aa35e915 100644
--- a/addons/multi_company/multi_company_demo.xml
+++ b/addons/multi_company/multi_company_demo.xml
@@ -191,7 +191,6 @@
Sales Journal - (OpenERP IN)
SAJ-OpenERP IN
sale
-
@@ -204,7 +203,6 @@
Sales Credit Note Journal - (OpenERP IN)
SCNJ-OpenERP IN
sale_refund
-
@@ -217,7 +215,6 @@
Expenses Journal - (OpenERP IN)
EXJ-OpenERP IN
purchase
-
@@ -230,7 +227,6 @@
Expenses Credit Notes Journal - (OpenERP IN)
ECNJ-OpenERP IN
purchase_refund
-
@@ -243,7 +239,6 @@
Bank Journal - (OpenERP IN)
BNK-OpenERP IN
bank
-
@@ -256,7 +251,6 @@
Checks Journal - (OpenERP IN)
CHK-OpenERP IN
bank
-
@@ -269,7 +263,6 @@
Cash Journal - (OpenERP IN)
CSH-OpenERP IN
cash
-
@@ -283,7 +276,6 @@
Sales Journal - (OpenERP US)
SAJ-OpenERP US
sale
-
@@ -296,7 +288,6 @@
Sales Credit Note Journal - (OpenERP US)
SCNJ-OpenERP US
sale_refund
-
@@ -309,7 +300,6 @@
Expenses Journal - (OpenERP US)
EXJ-OpenERP US
purchase
-
@@ -322,7 +312,6 @@
Expenses Credit Notes Journal - (OpenERP US)
ECNJ-OpenERP US
purchase_refund
-
@@ -335,7 +324,6 @@
Bank Journal - (OpenERP US)
BNK-OpenERP US
bank
-
@@ -348,7 +336,6 @@
Checks Journal - (OpenERP US)
CHK-OpenERP US
bank
-
@@ -361,7 +348,6 @@
Cash Journal - (OpenERP US)
CSH-OpenERP US
cash
-
@@ -376,7 +362,6 @@
Sales Journal - (OpenERP BE)
SAJ-OpenERP BE
sale
-
@@ -389,7 +374,6 @@
Sales Credit Note Journal - (OpenERP BE)
SCNJ-OpenERP BE
sale_refund
-
@@ -402,7 +386,6 @@
Expenses Journal - (OpenERP BE)
EXJ-OpenERP BE
purchase
-
@@ -415,7 +398,6 @@
Expenses Credit Notes Journal - (OpenERP BE)
ECNJ-OpenERP BE
purchase_refund
-
@@ -428,7 +410,6 @@
Bank Journal - (OpenERP BE)
BNK-OpenERP BE
bank
-
@@ -441,7 +422,6 @@
Checks Journal - (OpenERP BE)
CHK-OpenERP BE
bank
-
@@ -454,7 +434,6 @@
Cash Journal - (OpenERP BE)
CSH-OpenERP BE
cash
-
From 87477cdc529c0a52c2593fe0b66afe2303fc2bad Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Thu, 22 Nov 2012 14:50:09 +0100
Subject: [PATCH 28/48] [DEL]view_mode: true in quickadd action
bzr revid: dle@openerp.com-20121122135009-x1qty81i13gguan6
---
addons/account/account_view.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 0116db16f03..0de0898e409 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -350,8 +350,8 @@
parent="account.menu_multi_currency"/>
+ # Account Journal
+ -->
account.journal.tree
@@ -1178,7 +1178,7 @@
account.move.line
form
tree_account_move_line_quickadd
- {'journal_type':'general','view_mode':True}
+ {'journal_type':'general'}
From 0a5e921dff21ef99029a27b384397742c20cc84f Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Thu, 22 Nov 2012 15:28:59 +0100
Subject: [PATCH 29/48] [ADD]Possibility to select no journal and/or no period
bzr revid: dle@openerp.com-20121122142859-dornyupukdeaya5y
---
addons/account/account_move_line.py | 1 -
addons/account/account_view.xml | 4 +--
.../src/js/account_move_line_quickadd.js | 33 +++++++++----------
3 files changed, 17 insertions(+), 21 deletions(-)
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index bbdf2468010..1128ff465fe 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -1428,7 +1428,6 @@ class account_move_line(osv.osv):
ng = dict(self.pool.get('account.journal').name_search(cr,uid,'',[]))
ids = ng.keys()
result = []
- print ng
for journal in self.pool.get('account.journal').browse(cr, uid, ids, context=context):
result.append((journal.id,ng[journal.id],journal.type,
bool(journal.currency),bool(journal.analytic_journal_id)))
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 0de0898e409..c62607e12a1 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -991,6 +991,8 @@
+
+
@@ -1008,8 +1010,6 @@
-
-
diff --git a/addons/account/static/src/js/account_move_line_quickadd.js b/addons/account/static/src/js/account_move_line_quickadd.js
index 6ce27930741..2535a888bc9 100644
--- a/addons/account/static/src/js/account_move_line_quickadd.js
+++ b/addons/account/static/src/js/account_move_line_quickadd.js
@@ -28,11 +28,11 @@ openerp.account.quickadd = function (instance) {
this.$el.parent().prepend(QWeb.render("AccountMoveLineQuickAdd", {widget: this}));
this.$el.parent().find('.oe_account_select_journal').change(function() {
- self.current_journal = parseInt(this.value);
+ self.current_journal = this.value === '' ? null : parseInt(this.value);
self.do_search(self.last_domain, self.last_context, self.last_group_by);
});
this.$el.parent().find('.oe_account_select_period').change(function() {
- self.current_period = parseInt(this.value);
+ self.current_period = this.value === '' ? null : parseInt(this.value);
self.do_search(self.last_domain, self.last_context, self.last_group_by);
});
this.on('edit:after', this, function () {
@@ -43,6 +43,11 @@ openerp.account.quickadd = function (instance) {
self.$el.parent().find('.oe_account_select_journal').removeAttr('disabled');
self.$el.parent().find('.oe_account_select_period').removeAttr('disabled');
});
+ var mod = new instance.web.Model("account.move.line", self.dataset.context, self.dataset.domain);
+ mod.call("default_get", [['journal_id','period_id'],self.dataset.context]).then(function(result) {
+ self.current_period = result['period_id'];
+ self.current_journal = result['journal_id'];
+ });
return tmp;
},
do_search: function(domain, context, group_by) {
@@ -56,15 +61,10 @@ openerp.account.quickadd = function (instance) {
self.journals = result;
}),mod.call("list_periods", []).then(function(result) {
self.periods = result;
- }),mod.call("default_get", [['journal_id','period_id'],self.last_context]).then(function(result) {
- self.default_period = result['period_id'];
- self.default_journal = result['journal_id'];
})).then(function () {
- self.current_journal = self.current_journal === null ? self.default_journal : self.current_journal;
- self.current_period = self.current_period === null ? self.default_period :self.current_period;
var o;
- //self.$('.oe_account_select_journal',self.$el.parent())[0].children().remove().end();
self.$el.parent().find('.oe_account_select_journal').children().remove().end();
+ self.$el.parent().find('.oe_account_select_journal').append(new Option('', ''));
for (var i = 0;i < self.journals.length;i++){
o = new Option(self.journals[i][1], self.journals[i][0]);
if (self.journals[i][0] === self.current_journal){
@@ -76,6 +76,7 @@ openerp.account.quickadd = function (instance) {
self.$el.parent().find('.oe_account_select_journal').append(o);
}
self.$el.parent().find('.oe_account_select_period').children().remove().end();
+ self.$el.parent().find('.oe_account_select_period').append(new Option('', ''));
for (var i = 0;i < self.periods.length;i++){
o = new Option(self.periods[i][1], self.periods[i][0]);
self.$el.parent().find('.oe_account_select_period').append(o);
@@ -86,19 +87,15 @@ openerp.account.quickadd = function (instance) {
},
search_by_journal_period: function() {
var self = this;
-
- var compoundDomain = new instance.web.CompoundDomain(self.last_domain,
- [
- ["journal_id", "=", self.current_journal],
- ["period_id", "=", self.current_period]
- ]);
- self.last_context["journal_id"] = self.current_journal;
- self.last_context["period_id"] = self.current_period;
+ var domain = [];
+ if (self.current_journal !== null) domain.push(["journal_id", "=", self.current_journal]);
+ if (self.current_period !== null) domain.push(["period_id", "=", self.current_period]);
+ self.last_context["journal_id"] = self.current_journal === null ? false : self.current_journal;
+ self.last_context["period_id"] = self.current_period === null ? false : self.current_period;
self.last_context["journal_type"] = self.current_journal_type;
self.last_context["currency"] = self.current_journal_currency;
self.last_context["analytic_journal_id"] = self.current_journal_analytic;
- var compoundContext = self.last_context;
- return self.old_search(compoundDomain, compoundContext, self.last_group_by);
+ return self.old_search(new instance.web.CompoundDomain(self.last_domain, domain), self.last_context, self.last_group_by);
},
});
};
From 44c948caf4e4beec8863e2848aef7a56d789442b Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Thu, 22 Nov 2012 16:06:45 +0100
Subject: [PATCH 30/48] [FIX]Possibility to choose journal none and period none
bzr revid: dle@openerp.com-20121122150645-kxfuwdfy6qxvjvxu
---
addons/account/account_move_line.py | 11 ++++++++---
addons/account/account_view.xml | 5 +++--
.../static/src/js/account_move_line_quickadd.js | 3 ++-
3 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index 1128ff465fe..4fb78392326 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -505,11 +505,11 @@ class account_move_line(osv.osv):
'amount_residual_currency': fields.function(_amount_residual, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in its currency (maybe different of the company currency)."),
'amount_residual': fields.function(_amount_residual, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in the company currency."),
'currency_id': fields.many2one('res.currency', 'Currency', help="The optional other currency if it is a multi-currency entry."),
- 'journal_id': fields.related('move_id', 'journal_id', string='Journal', type='many2one', relation='account.journal', required=True, select=True, readonly=True,
+ 'journal_id': fields.related('move_id', 'journal_id', string='Journal', type='many2one', relation='account.journal', required=True, select=True,
store = {
'account.move': (_get_move_lines, ['journal_id'], 20)
}),
- 'period_id': fields.related('move_id', 'period_id', string='Period', type='many2one', relation='account.period', required=True, select=True, readonly=True,
+ 'period_id': fields.related('move_id', 'period_id', string='Period', type='many2one', relation='account.period', required=True, select=True,
store = {
'account.move': (_get_move_lines, ['period_id'], 20)
}),
@@ -565,6 +565,9 @@ class account_move_line(osv.osv):
"""
Return default account period value
"""
+ context = context or {}
+ if context.get('period_id', False):
+ return context['period_id']
account_period_obj = self.pool.get('account.period')
ids = account_period_obj.find(cr, uid, context=context)
period_id = False
@@ -576,7 +579,9 @@ class account_move_line(osv.osv):
"""
Return journal based on the journal type
"""
-
+ context = context or {}
+ if context.get('journal_id', False):
+ return context['journal_id']
journal_id = False
journal_pool = self.pool.get('account.journal')
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index c62607e12a1..eae8f902d78 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -991,8 +991,8 @@
-
-
+
+
@@ -1010,6 +1010,7 @@
+
diff --git a/addons/account/static/src/js/account_move_line_quickadd.js b/addons/account/static/src/js/account_move_line_quickadd.js
index 2535a888bc9..8eda55876e3 100644
--- a/addons/account/static/src/js/account_move_line_quickadd.js
+++ b/addons/account/static/src/js/account_move_line_quickadd.js
@@ -91,7 +91,8 @@ openerp.account.quickadd = function (instance) {
if (self.current_journal !== null) domain.push(["journal_id", "=", self.current_journal]);
if (self.current_period !== null) domain.push(["period_id", "=", self.current_period]);
self.last_context["journal_id"] = self.current_journal === null ? false : self.current_journal;
- self.last_context["period_id"] = self.current_period === null ? false : self.current_period;
+ if (self.current_period === null) delete self.last_context["period_id"];
+ else self.last_context["period_id"] = self.current_period;
self.last_context["journal_type"] = self.current_journal_type;
self.last_context["currency"] = self.current_journal_currency;
self.last_context["analytic_journal_id"] = self.current_journal_analytic;
From 4e9f308bef5c300a4a572a1232aa33aec58cb3bb Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Thu, 22 Nov 2012 16:26:12 +0100
Subject: [PATCH 31/48] [DEL]Remove commented useless fields_view_get
bzr revid: dle@openerp.com-20121122152612-i4k15g2k73pd7b1l
---
addons/account/account_move_line.py | 121 ----------------------------
1 file changed, 121 deletions(-)
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index 4fb78392326..9b8431d6980 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -1012,127 +1012,6 @@ class account_move_line(osv.osv):
'context':context,
}
- # def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
- # journal_pool = self.pool.get('account.journal')
- # if context is None:
- # context = {}
- # result = super(account_move_line, self).fields_view_get(cr, uid, view_id, view_type, context=context, toolbar=toolbar, submenu=submenu)
- # if (view_type != 'tree') or view_id:
- # #Remove the toolbar from the form view
- # if view_type == 'form':
- # if result.get('toolbar', False):
- # result['toolbar']['action'] = []
- # #Restrict the list of journal view in search view
- # if view_type == 'search' and result['fields'].get('journal_id', False):
- # result['fields']['journal_id']['selection'] = journal_pool.name_search(cr, uid, '', [], context=context)
- # ctx = context.copy()
- # #we add the refunds journal in the selection field of journal
- # if context.get('journal_type', False) == 'sale':
- # ctx.update({'journal_type': 'sale_refund'})
- # result['fields']['journal_id']['selection'] += journal_pool.name_search(cr, uid, '', [], context=ctx)
- # elif context.get('journal_type', False) == 'purchase':
- # ctx.update({'journal_type': 'purchase_refund'})
- # result['fields']['journal_id']['selection'] += journal_pool.name_search(cr, uid, '', [], context=ctx)
- # return result
- # if context.get('view_mode', False):
- # return result
- # fld = []
- # flds = []
- # title = _("Accounting Entries") # self.view_header_get(cr, uid, view_id, view_type, context)
-
- # ids = journal_pool.search(cr, uid, [], context=context)
- # journals = journal_pool.browse(cr, uid, ids, context=context)
- # for journal in journals:
- # for field in journal.view_id.columns_id:
- # # sometimes, it's possible that a defined column is not loaded (the module containing
- # # this field is not loaded) when we make an update.
- # if field.field not in self._columns:
- # continue
-
- # if not field.field in flds:
- # fld.append((field.field, field.sequence))
- # flds.append(field.field)
-
- # default_columns = {
- # 'period_id': 3,
- # 'journal_id': 10,
- # 'state': sys.maxint,
- # }
- # for d in default_columns:
- # if d not in flds:
- # fld.append((d, default_columns[d]))
- # flds.append(d)
-
- # fld = sorted(fld, key=itemgetter(1))
- # widths = {
- # 'statement_id': 50,
- # 'state': 60,
- # 'tax_code_id': 50,
- # 'move_id': 40,
- # }
-
- # document = etree.Element('tree', string=title, editable="top",
- # on_write="on_create_write",
- # colors="red:state=='draft';black:state=='valid'")
- # fields_get = self.fields_get(cr, uid, flds, context)
- # for field, _seq in fld:
- # # TODO add string to element
- # f = etree.SubElement(document, 'field', name=field)
-
- # if field == 'debit':
- # f.set('sum', _("Total debit"))
-
- # elif field == 'credit':
- # f.set('sum', _("Total credit"))
-
- # elif field == 'move_id':
- # f.set('required', 'False')
-
- # elif field == 'account_tax_id':
- # f.set('domain', "[('parent_id', '=' ,False)]")
- # f.set('context', "{'journal_id': journal_id}")
-
- # elif field == 'account_id' and journal.id:
- # f.set('domain', "[('journal_id', '=', journal_id),('type','!=','view'), ('type','!=','closed')]")
- # f.set('on_change', 'onchange_account_id(account_id, partner_id)')
-
- # elif field == 'partner_id':
- # f.set('on_change', 'onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)')
-
- # elif field == 'journal_id':
- # f.set('context', "{'journal_id': journal_id}")
-
- # elif field == 'statement_id':
- # f.set('domain', "[('state', '!=', 'confirm'),('journal_id.type', '=', 'bank')]")
- # f.set('invisible', 'True')
-
- # elif field == 'date':
- # f.set('on_change', 'onchange_date(date)')
-
- # elif field == 'analytic_account_id':
- # # Currently it is not working due to being executed by superclass's fields_view_get
- # # f.set('groups', 'analytic.group_analytic_accounting')
- # pass
-
- # if field in ('amount_currency', 'currency_id'):
- # f.set('on_change', 'onchange_currency(account_id, amount_currency, currency_id, date, journal_id)')
- # f.set('attrs', "{'readonly': [('state', '=', 'valid')]}")
-
- # if field in widths:
- # f.set('width', str(widths[field]))
-
- # if field in ('journal_id',):
- # f.set("invisible", "context.get('journal_id', False)")
- # elif field in ('period_id',):
- # f.set("invisible", "context.get('period_id', False)")
-
- # orm.setup_modifiers(f, fields_get[field], context=context,
- # in_tree_view=True)
-
- # result['arch'] = etree.tostring(document, pretty_print=True)
- # result['fields'] = fields_get
- # return result
-
def _check_moves(self, cr, uid, context=None):
# use the first move ever created for this journal and period
if context is None:
From d85b143ad0231d9b6656ddbe52f6406dc28920f6 Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Fri, 23 Nov 2012 16:22:13 +0100
Subject: [PATCH 32/48] [FIX]Create button
bzr revid: dle@openerp.com-20121123152213-jhkdixgoypdwoj4f
---
addons/account/account_view.xml | 32 ++-----------------
.../src/js/account_move_line_quickadd.js | 5 +--
2 files changed, 3 insertions(+), 34 deletions(-)
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index eae8f902d78..0b6b23ecb82 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -1175,11 +1175,11 @@
+ {'journal_type':'general'}
Journal Items
account.move.line
- form
+
tree_account_move_line_quickadd
- {'journal_type':'general'}
@@ -1449,25 +1449,6 @@
res_model="account.move.line"
src_model="account.move"/>
-
- Journal Items
- account.move.line
- form
- tree,form
-
-
-
-
-
- tree
-
-
-
-
-
- form
-
-
{'search_default_unreconciled': 1,'view_mode':True}
@@ -1886,15 +1867,6 @@
-
- Journal Items
- account.move.line
- form
- tree,form
- [('account_id','child_of', [active_id]),('state','<>','draft')]
- {'account_id':active_id}
-
-
account.move.line.tax.tree
account.move.line
diff --git a/addons/account/static/src/js/account_move_line_quickadd.js b/addons/account/static/src/js/account_move_line_quickadd.js
index 8eda55876e3..997b2b03bb6 100644
--- a/addons/account/static/src/js/account_move_line_quickadd.js
+++ b/addons/account/static/src/js/account_move_line_quickadd.js
@@ -1,15 +1,12 @@
-
openerp.account.quickadd = function (instance) {
var _t = instance.web._t,
_lt = instance.web._lt;
var QWeb = instance.web.qweb;
instance.web.account = instance.web.account || {};
-
+
instance.web.views.add('tree_account_move_line_quickadd', 'instance.web.account.QuickAddListView');
instance.web.account.QuickAddListView = instance.web.ListView.extend({
- _template: 'ListView',
-
init: function() {
this._super.apply(this, arguments);
this.journals = [];
From 7db911f1c7670b9b79d1c7825e58bd60579edd7c Mon Sep 17 00:00:00 2001
From: "Quentin (OpenERP)"
Date: Fri, 23 Nov 2012 17:27:58 +0100
Subject: [PATCH 33/48] [REF] account: refactoring of default_get() of
account.move.line
bzr revid: qdp-launchpad@openerp.com-20121123162758-qczz3bgbea2qzxjo
---
addons/account/account.py | 7 -
addons/account/account_move_line.py | 196 ++++++++++------------------
addons/account/account_view.xml | 7 +-
addons/account/res_currency.py | 1 +
4 files changed, 72 insertions(+), 139 deletions(-)
diff --git a/addons/account/account.py b/addons/account/account.py
index 88d6bebb9f5..14f342a7782 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -1314,13 +1314,6 @@ class account_move(osv.osv):
'WHERE id IN %s', ('draft', tuple(ids),))
return True
- def onchange_line_id(self, cr, uid, ids, line_ids, context=None):
- balance = 0.0
- for line in line_ids:
- if line[2]:
- balance += (line[2].get('debit',0.00)- (line[2].get('credit',0.00)))
- return {'value': {'balance': balance}}
-
def write(self, cr, uid, ids, vals, context=None):
if context is None:
context = {}
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index 9b8431d6980..84de5548fce 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -213,12 +213,11 @@ class account_move_line(osv.osv):
return context
def _default_get(self, cr, uid, fields, context=None):
+ #default_get should only do the following:
+ # -propose the next amount in debit/credit in order to balance the move
+ # -propose the next account from the journal (default debit/credit account) accordingly
if context is None:
context = {}
- if not context.get('journal_id', False):
- context['journal_id'] = context.get('search_default_journal_id')
- if not context.get('period_id', False):
- context['period_id'] = context.get('search_default_period_id')
account_obj = self.pool.get('account.account')
period_obj = self.pool.get('account.period')
journal_obj = self.pool.get('account.journal')
@@ -227,134 +226,71 @@ class account_move_line(osv.osv):
fiscal_pos_obj = self.pool.get('account.fiscal.position')
partner_obj = self.pool.get('res.partner')
currency_obj = self.pool.get('res.currency')
+
+ if not context.get('journal_id', False):
+ context['journal_id'] = context.get('search_default_journal_id', False)
+ if not context.get('period_id', False):
+ context['period_id'] = context.get('search_default_period_id', False)
context = self.convert_to_period(cr, uid, context)
- #pass the right context when search_defaul_journal_id
- if context.get('search_default_journal_id',False):
- context['journal_id'] = context.get('search_default_journal_id')
+
# Compute simple values
data = super(account_move_line, self).default_get(cr, uid, fields, context=context)
- # Starts: Manual entry from account.move form
- if context.get('lines'):
- total_new = context.get('balance', 0.00)
- if context['journal']:
- journal_data = journal_obj.browse(cr, uid, context['journal'], context=context)
- if journal_data.type == 'purchase':
- if total_new > 0:
- account = journal_data.default_credit_account_id
- else:
- account = journal_data.default_debit_account_id
- else:
- if total_new > 0:
- account = journal_data.default_credit_account_id
- else:
- account = journal_data.default_debit_account_id
- if account and ((not fields) or ('debit' in fields) or ('credit' in fields)) and 'partner_id' in data and (data['partner_id']):
- part = partner_obj.browse(cr, uid, data['partner_id'], context=context)
- account = fiscal_pos_obj.map_account(cr, uid, part and part.property_account_position or False, account.id)
- account = account_obj.browse(cr, uid, account, context=context)
- data['account_id'] = account.id
-
- s = -total_new
- data['debit'] = s > 0 and s or 0.0
- data['credit'] = s < 0 and -s or 0.0
- data = self._default_get_move_form_hook(cr, uid, data)
- return data
- # Ends: Manual entry from account.move form
- if not 'move_id' in fields: #we are not in manual entry
- return data
- # Compute the current move
- move_id = False
- partner_id = False
- if context.get('journal_id', False) and context.get('period_id', False):
- if 'move_id' in fields:
- cr.execute('SELECT move_id \
- FROM \
- account_move_line \
- WHERE \
- journal_id = %s and period_id = %s AND create_uid = %s AND state = %s \
- ORDER BY id DESC limit 1',
- (context['journal_id'], context['period_id'], uid, 'draft'))
+ if context.get('journal_id'):
+ total = 0.0
+ #in account.move form view, it is not possible to compute total debit and credit using
+ #a browse record. So we must use the context to pass the whole one2many field and compute the total
+ if context.get('line_id'):
+ for move_line_dict in move_obj.resolve_2many_commands(cr, uid, 'line_id', context.get('line_id'), context=context):
+ data['name'] = data.get('name') or move_line_dict.get('name')
+ data['partner_id'] = data.get('partner_id') or move_line_dict.get('partner_id')
+ total += move_line_dict.get('debit', 0.0) - move_line_dict.get('credit', 0.0)
+ elif context.get('period_id'):
+ #find the date and the ID of the last unbalanced account.move encoded by the current user in that journal and period
+ move_id = False
+ cr.execute('''SELECT move_id, date FROM account_move_line
+ WHERE journal_id = %s AND period_id = %s AND create_uid = %s AND state = %s
+ ORDER BY id DESC limit 1''', (context['journal_id'], context['period_id'], uid, 'draft'))
res = cr.fetchone()
- move_id = (res and res[0]) or False
- if not move_id:
- return data
- else:
- data['move_id'] = move_id
- if 'date' in fields:
- cr.execute('SELECT date \
- FROM \
- account_move_line \
- WHERE \
- journal_id = %s AND period_id = %s AND create_uid = %s \
- ORDER BY id DESC',
- (context['journal_id'], context['period_id'], uid))
- res = cr.fetchone()
- if res:
- data['date'] = res[0]
- else:
- period = period_obj.browse(cr, uid, context['period_id'],
- context=context)
- data['date'] = period.date_start
- if not move_id:
- return data
- total = 0
- ref_id = False
- move = move_obj.browse(cr, uid, move_id, context=context)
- if 'name' in fields:
- data.setdefault('name', move.line_id[-1].name)
- acc1 = False
- for l in move.line_id:
- acc1 = l.account_id
- partner_id = partner_id or l.partner_id.id
- ref_id = ref_id or l.ref
- total += (l.debit or 0.0) - (l.credit or 0.0)
+ move_id = res and res[0] or False
+ data['date'] = res and res[1] or period_obj.browse(cr, uid, context['period_id'], context=context).date_start
+ data['move_id'] = move_id
+ if move_id:
+ #if there exist some unbalanced accounting entries that match the journal and the period,
+ #we propose to continue the same move by copying the ref, the name, the partner...
+ move = move_obj.browse(cr, uid, move_id, context=context)
+ data.setdefault('name', move.line_id[-1].name)
+ for l in move.line_id:
+ data['partner_id'] = data.get('partner_id') or l.partner_id.id
+ data['ref'] = data.get('ref') or l.ref
+ total += (l.debit or 0.0) - (l.credit or 0.0)
- if 'ref' in fields:
- data['ref'] = ref_id
- if 'partner_id' in fields:
- data['partner_id'] = partner_id
-
- if move.journal_id.type == 'purchase':
- if total > 0:
- account = move.journal_id.default_credit_account_id
- else:
- account = move.journal_id.default_debit_account_id
- else:
- if total > 0:
- account = move.journal_id.default_credit_account_id
- else:
- account = move.journal_id.default_debit_account_id
- part = partner_id and partner_obj.browse(cr, uid, partner_id) or False
- # part = False is acceptable for fiscal position.
- account = fiscal_pos_obj.map_account(cr, uid, part and part.property_account_position or False, account.id)
- if account:
- account = account_obj.browse(cr, uid, account, context=context)
-
- if account and ((not fields) or ('debit' in fields) or ('credit' in fields)):
- data['account_id'] = account.id
- # Propose the price Tax excluded, the Tax will be added when confirming line
- if account.tax_ids:
- taxes = fiscal_pos_obj.map_tax(cr, uid, part and part.property_account_position or False, account.tax_ids)
- tax = tax_obj.browse(cr, uid, taxes)
- for t in tax_obj.compute_inv(cr, uid, tax, total, 1):
- total -= t['amount']
-
- s = -total
- data['debit'] = s > 0 and s or 0.0
- data['credit'] = s < 0 and -s or 0.0
-
- if account and account.currency_id:
- data['currency_id'] = account.currency_id.id
- acc = account
- if s>0:
- acc = acc1
- compute_ctx = context.copy()
- compute_ctx.update({
- 'res.currency.compute.account': acc,
- 'res.currency.compute.account_invert': True,
- })
- v = currency_obj.compute(cr, uid, account.company_id.currency_id.id, data['currency_id'], s, context=compute_ctx)
- data['amount_currency'] = v
+ #compute the total of current move
+ data['debit'] = total < 0 and -total or 0.0
+ data['credit'] = total > 0 and total or 0.0
+ #pick the good account on the journal accordingly if the next proposed line will be a debit or a credit
+ journal_data = journal_obj.browse(cr, uid, context['journal_id'], context=context)
+ account = total > 0 and journal_data.default_credit_account_id or journal_data.default_debit_account_id
+ #map the account using the fiscal position of the partner, if needed
+ part = data.get('partner_id') and partner_obj.browse(cr, uid, data['partner_id'], context=context) or False
+ if account and data.get('partner_id'):
+ account = fiscal_pos_obj.map_account(cr, uid, part and part.property_account_position or False, account.id)
+ account = account_obj.browse(cr, uid, account, context=context)
+ data['account_id'] = account and account.id or False
+ #compute the amount in secondary currency of the account, if needed
+ if account and account.currency_id:
+ data['currency_id'] = account.currency_id.id
+ #set the context for the multi currency change
+ compute_ctx = context.copy()
+ compute_ctx.update({
+ #the following 2 parameters are used to choose the currency rate, in case where the account
+ #doesn't work with an outgoing currency rate method 'at date' but 'average'
+ 'res.currency.compute.account': account,
+ 'res.currency.compute.account_invert': True,
+ })
+ if data.get('date'):
+ compute_ctx.update({'date': data['date']})
+ data['amount_currency'] = currency_obj.compute(cr, uid, account.company_id.currency_id.id, data['currency_id'], -total, context=compute_ctx)
+ data = self._default_get_move_form_hook(cr, uid, data)
return data
def on_create_write(self, cr, uid, id, context=None):
@@ -688,6 +624,12 @@ class account_move_line(osv.osv):
}
return result
+ def onchange_account_id(self, cr, uid, ids, account_id, context=None):
+ res = {'value': {}}
+ if account_id:
+ res['value']['account_tax_id'] = [x.id for x in self.pool.get('account.account').browse(cr, uid, account_id, context=context).tax_ids]
+ return res
+
def onchange_partner_id(self, cr, uid, ids, move_id, partner_id, account_id=None, debit=0, credit=0, date=False, journal=False):
partner_obj = self.pool.get('res.partner')
payment_term_obj = self.pool.get('account.payment.term')
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 0b6b23ecb82..0ca68f47e3c 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -998,7 +998,7 @@
-
+
@@ -1282,10 +1282,8 @@
-
+ context="{'line_id': line_id , 'journal_id': journal_id }">
-
diff --git a/addons/account/res_currency.py b/addons/account/res_currency.py
index ce781a1e11a..60bb6152a9b 100644
--- a/addons/account/res_currency.py
+++ b/addons/account/res_currency.py
@@ -29,6 +29,7 @@ class res_currency_account(osv.osv):
if context is None:
context = {}
rate = super(res_currency_account, self)._get_conversion_rate(cr, uid, from_currency, to_currency, context=context)
+ #process the case where the account doesn't work with an outgoing currency rate method 'at date' but 'average'
account = context.get('res.currency.compute.account')
account_invert = context.get('res.currency.compute.account_invert')
if account and account.currency_mode == 'average' and account.currency_id:
From 2c15e1882f73dd24560d3654954d938e62321133 Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Fri, 23 Nov 2012 17:40:48 +0100
Subject: [PATCH 34/48] [FIX]Replace tree node by quickadd tree node
bzr revid: dle@openerp.com-20121123164048-8bm3ag313qyzs488
---
addons/account/account_view.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 0ca68f47e3c..fb8866b7fc1 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -990,7 +990,7 @@
account.move.line
-
+
@@ -1011,7 +1011,7 @@
-
+
From a64452b75e6d0bed9aeebafc986607ce7a9ebad2 Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Mon, 26 Nov 2012 09:43:45 +0100
Subject: [PATCH 35/48] [TMP]Try to make invisibles working
bzr revid: dle@openerp.com-20121126084345-284vm5zyp4w12u8w
---
addons/account/static/src/js/account_move_line_quickadd.js | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/addons/account/static/src/js/account_move_line_quickadd.js b/addons/account/static/src/js/account_move_line_quickadd.js
index 997b2b03bb6..47f5aeca7ec 100644
--- a/addons/account/static/src/js/account_move_line_quickadd.js
+++ b/addons/account/static/src/js/account_move_line_quickadd.js
@@ -45,8 +45,14 @@ openerp.account.quickadd = function (instance) {
self.current_period = result['period_id'];
self.current_journal = result['journal_id'];
});
+
return tmp;
},
+ load_view: function(context) {
+ debugger;
+ this.$el.parent().addClass("oe_view_manager_view_list");
+ return this._super.apply(this, arguments);
+ },
do_search: function(domain, context, group_by) {
var self = this;
this.last_domain = domain;
From b51841b842268a3d05c244aa5273c438a7810345 Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Mon, 26 Nov 2012 16:01:24 +0100
Subject: [PATCH 36/48] [FIX]Back
bzr revid: dle@openerp.com-20121126150124-u5wf45ticx73gsip
---
addons/account/account_view.xml | 4 ++--
addons/account/static/src/js/account_move_line_quickadd.js | 6 ------
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index fb8866b7fc1..0ca68f47e3c 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -990,7 +990,7 @@
account.move.line
-
+
@@ -1011,7 +1011,7 @@
-
+
diff --git a/addons/account/static/src/js/account_move_line_quickadd.js b/addons/account/static/src/js/account_move_line_quickadd.js
index 47f5aeca7ec..997b2b03bb6 100644
--- a/addons/account/static/src/js/account_move_line_quickadd.js
+++ b/addons/account/static/src/js/account_move_line_quickadd.js
@@ -45,14 +45,8 @@ openerp.account.quickadd = function (instance) {
self.current_period = result['period_id'];
self.current_journal = result['journal_id'];
});
-
return tmp;
},
- load_view: function(context) {
- debugger;
- this.$el.parent().addClass("oe_view_manager_view_list");
- return this._super.apply(this, arguments);
- },
do_search: function(domain, context, group_by) {
var self = this;
this.last_domain = domain;
From e046bb66504207f5ba4055553b7b1388227c0945 Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Tue, 27 Nov 2012 11:04:18 +0100
Subject: [PATCH 37/48] [FIX]journal_id and period_id check wrong in _get_date
bzr revid: dle@openerp.com-20121127100418-iv8gkbh4r391qz6m
---
addons/account/account_move_line.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index 84de5548fce..e96853f572f 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -476,7 +476,7 @@ class account_move_line(osv.osv):
context or {}
period_obj = self.pool.get('account.period')
dt = time.strftime('%Y-%m-%d')
- if ('journal_id' in context) and ('period_id' in context):
+ if context.get('journal_id') and context.get('period_id'):
cr.execute('SELECT date FROM account_move_line ' \
'WHERE journal_id = %s AND period_id = %s ' \
'ORDER BY id DESC limit 1',
From e679e22547d638337658daa229dc15d5069f909e Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Tue, 27 Nov 2012 14:29:44 +0100
Subject: [PATCH 38/48] [FIX]Clean up account view
bzr revid: dle@openerp.com-20121127132944-kitr4nhl4rhy06e1
---
addons/account/account_view.xml | 535 ++++++++++++--------------------
1 file changed, 201 insertions(+), 334 deletions(-)
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 0ca68f47e3c..39076b9c95c 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -2,10 +2,7 @@
-
-
+
account.fiscalyear.form
account.fiscalyear
@@ -70,7 +67,7 @@
-
+
Fiscal Years
account.fiscalyear
form
@@ -90,12 +87,9 @@
-
-
-
+
+
account.period.form
account.period
@@ -142,7 +136,6 @@
-
account.period.search
account.period
@@ -153,8 +146,7 @@
-
-
+
Periods
account.period
form
@@ -169,12 +161,9 @@
-
+
-
-
+
account.account.form
account.account
@@ -215,25 +204,6 @@
-
-
- account.account.search
- account.account
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
account.account.list
account.account
@@ -253,6 +223,23 @@
+
+ account.account.search
+ account.account
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Accounts
account.account
@@ -276,6 +263,20 @@
+
+
+
+
account.account.tree
account.account
@@ -301,7 +302,6 @@
[('parent_id','=',False)]
-
Unrealized Gain or Loss
account.account
@@ -321,7 +321,6 @@
-
Unrealized Gain or Loss
account.account
@@ -341,18 +340,31 @@
-
-
-
+
+ Journal Items
+ account.move.line
+ form
+ tree,form
+ {'search_default_account_id': [active_id]}
+
+
+ tree_but_open
+ account.account
+ Open Journal Items
+
+
+
+
account.journal.tree
account.journal
@@ -384,7 +396,6 @@
-
account.journal.form
account.journal
@@ -450,7 +461,6 @@
-
Journals
account.journal
@@ -471,6 +481,21 @@
+
+
+
+
+
account.cash.statement.select
account.bank.statement
@@ -656,9 +681,7 @@
-
+
account.account.type.search
account.account.type
@@ -668,7 +691,6 @@
-
account.account.type.tree
account.account.type
@@ -679,7 +701,6 @@
-
account.account.type.form
account.account.type
@@ -719,9 +740,8 @@
-
+
+
account.move.tree
account.move
@@ -739,10 +759,7 @@
-
-
+
account.move.reconcile.form
account.move.reconcile
@@ -761,9 +778,7 @@
-
+
account.tax.code.search
account.tax.code
@@ -834,13 +849,24 @@
-
-
+
+
+
+ Journal Items
+ account.move.line
+ form
+ tree,form
+ [('tax_code_id','child_of',active_id),('state','<>','draft')]
+
+
+ tree_but_open
+ account.tax.code
+ Tax Details
+
+
-
+
account.tax.tree
account.tax
@@ -962,59 +988,7 @@
-
-
-
- account.move.line
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- account.move.line.tree
- account.move.line
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
account.move.line.form
account.move.line
@@ -1084,7 +1058,6 @@
-
account.move.line.form2
account.move.line
@@ -1132,7 +1105,39 @@
+
+ account.move.line.tree
+ account.move.line
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
account.move.line.graph
account.move.line
@@ -1144,7 +1149,6 @@
-
Journal Items
account.move.line
@@ -1173,7 +1177,6 @@
-
{'journal_type':'general'}
Journal Items
@@ -1193,7 +1196,6 @@
-
-
- Lines to reconcile
+
+ account.move.line
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {'search_default_unreconciled': 1,'view_mode':True}
+ Journal Items to Reconcile
account.move.line
- form
- tree,form
- [('account_id.reconcile', '=', True),('reconcile_id','=',False)]
-
-
-
+
+ tree_account_reconciliation
+
+
+ No journal items found.
+
+
+
+
-
- Journal Items
- account.move.line
- form
- tree,form
-
-
- {'search_default_account_id': [active_id]}
-
-
-
- tree_but_open
- account.account
- Open Journal Items
-
-
-
-
+
account.move.tree
account.move
@@ -1374,7 +1388,6 @@
-
account.move.select
account.move
@@ -1399,7 +1412,6 @@
-
Journal Entries
account.move
@@ -1421,7 +1433,6 @@
-
-
-
-
- {'search_default_unreconciled': 1,'view_mode':True}
- Journal Items to Reconcile
- account.move.line
-
- tree_account_reconciliation
-
-
- No journal items found.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
account.journal.period.tree
account.journal.period
@@ -1521,10 +1483,7 @@
tree
-
-
+
account.model.line.tree
account.model.line
@@ -1541,8 +1500,6 @@
-
-
account.model.line.form
account.model.line
@@ -1562,7 +1519,6 @@
-
account.model.form
account.model
@@ -1581,7 +1537,6 @@
-
account.model.tree
account.model
@@ -1593,7 +1548,6 @@
-
account.model.search
account.model
@@ -1622,10 +1576,7 @@
action="action_model_form" id="menu_action_model_form" sequence="5"
parent="account.menu_configuration_misc"/>
-
-
+
account.payment.term.line.tree
account.payment.term.line
@@ -1640,8 +1591,6 @@
-
-
account.payment.term.line.form
account.payment.term.line
@@ -1681,7 +1630,6 @@
-
account.payment.term.search
account.payment.term
@@ -1692,7 +1640,6 @@
-
account.payment.term.form
account.payment.term
@@ -1708,7 +1655,6 @@
-
Payment Terms
account.payment.term
@@ -1719,10 +1665,7 @@
-
-
+
account.subscription.line.form
account.subscription.line
@@ -1735,7 +1678,6 @@
-
account.subscription.line.tree
account.subscription.line
@@ -1746,7 +1688,6 @@
-
account.subscription.tree
account.subscription
@@ -1760,7 +1701,6 @@
-
account.subscription.search
account.subscription
@@ -1778,7 +1718,6 @@
-
account.subscription.form
account.subscription
@@ -1864,63 +1803,7 @@
-
- account.move.line.tax.tree
- account.move.line
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Journal Items
- account.move.line
- form
- tree,form
-
- [('tax_code_id','child_of',active_id),('state','<>','draft')]
-
-
- tree_but_open
- account.tax.code
- Tax Details
-
-
-
-
-
-
-
-
-
-
+
-
-
-
- Create Account
- account.addtmpl.wizard
-
-
-
-
-
-
+
-
account.account.template.form
account.account.template
@@ -2001,7 +1867,6 @@
-
account.account.template.tree
account.account.template
@@ -2014,7 +1879,6 @@
-
account.account.template.search
account.account.template
@@ -2033,7 +1897,6 @@
-
Account Templates
account.account.template
@@ -2041,11 +1904,32 @@
tree,form
-
-
+
+ Create Account
+ account.addtmpl.wizard
+
+
+
+
+
+
+
+
account.chart.template.form
account.chart.template
@@ -2118,11 +2002,9 @@
form
tree,form
-
-
account.tax.template.form
account.tax.template
@@ -2201,7 +2083,6 @@
-
Tax Templates
account.tax.template
@@ -2209,7 +2090,6 @@
tree,form
-
@@ -2225,7 +2105,6 @@
-
account.tax.code.template.search
account.tax.code.template
@@ -2239,7 +2118,6 @@
-
account.tax.code.template.form
account.tax.code.template
@@ -2256,7 +2134,6 @@
-
Tax Code Templates
account.tax.code.template
@@ -2268,7 +2145,6 @@
-
Set Your Accounting Options
wizard.multi.charts.accounts
@@ -2307,7 +2183,6 @@
-
Set Your Accounting Options
ir.actions.act_window
@@ -2413,7 +2288,6 @@
-
account.bank.statement.form
account.bank.statement
@@ -2546,6 +2420,7 @@
+
tree
@@ -2575,10 +2450,7 @@
parent="menu_finance_payables"
action="base.action_partner_supplier_form" sequence="100"/>
-
-
+
account.financial.report.form
account.financial.report
@@ -2605,7 +2477,6 @@
-
account.financial.report.tree
account.financial.report
@@ -2618,7 +2489,6 @@
-
account.financial.report.search
account.financial.report
@@ -2634,7 +2504,6 @@
-
Financial Reports
ir.actions.act_window
@@ -2644,7 +2513,6 @@
-
@@ -2667,7 +2535,6 @@
[('parent_id','=',False)]
-
From 32d97b61480fdc2a0262b017496a23b016b6b82f Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Tue, 27 Nov 2012 15:56:14 +0100
Subject: [PATCH 39/48] [FIX]Move Line Tree View for wizard in module
account_payment
bzr revid: dle@openerp.com-20121127145614-1nx0paca73faa4bn
---
.../account_payment/account_payment_view.xml | 20 +++++--------------
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/addons/account_payment/account_payment_view.xml b/addons/account_payment/account_payment_view.xml
index 4d69c2d7315..740781b1a47 100644
--- a/addons/account_payment/account_payment_view.xml
+++ b/addons/account_payment/account_payment_view.xml
@@ -15,24 +15,14 @@
- account.move.line.tree
+ account.move.line.tree.wiz
account.move.line
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
From cdb615a936fb49b934346b6d73e3cb4b2b0a2bb8 Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Tue, 27 Nov 2012 16:09:25 +0100
Subject: [PATCH 40/48] [FIX]Wrong tree
bzr revid: dle@openerp.com-20121127150925-yi8nv8d4jh0nd70y
---
addons/account_payment/account_payment_view.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/addons/account_payment/account_payment_view.xml b/addons/account_payment/account_payment_view.xml
index 740781b1a47..ae54f101731 100644
--- a/addons/account_payment/account_payment_view.xml
+++ b/addons/account_payment/account_payment_view.xml
@@ -15,12 +15,12 @@
- account.move.line.tree.wiz
+ account.move.line.tree
account.move.line
-
-
+
+
From 6a84219ee7cad5968ae56169679ead5cbbb5f381 Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Tue, 27 Nov 2012 16:32:40 +0100
Subject: [PATCH 41/48] [FIX]Wrong tree
bzr revid: dle@openerp.com-20121127153240-8haso93pvh3y3aug
---
addons/account_payment/account_payment_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/account_payment/account_payment_view.xml b/addons/account_payment/account_payment_view.xml
index ae54f101731..6ee5847a515 100644
--- a/addons/account_payment/account_payment_view.xml
+++ b/addons/account_payment/account_payment_view.xml
@@ -20,7 +20,7 @@
-
+
From dc050b7a70f48f574e358c4a026f136503c463f9 Mon Sep 17 00:00:00 2001
From: "Denis Ledoux dle@openerp.com" <>
Date: Tue, 27 Nov 2012 16:47:11 +0100
Subject: [PATCH 42/48] [FIX]Wrong tree
bzr revid: dle@openerp.com-20121127154711-c0rdp46gez107b0h
---
addons/account_payment/account_payment_view.xml | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/addons/account_payment/account_payment_view.xml b/addons/account_payment/account_payment_view.xml
index 6ee5847a515..8953ce53765 100644
--- a/addons/account_payment/account_payment_view.xml
+++ b/addons/account_payment/account_payment_view.xml
@@ -19,11 +19,9 @@
account.move.line
-
-
-
-
-
+
+
+
From 4b73ea9027106a8c91a24f37092e92ec6a2c3798 Mon Sep 17 00:00:00 2001
From: "dle@openerp.com" <>
Date: Wed, 28 Nov 2012 16:05:25 +0100
Subject: [PATCH 43/48] [FIX]Ir values actions
bzr revid: dle@openerp.com-20121128150525-zh27h78v8dd6dkwm
---
addons/account/account_view.xml | 44 +++++++++++----------------------
1 file changed, 14 insertions(+), 30 deletions(-)
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 39076b9c95c..ae1b29aa2e2 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -349,19 +349,13 @@
-
- Journal Items
- account.move.line
- form
- tree,form
- {'search_default_account_id': [active_id]}
-
-
- tree_but_open
- account.account
- Open Journal Items
-
-
+
+
@@ -491,7 +485,7 @@
@@ -852,19 +846,12 @@
-
- Journal Items
- account.move.line
- form
- tree,form
- [('tax_code_id','child_of',active_id),('state','<>','draft')]
-
-
- tree_but_open
- account.tax.code
- Tax Details
-
-
+
@@ -1131,10 +1118,8 @@
-
-
@@ -1183,7 +1168,6 @@
account.move.line
tree_account_move_line_quickadd
-
Select the period and the journal you want to fill.
From 8cc5780e5866f9ecaa1484a9f0c540383e018148 Mon Sep 17 00:00:00 2001
From: "dle@openerp.com" <>
Date: Thu, 29 Nov 2012 14:13:17 +0100
Subject: [PATCH 44/48] [FIX]More links
bzr revid: dle@openerp.com-20121129131317-0s1rru4pxjn0lzl3
---
addons/account/account_view.xml | 18 ++++--------------
.../account_followup/account_followup_view.xml | 4 ++--
.../account_payment/account_payment_view.xml | 4 ++--
3 files changed, 8 insertions(+), 18 deletions(-)
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 29b5f074fc9..6f099e4b824 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -346,16 +346,6 @@
groups="account.group_account_user"
id="menu_unrealized_gains_losses"
parent="account.menu_multi_currency"/>
-
-
-
@@ -485,7 +475,7 @@
@@ -1118,8 +1108,8 @@
-
-
+
@@ -1438,7 +1428,7 @@
-
+
account.move.line.tree.followup
diff --git a/addons/account_payment/account_payment_view.xml b/addons/account_payment/account_payment_view.xml
index 8953ce53765..e07043c495a 100644
--- a/addons/account_payment/account_payment_view.xml
+++ b/addons/account_payment/account_payment_view.xml
@@ -14,7 +14,7 @@
-
+
From c72fc633fcfc00818bb0ab5ada89e72acce4b6c5 Mon Sep 17 00:00:00 2001
From: "dle@openerp.com" <>
Date: Thu, 29 Nov 2012 14:43:18 +0100
Subject: [PATCH 45/48] [FIX]Wrong inherit commented
bzr revid: dle@openerp.com-20121129134318-c770ejnoop2b3z0j
---
addons/account_followup/account_followup_view.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/addons/account_followup/account_followup_view.xml b/addons/account_followup/account_followup_view.xml
index 61621189fe4..0617a95c2f0 100644
--- a/addons/account_followup/account_followup_view.xml
+++ b/addons/account_followup/account_followup_view.xml
@@ -115,7 +115,7 @@
-
+
-
+
From 40042cec1b3878809969dd51aa2abe498d701830 Mon Sep 17 00:00:00 2001
From: "dle@openerp.com" <>
Date: Thu, 29 Nov 2012 15:18:54 +0100
Subject: [PATCH 46/48] [MERGE]trunk
bzr revid: dle@openerp.com-20121129141854-2o6o44jhrpi54ssp
---
addons/account/account_view.xml | 634 +++++++++++++++++++++++---------
1 file changed, 450 insertions(+), 184 deletions(-)
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 6f099e4b824..7732d8d8cb0 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -2,7 +2,10 @@
-
+
+
account.fiscalyear.form
account.fiscalyear
@@ -67,7 +70,7 @@
-
+
Fiscal Years
account.fiscalyear
form
@@ -87,9 +90,12 @@
-
+
+
+
-
account.period.form
account.period
@@ -136,6 +142,7 @@
+
account.period.search
account.period
@@ -146,7 +153,8 @@
-
+
+
Periods
account.period
form
@@ -161,9 +169,12 @@
-
+
-
+
+
account.account.form
account.account
@@ -204,6 +215,25 @@
+
+
+ account.account.search
+ account.account
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
account.account.list
account.account
@@ -223,23 +253,6 @@
-
- account.account.search
- account.account
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Accounts
account.account
@@ -263,20 +276,6 @@
-
-
-
-
account.account.tree
account.account
@@ -302,6 +301,7 @@
[('parent_id','=',False)]
+
Unrealized Gain or Loss
account.account
@@ -321,6 +321,7 @@
+
Unrealized Gain or Loss
account.account
@@ -340,6 +341,7 @@
+
+
+
+
+ account.journal.column.form
+ account.journal.column
+
+
+
+
+
+ account.journal.column.tree
+ account.journal.column
+
+
+
+
+
+
+
+
+
+ account.journal.view.search
+ account.journal.view
+
+
+
+
+
+
+
+ account.journal.view.tree
+ account.journal.view
+
+
+
+
+
+
+
+ account.journal.view.form
+ account.journal.view
+
+
+
+
+
+ Journal Views
+ account.journal.view
+ form
+ tree,form
+
+
+
+ Click to specify lists of columns to display for a type of journal.
+
+ Journal views determine the way you can record entries in
+ your journal. Select the fields you want to appear in a journal
+ and determine the sequence in which they will appear.
+
+ On the journal definition form, you can select the view you
+ want to use to display journal items related to this journal.
+
+
+
+
+
+
+
-
account.journal.tree
account.journal
@@ -380,6 +462,7 @@
+
account.journal.form
account.journal
@@ -392,7 +475,7 @@
-
+
@@ -406,6 +489,7 @@
+
@@ -445,6 +529,7 @@
+
Journals
account.journal
@@ -465,21 +550,6 @@
-
-
-
-
-
account.cash.statement.select
account.bank.statement
@@ -665,7 +735,9 @@
-
+
account.account.type.search
account.account.type
@@ -675,6 +747,7 @@
+
account.account.type.tree
account.account.type
@@ -685,6 +758,7 @@
+
account.account.type.form
account.account.type
@@ -724,8 +798,9 @@
-
-
+
account.move.tree
account.move
@@ -743,7 +818,10 @@
-
+
+
account.move.reconcile.form
account.move.reconcile
@@ -762,7 +840,9 @@
-
+
account.tax.code.search
account.tax.code
@@ -833,17 +913,13 @@
-
-
+
+
-
-
+
account.tax.tree
account.tax
@@ -965,7 +1041,57 @@
-
+
+
+
+ account.move.line
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ account.move.line.tree
+ account.move.line
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
account.move.line.form
account.move.line
@@ -1035,6 +1161,7 @@
+
account.move.line.form2
account.move.line
@@ -1082,37 +1209,7 @@
-
- account.move.line.tree
- account.move.line
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
account.move.line.graph
account.move.line
@@ -1124,6 +1221,7 @@
+
Journal Items
account.move.line
@@ -1153,15 +1251,17 @@
+
- {'journal_type':'general'}
Journal Items
account.move.line
-
- tree_account_move_line_quickadd
+ form
+ tree,form
+ {}
+
- Select the period and the journal you want to fill.
+ Click to register a new journal item.
This view can be used by accountants in order to quickly record
entries in OpenERP. If you want to record a supplier invoice,
@@ -1171,6 +1271,7 @@
+
-
- account.move.line
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {'search_default_unreconciled': 1,'view_mode':True}
- Journal Items to Reconcile
+
+ Lines to reconcile
account.move.line
-
- tree_account_reconciliation
-
-
- No journal items found.
-
-
+ form
+ tree,form
+ [('account_id.reconcile', '=', True),('reconcile_id','=',False)]
+
+
+
-
-
-
+
+ Journal Items
+ account.move.line
+ form
+ tree,form
+
+
+ {'search_default_account_id': [active_id]}
+
+
+
+ tree_but_open
+ account.account
+ Open Journal Items
+
+
+
+
account.move.tree
account.move
@@ -1271,8 +1360,10 @@
+
+ on_change="onchange_line_id(line_id)"
+ context="{'balance': balance , 'journal': journal_id }">
+
@@ -1363,6 +1455,7 @@
+
account.move.select
account.move
@@ -1387,6 +1480,7 @@
+
Journal Entries
account.move
@@ -1408,6 +1502,7 @@
+
+
+
+ Journal Items
+ account.move.line
+ form
+ tree,form
+
+
+
+
+
+ tree
+
+
+
+
+
+ form
+
+
+
+
+ {'search_default_unreconciled': 1,'view_mode':True}
+ Journal Items to Reconcile
+ account.move.line
+
+ tree_account_reconciliation
+
+
+ No journal items found.
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
account.journal.period.tree
account.journal.period
@@ -1458,7 +1620,10 @@
tree
-
+
+
account.model.line.tree
account.model.line
@@ -1475,6 +1640,8 @@
+
+
account.model.line.form
account.model.line
@@ -1494,6 +1661,7 @@
+
account.model.form
account.model
@@ -1512,6 +1680,7 @@
+
account.model.tree
account.model
@@ -1523,6 +1692,7 @@
+
account.model.search
account.model
@@ -1551,7 +1721,10 @@
action="action_model_form" name="Models" id="menu_action_model_form" sequence="5"
parent="account.menu_finance_recurrent_entries"/>
-
+
+
account.payment.term.line.tree
account.payment.term.line
@@ -1566,6 +1739,8 @@
+
+
account.payment.term.line.form
account.payment.term.line
@@ -1605,6 +1780,7 @@
+
account.payment.term.search
account.payment.term
@@ -1615,6 +1791,7 @@
+
account.payment.term.form
account.payment.term
@@ -1630,6 +1807,7 @@
+
Payment Terms
account.payment.term
@@ -1640,7 +1818,10 @@
-
+
+
account.subscription.line.form
account.subscription.line
@@ -1653,6 +1834,7 @@
+
account.subscription.line.tree
account.subscription.line
@@ -1663,6 +1845,7 @@
+
account.subscription.tree
account.subscription
@@ -1676,6 +1859,7 @@
+
account.subscription.search
account.subscription
@@ -1693,6 +1877,7 @@
+
account.subscription.form
account.subscription
@@ -1778,7 +1963,72 @@
-
+
+ Journal Items
+ account.move.line
+ form
+ tree,form
+ [('account_id','child_of', [active_id]),('state','<>','draft')]
+ {'account_id':active_id}
+
+
+
+ account.move.line.tax.tree
+ account.move.line
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Journal Items
+ account.move.line
+ form
+ tree,form
+
+ [('tax_code_id','child_of',active_id),('state','<>','draft')]
+
+
+ tree_but_open
+ account.tax.code
+ Tax Details
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+ Create Account
+ account.addtmpl.wizard
+
+
+
+
+
+
+
account.account.template.form
account.account.template
@@ -1837,6 +2104,7 @@
+
account.account.template.tree
account.account.template
@@ -1849,6 +2117,7 @@
+
account.account.template.search
account.account.template
@@ -1867,6 +2136,7 @@
+
Account Templates
account.account.template
@@ -1874,32 +2144,11 @@
tree,form
+
-
- Create Account
- account.addtmpl.wizard
-
-
-
-
-
-
-
-
+
account.chart.template.form
account.chart.template
@@ -1972,9 +2221,11 @@
form
tree,form
+
+
account.tax.template.form
account.tax.template
@@ -2053,6 +2304,7 @@
+
Tax Templates
account.tax.template
@@ -2060,6 +2312,7 @@
tree,form
+
@@ -2075,6 +2328,7 @@
+
account.tax.code.template.search
account.tax.code.template
@@ -2088,6 +2342,7 @@
+
account.tax.code.template.form
account.tax.code.template
@@ -2104,6 +2359,7 @@
+
Tax Code Templates
account.tax.code.template
@@ -2115,6 +2371,7 @@
+
Set Your Accounting Options
wizard.multi.charts.accounts
@@ -2153,6 +2410,7 @@
+
Set Your Accounting Options
ir.actions.act_window
@@ -2258,6 +2516,7 @@
+
account.bank.statement.form
account.bank.statement
@@ -2390,7 +2649,6 @@
-
tree
@@ -2420,7 +2678,10 @@
parent="menu_finance_payables"
action="base.action_partner_supplier_form" sequence="100"/>
-
+
+
account.financial.report.form
account.financial.report
@@ -2447,6 +2708,7 @@
+
account.financial.report.tree
account.financial.report
@@ -2459,6 +2721,7 @@
+
account.financial.report.search
account.financial.report
@@ -2474,6 +2737,7 @@
+
Financial Reports
ir.actions.act_window
@@ -2483,6 +2747,7 @@
+
@@ -2505,6 +2770,7 @@
[('parent_id','=',False)]
+
From bd458541c128aea1e7deaa984cd3cb1166c5dee0 Mon Sep 17 00:00:00 2001
From: "dle@openerp.com" <>
Date: Thu, 29 Nov 2012 15:56:57 +0100
Subject: [PATCH 47/48] [FIX]Deleted ir.values makes test fail
bzr revid: dle@openerp.com-20121129145657-g8dgyay16mcije1r
---
addons/account/account_view.xml | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 6f099e4b824..b041d9fe409 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -263,13 +263,6 @@
-
-
+
From 8acb5e3d4a93fe61be2fb13a82d1f5165f0b27e6 Mon Sep 17 00:00:00 2001
From: "dle@openerp.com" <>
Date: Thu, 29 Nov 2012 17:44:42 +0100
Subject: [PATCH 48/48] [DEL]Journal items wizard
bzr revid: dle@openerp.com-20121129164442-i50abrcy2ejvavee
---
addons/account/account_view.xml | 4 +-
.../account/test/account_fiscalyear_close.yml | 45 +---
addons/account/wizard/__init__.py | 1 -
addons/account/wizard/account_move_journal.py | 194 ------------------
.../wizard/account_move_journal_view.xml | 16 --
5 files changed, 2 insertions(+), 258 deletions(-)
delete mode 100644 addons/account/wizard/account_move_journal.py
delete mode 100644 addons/account/wizard/account_move_journal_view.xml
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index b041d9fe409..1dbb2561bc1 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -1095,20 +1095,18 @@
-
+
-
diff --git a/addons/account/test/account_fiscalyear_close.yml b/addons/account/test/account_fiscalyear_close.yml
index 10c949118c9..1c3547ccefd 100644
--- a/addons/account/test/account_fiscalyear_close.yml
+++ b/addons/account/test/account_fiscalyear_close.yml
@@ -46,47 +46,4 @@
!python {model: account.fiscalyear.close}: |
self.data_save(cr, uid, [ref("account_fiscalyear_close_0")], {"lang": 'en_US',
"active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_fy_close")],
- "tz": False, "active_id": ref("account.menu_wizard_fy_close"), })
-
--
- I check the opening entries By using "Entries by Line wizard"
--
- !record {model: account.move.journal, id: account_move_journal_0}:
- {}
--
- I clicked on Open Journal Button to check the entries
-
--
- !python {model: account.move.journal}: |
- self.action_open_window(cr, uid, [ref("account_move_journal_0")], {"lang": 'en_US',
- "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_move_journal_line_form")],
- "tz": False, "active_id": ref("account.menu_action_move_journal_line_form"),
- })
-
-#-
-# In order to test Cancel Opening Entries I cancelled the opening entries created for "Fiscal Year 2011"
-#-
-# !record {model: account.open.closed.fiscalyear, id: account_open_closed_fiscalyear_1}:
-# fyear_id: account.data_fiscalyear
-#-
-# I clicked on Open button
-#-
-# !python {model: account.open.closed.fiscalyear}: |
-# self.remove_entries(cr, uid, [ref("account_open_closed_fiscalyear_1")], {"lang":
-# 'en_US', "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_open_closed_fy")],
-# "tz": False, "active_id": ref("account.menu_wizard_open_closed_fy"), })
-#-
-# I check the opening entries By using "Entries by Line wizard"
-#-
-# !record {model: account.move.journal, id: account_move_journal_2}:
-# journal_id: account.sales_journal
-# period_id: account_period_jan11
-#
-#-
-# I checked the Opening entries are cancelled successfully
-#-
-# !python {model: account.move.journal}: |
-# self.action_open_window(cr, uid, [ref("account_move_journal_2")], {"lang": 'en_US',
-# "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_move_journal_line_form")],
-# "tz": False, "active_id": ref("account.menu_action_move_journal_line_form"),
-# })
+ "tz": False, "active_id": ref("account.menu_wizard_fy_close"), })
\ No newline at end of file
diff --git a/addons/account/wizard/__init__.py b/addons/account/wizard/__init__.py
index 87a053d558c..839e490ca66 100644
--- a/addons/account/wizard/__init__.py
+++ b/addons/account/wizard/__init__.py
@@ -31,7 +31,6 @@ import account_reconcile_partner_process
import account_reconcile
import account_unreconcile
import account_invoice_refund
-import account_move_journal
import account_journal_select
import account_move_bank_reconcile
import account_subscription_generate
diff --git a/addons/account/wizard/account_move_journal.py b/addons/account/wizard/account_move_journal.py
deleted file mode 100644
index 246532d38d7..00000000000
--- a/addons/account/wizard/account_move_journal.py
+++ /dev/null
@@ -1,194 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-
-from lxml import etree
-
-from osv import osv, fields
-from tools.translate import _
-import tools
-
-class account_move_journal(osv.osv_memory):
- _name = "account.move.journal"
- _description = "Move journal"
-
- _columns = {
- 'target_move': fields.selection([('posted', 'All Posted Entries'),
- ('all', 'All Entries'),
- ], 'Target Moves', required=True),
- }
-
- _defaults = {
- 'target_move': 'all'
- }
- def _get_period(self, cr, uid, context=None):
- """
- Return default account period value
- """
- account_period_obj = self.pool.get('account.period')
- ids = account_period_obj.find(cr, uid, context=context)
- period_id = False
- if ids:
- period_id = ids[0]
- return period_id
-
- def _get_journal(self, cr, uid, context=None):
- """
- Return journal based on the journal type
- """
-
- journal_id = False
-
- journal_pool = self.pool.get('account.journal')
- if context.get('journal_type', False):
- jids = journal_pool.search(cr, uid, [('type','=', context.get('journal_type'))])
- if not jids:
- raise osv.except_osv(_('Configuration Error!'), _('Cannot find any account journal of %s type for this company.\n\nYou can create one in the menu: \nConfiguration/Journals/Journals.') % context.get('journal_type'))
- journal_id = jids[0]
-
- return journal_id
-
- def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
- """
- Returns views and fields for current model where view will depend on {view_type}.
- @param cr: A database cursor
- @param user: ID of the user currently logged in
- @param view_id: list of fields, which required to read signatures
- @param view_type: defines a view type. it can be one of (form, tree, graph, calender, gantt, search, mdx)
- @param context: context arguments, like lang, time zone
- @param toolbar: contains a list of reports, wizards, and links related to current model
-
- @return: Returns a dict that contains definition for fields, views, and toolbars
- """
- if context is None:context = {}
- res = super(account_move_journal, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False)
-
- if context:
- if not view_id:
- return res
-
- period_pool = self.pool.get('account.period')
- journal_pool = self.pool.get('account.journal')
-
- journal_id = self._get_journal(cr, uid, context)
- period_id = self._get_period(cr, uid, context)
-
- journal = False
- if journal_id:
- journal = journal_pool.read(cr, uid, journal_id, ['name'], context=context).get('name',False)
- journal_string = _("Journal: %s") % tools.ustr(journal)
- else:
- journal_string = _("Journal: All")
-
- period = False
- if period_id:
- period = period_pool.browse(cr, uid, period_id, context=context).name
- period_string = _("Period: %s") % tools.ustr(period)
-
- open_string = _("Open")
- view = """
- """ % (_('Journal'), journal_string, _('Period'), period_string, open_string)
-
- view = etree.fromstring(view.encode('utf8'))
- xarch, xfields = self._view_look_dom_arch(cr, uid, view, view_id, context=context)
- view = xarch
- res.update({
- 'arch': view
- })
- return res
-
- def action_open_window(self, cr, uid, ids, context=None):
- """
- This function Open action move line window on given period and Journal/Payment Mode
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: account move journal’s ID or list of IDs
- @return: dictionary of Open action move line window on given period and Journal/Payment Mode
- """
-
- period_pool = self.pool.get('account.journal.period')
- data_pool = self.pool.get('ir.model.data')
- journal_pool = self.pool.get('account.journal')
- account_period_obj = self.pool.get('account.period')
-
- if context is None:
- context = {}
-
- journal_id = self._get_journal(cr, uid, context)
- period_id = self._get_period(cr, uid, context)
- target_move = self.read(cr, uid, ids, ['target_move'], context=context)[0]['target_move']
-
- name = _("Journal Items")
- if journal_id:
- ids = period_pool.search(cr, uid, [('journal_id', '=', journal_id), ('period_id', '=', period_id)], context=context)
-
- if not ids:
- journal = journal_pool.browse(cr, uid, journal_id, context=context)
- period = account_period_obj.browse(cr, uid, period_id, context=context)
-
- name = journal.name
- state = period.state
-
- if state == 'done':
- raise osv.except_osv(_('User Error!'), _('This period is already closed.'))
-
- company = period.company_id.id
- res = {
- 'name': name,
- 'period_id': period_id,
- 'journal_id': journal_id,
- 'company_id': company
- }
- period_pool.create(cr, uid, res,context=context)
-
- ids = period_pool.search(cr, uid, [('journal_id', '=', journal_id), ('period_id', '=', period_id)], context=context)
- period = period_pool.browse(cr, uid, ids[0], context=context)
- name = (period.journal_id.code or '') + ':' + (period.period_id.code or '')
-
- result = data_pool.get_object_reference(cr, uid, 'account', 'view_account_move_line_filter')
- res_id = result and result[1] or False
- move = 0
- if target_move == 'posted':
- move = 1
- return {
- 'name': name,
- 'view_type': 'form',
- 'view_mode': 'tree,graph,form',
- 'res_model': 'account.move.line',
- 'view_id': False,
- 'context': "{'search_default_posted': %d, 'search_default_journal_id':%d, 'search_default_period_id':%d}" % (move, journal_id, period_id),
- 'type': 'ir.actions.act_window',
- 'search_view_id': res_id
- }
-
-account_move_journal()
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/wizard/account_move_journal_view.xml b/addons/account/wizard/account_move_journal_view.xml
deleted file mode 100644
index 5d80cf319c5..00000000000
--- a/addons/account/wizard/account_move_journal_view.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
- account.move.journal.form
- account.move.journal
-
-
-
-
-
-
-