From fb41245f7843bdedfea2e621698927b83c079c6b Mon Sep 17 00:00:00 2001
From: "RGA(OpenERP)" <>
Date: Tue, 12 Jun 2012 12:49:58 +0530
Subject: [PATCH] [IMP] added form view at header on list view
bzr revid: rgaopenerp-20120612071958-2wlk6b4gek0xjc8v
---
addons/account/account_view.xml | 36 ++++++++++++++++++-----
addons/account/static/src/js/account.js | 20 ++++++++++++-
addons/account/static/src/xml/account.xml | 9 ++++--
3 files changed, 54 insertions(+), 11 deletions(-)
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 274a8993dc4..0a29167fa7a 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -1139,6 +1139,22 @@
+
+
+ account.move.line.form
+ account.move.line
+ form
+
+
+
+
+
Journal Items
@@ -1161,9 +1177,7 @@
-
-
-
+
@@ -1192,7 +1206,9 @@
{}
This view can be used by accountants in order to quickly record entries 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 counterpart "Account Payable".
-
+
+
+
+
- Journal Items
+ Journal sssssdfdsItems
account.move.line
form
tree,form
+
{'search_default_account_id': [active_id]}
@@ -1456,13 +1474,14 @@
src_model="account.move"/>
- Journal Items
+ Journssssal Items
ir.actions.act_window
account.move.line
form
tree,form
+
@@ -1900,12 +1919,13 @@
- Journal Items
+ Journal Itemaaaaas
account.move.line
form
tree,form
[('account_id','child_of', [active_id]),('state','<>','draft')]
{'account_id':active_id}
+
@@ -1933,7 +1953,7 @@
- Journal Items
+ Jouffffffffrnal Items
account.move.line
form
tree,form
diff --git a/addons/account/static/src/js/account.js b/addons/account/static/src/js/account.js
index a6f266b54e1..5bb8236fde3 100644
--- a/addons/account/static/src/js/account.js
+++ b/addons/account/static/src/js/account.js
@@ -1 +1,19 @@
-console.log('loading account.....')
+openerp.account = function(instance) {
+ instance.account.extend_view = instance.web.ViewManager.include({
+ start : function(){
+ this._super()
+ this.setup_exended_list_view()
+ },
+
+ setup_exended_list_view: function(parent){
+ if (this.action && this.action.extended_form_view_id){
+ view_id = this.action.extended_form_view_id[0]
+ var from_view = this.registry.get_object('form');
+ var options = {}
+ var obj_from_view = new from_view(this, this.dataset, view_id, options);
+ obj_from_view.template = 'ExtendedFormView'
+ obj_from_view.appendTo(this.$element.find('.oe_extended_form_view'))
+ }
+ },
+ })
+}
diff --git a/addons/account/static/src/xml/account.xml b/addons/account/static/src/xml/account.xml
index 388cd96f49b..9b3ae75cc9b 100644
--- a/addons/account/static/src/xml/account.xml
+++ b/addons/account/static/src/xml/account.xml
@@ -3,10 +3,15 @@
-->
-
+
test
-
+
+
+
+