Jiten (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-monetary-widget-3-vme into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-monetary-widget-3-vme/+merge/126853

Hello,

This are some changes in view to based on new monetary widget for currency 
symbol and amount field.
For merge this branch first prefer web branch like, 
lp:~openerp-dev/openerp-web/trunk-monetary-widget-3-vme into.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-monetary-widget-3-vme/+merge/126853
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-monetary-widget-3-vme.
=== modified file 'account/account_bank_statement.py'
--- account/account_bank_statement.py	2012-09-25 07:10:40 +0000
+++ account/account_bank_statement.py	2012-09-28 05:08:27 +0000
@@ -458,11 +458,11 @@
 
     def onchange_journal_id(self, cr, uid, statement_id, journal_id, context=None):
         balance_start = self._compute_balance_end_real(cr, uid, journal_id, context=context)
-
-        journal_data = self.pool.get('account.journal').read(cr, uid, journal_id, ['default_debit_account_id', 'company_id'], context=context)
+        journal_data = self.pool.get('account.journal').read(cr, uid, journal_id, ['default_debit_account_id', 'company_id', 'currency'], context=context)
         account_id = journal_data['default_debit_account_id']
         company_id = journal_data['company_id']
-        return {'value': {'balance_start': balance_start, 'account_id': account_id, 'company_id': company_id}}
+        currency_id = journal_data['currency'] or self.pool.get('res.company').browse(cr, uid, company_id[0], context=context).currency_id.id
+        return {'value': {'balance_start': balance_start, 'account_id': account_id, 'company_id': company_id, 'currency': currency_id}}
 
     def unlink(self, cr, uid, ids, context=None):
         stat = self.read(cr, uid, ids, ['state'], context=context)

=== modified file 'account/account_view.xml'
--- account/account_view.xml	2012-09-21 13:37:48 +0000
+++ account/account_view.xml	2012-09-28 05:08:27 +0000
@@ -636,8 +636,8 @@
                         </group><group>
                             <label for="balance_start"/>
                             <div>
-                                <field name="balance_start" class="oe_inline"/>
-                                <field name="currency" class="oe_inline"/>
+                                <field name="balance_start" widget="monetary" widget_option="{'monetary_currency' : 'currency'}" />
+                                <field name="currency" invisible ="1" />
                             </div>
                             <field name="balance_end_real"/>
                         </group>

=== modified file 'account_voucher/voucher_payment_receipt_view.xml'
--- account_voucher/voucher_payment_receipt_view.xml	2012-09-27 17:36:41 +0000
+++ account_voucher/voucher_payment_receipt_view.xml	2012-09-28 05:08:27 +0000
@@ -450,7 +450,8 @@
                                     <field name="amount_original" readonly="1"/>
                                     <field name="amount_unreconciled" readonly="1" groups="account.group_account_user"/>
                                     <field name="reconcile" on_change="onchange_reconcile(reconcile, amount, amount_unreconciled, context)" groups="account.group_account_user"/>
-                                    <field name="amount" sum="Total Allocation" on_change="onchange_amount(amount, amount_unreconciled, context)" string="Allocation"/>
+                                    <field name="amount" sum="Total Allocation" on_change="onchange_amount(amount, amount_unreconciled, context)" string="Allocation CR" widget="monetary" widget_option="{'monetary_currency': 'currency_id'}"/>
+                                    <field name="currency_id" invisible="0"/>
                                 </tree>
                             </field>
                             <label for="line_dr_ids" attrs="{'invisible': [('pre_line','=',False)]}"/>
@@ -466,7 +467,8 @@
                                     <field name="amount_original" readonly="1"/>
                                     <field name="amount_unreconciled" readonly="1"/>
                                     <field name="reconcile" on_change="onchange_reconcile(reconcile, amount, amount_unreconciled, context)"/>
-                                    <field name="amount" sum="Total Allocation" on_change="onchange_amount(amount, amount_unreconciled, context)" string="Allocation"/>
+                                    <field name="amount" sum="Total Allocation" on_change="onchange_amount(amount, amount_unreconciled, context)" string="Allocation DR" widget="monetary" widget_option="{'monetary_currency': 'currency_id'}"/>
+                                    <field name="currency_id" invisible="0"/>
                                 </tree>
                             </field>
                             <group col="3">

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to