Merge lp:~openerp-dev/openobject-addons/trunk-bug-999315-rmu into lp:openobject-addons

Proposed by Ravish(OpenERP)
Status: Merged
Merged at revision: 7438
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-999315-rmu
Merge into: lp:openobject-addons
Diff against target: 83 lines (+18/-8)
2 files modified
account/account.py (+12/-2)
account/account_view.xml (+6/-6)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-999315-rmu
Reviewer Review Type Date Requested Status
Amit Parik (community) Approve
OpenERP Core Team Pending
Review via email: mp+115138@code.launchpad.net

Description of the change

Hello,

Recurring model for account not showing account in account model line. Now it's working fine with this merge.

Thanks..!!!

To post a comment you must log in.
Revision history for this message
Amit Parik (amit-parik) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account.py'
2--- account/account.py 2012-09-12 00:57:21 +0000
3+++ account/account.py 2012-09-13 13:03:26 +0000
4@@ -2338,6 +2338,16 @@
5
6 return move_ids
7
8+ def onchange_journal_id(self, cr, uid, ids, journal_id, context=None):
9+ company_id = False
10+
11+ if journal_id:
12+ journal = self.pool.get('account.journal').browse(cr, uid, journal_id, context=context)
13+ if journal.company_id.id:
14+ company_id = journal.company_id.id
15+
16+ return {'value': {'company_id': company_id}}
17+
18 account_model()
19
20 class account_model_line(osv.osv):
21@@ -3013,9 +3023,9 @@
22 'purchase_tax_rate': fields.float('Purchase Tax(%)'),
23 'complete_tax_set': fields.boolean('Complete Set of Taxes', help='This boolean helps you to choose if you want to propose to the user to encode the sales and purchase rates or use the usual m2o fields. This last choice assumes that the set of tax defined for the chosen template is complete'),
24 }
25-
26+
27 def onchange_company_id(self, cr, uid, ids, company_id, context=None):
28- currency_id = False
29+ currency_id = False
30 if company_id:
31 currency_id = self.pool.get('res.company').browse(cr, uid, company_id, context=context).currency_id.id
32 return {'value': {'currency_id': currency_id}}
33
34=== modified file 'account/account_view.xml'
35--- account/account_view.xml 2012-09-11 08:42:15 +0000
36+++ account/account_view.xml 2012-09-13 13:03:26 +0000
37@@ -112,7 +112,7 @@
38 <field name="fiscalyear_id" widget="selection"/>
39 <label for="date_start" string="Duration"/>
40 <div>
41- <field name="date_start" class="oe_inline" nolabel="1"/> -
42+ <field name="date_start" class="oe_inline" nolabel="1"/> -
43 <field name="date_stop" nolabel="1" class="oe_inline"/>
44 </div>
45 </group>
46@@ -181,7 +181,7 @@
47 <form string="Account" version="7.0">
48 <label for="code" class="oe_edit_only" string="Account Code and Name"/>
49 <h1>
50- <field name="code" class="oe_inline" placeholder="Account code" style="width: 6em"/> -
51+ <field name="code" class="oe_inline" placeholder="Account code" style="width: 6em"/> -
52 <field name="name" class="oe_inline" placeholder="Account name"/>
53 </h1>
54 <group>
55@@ -1082,7 +1082,7 @@
56 <field eval="2" name="priority"/>
57 <field name="arch" type="xml">
58 <form string="Journal Item" version="7.0">
59- <sheet>
60+ <sheet>
61 <group>
62 <group>
63 <field name="name"/>
64@@ -1349,7 +1349,7 @@
65 <field name="date"/>
66 <field name="to_check"/>
67 <field name="amount" invisible="1"/>
68- </group>
69+ </group>
70 </group>
71 <notebook>
72 <page string="Journal Items">
73@@ -1651,8 +1651,8 @@
74 <form string="Journal Entry Model" version="7.0">
75 <group col="4">
76 <field name="name"/>
77- <field name="journal_id"/>
78- <field name="company_id" widget='selection' groups="base.group_multi_company"/>
79+ <field name="journal_id" on_change="onchange_journal_id(journal_id)"/>
80+ <field name="company_id" widget="selection" groups="base.group_multi_company"/>
81 </group>
82
83 <field name="lines_id" widget="one2many_list"/>

Subscribers

People subscribed via source and target branches

to all changes: