[IMP] Improved code for following
authorParamjit Singh Sahota <psa@tinyerp.com>
Thu, 11 Jul 2013 10:59:00 +0000 (16:29 +0530)
committerParamjit Singh Sahota <psa@tinyerp.com>
Thu, 11 Jul 2013 10:59:00 +0000 (16:29 +0530)
1/.  Onchange on Cash Control was not working in POS
2/.  Added new css for cash control
3/.  Fixed the issue for the space between the Real Closing Balance and Differences.

bzr revid: psa@tinyerp.com-20130711105900-zzxnzky2nr6ms4c9

addons/account/__openerp__.py
addons/account/account_view.xml
addons/account/static/src/css/account_bank_and_cash.css [new file with mode: 0644]
addons/account/static/src/css/account_move_reconciliation.css
addons/point_of_sale/point_of_sale_view.xml
addons/point_of_sale/static/src/css/pos.css

index a380a69..167d89a 100644 (file)
@@ -135,7 +135,8 @@ for a particular financial year and for preparation of vouchers there is a modul
     ],
     'css':[
         'static/src/css/account_move_reconciliation.css',
-        'static/src/css/account_move_line_quickadd.css'
+        'static/src/css/account_move_line_quickadd.css',
+        'static/src/css/account_bank_and_cash.css',
     ],
     'demo': [
         'demo/account_demo.xml',
index 99a8927..26aedd2 100644 (file)
                         <div>
                             <group class="oe_subtotal_footer oe_right" attrs="{'invisible' : [('state', '=', 'draft')]}">
                                 <field name="balance_end_real" readonly="1" string="Real Closing Balance" class="oe_subtotal_footer_separator oe_real_closing_balance" widget="monetary" options="{'currency_field': 'currency'}" help="Total of closing cash control lines."/>
-                                <field name="difference" class="oe_subtotal_footer_separator oe_difference"  widget="monetary" options="{'currency_field': 'currency'}"/>
-                            </group>    
+                            </group>
+                            <group/>
+                            <group/>
+                            <group class="oe_subtotal_footer oe_right" attrs="{'invisible' : [('state', '=', 'draft')]}">
+                                <field name="difference" class="oe_subtotal_footer_separator oe_difference" widget="monetary" options="{'currency_field': 'currency'}"/>
+                            </group>
                         </div>
                     </group>
                 </sheet>
diff --git a/addons/account/static/src/css/account_bank_and_cash.css b/addons/account/static/src/css/account_bank_and_cash.css
new file mode 100644 (file)
index 0000000..5b5643d
--- /dev/null
@@ -0,0 +1,27 @@
+.openerp .oe_force_bold {
+  font-weight: bold !important;
+}
+.openerp label.oe_open_balance{
+    margin-right: -18px;
+}
+.openerp label.oe_subtotal_footer_separator{
+    float:right;
+    width: 184px !important;
+}
+.openerp label.oe_mini_subtotal_footer_separator{
+    margin-right: -14px;
+}
+.openerp .oe_account_total, .openerp .oe_pos_total {
+    margin-left: -2px;
+}
+.openerp label.oe_real_closing_balance{
+    min-width: 184px !important;
+}
+.openerp label.oe_difference, .openerp label.oe_pos_difference {
+    margin-right: -10px;
+    padding-left: 10px !important;
+    min-width: 195px !important;
+}
+.openerp .oe_opening_total{
+  margin-right: 4px;
+}
index b6baa12..a69c7a7 100644 (file)
     display: table-cell;
     width: 50%:
 }
-.openerp .oe_force_bold {
-  font-weight: bold !important;
-}
-.openerp label.oe_open_balance{
-    margin-right: -18px;
-}
-.openerp label.oe_subtotal_footer_separator{
-    float:right;
-}
-.openerp label.oe_mini_subtotal_footer_separator{
-    margin-right: -14px;
-}
-.openerp .oe_account_total {
-    margin-left: -2px;
-}
-.openerp label.oe_real_closing_balance{
-    min-width: 184px !important;
-}
-.openerp label.oe_difference {
-    margin-right: -10px;
-    padding-left: 10px !important;
-    min-width: 195px !important;
-}
-
index 637bc0e..4792742 100644 (file)
                                 <field name="details_ids" nolabel="1" colspan="2">
                                     <tree string="Cashbox Lines" editable="bottom">
                                         <field name="pieces" readonly="1" />
-                                        <field name="number_closing" />
+                                        <field name="number_closing" on_change="on_change_sub_closing(pieces, number_closing)"/>
                                         <field name="subtotal_closing" string="Closing Subtotal" sum="Total"/>
                                     </tree>
                                 </field>
                             <div attrs="{'invisible' : [('cash_control', '=', False)]}">
                                 <group class="oe_subtotal_footer oe_right">
                                     <field name="cash_register_balance_start" readonly="1" string="Opening Balance" class="oe_subtotal_footer_separator" widget="monetary" options="{'currency_field': 'currency_id'}"/>
-                                    <label for="cash_register_total_entry_encoding" attrs="{'invisible' : [('state', '=', 'opening_control')]}" string="+ Transactions" class="oe_force_bold oe_pos_opening_total"/>
+                                    <label for="cash_register_total_entry_encoding" attrs="{'invisible' : [('state', '=', 'opening_control')]}" string="+ Transactions" class="oe_force_bold oe_opening_total"/>
                                     <field name="cash_register_total_entry_encoding" nolabel="1" attrs="{'invisible' : [('state', '=', 'opening_control')]}" class="oe_bold oe_pos_total" widget="monetary" options="{'currency_field': 'currency_id'}"/>
-                                    <label for="cash_register_balance_end" attrs="{'invisible' : [('state', '=', 'opening_control')]}" string="= Theoretical Closing Balance" class="oe_force_bold oe_pos_opening_total"/>
+                                    <label for="cash_register_balance_end" attrs="{'invisible' : [('state', '=', 'opening_control')]}" string="= Theoretical Closing Balance" class="oe_force_bold oe_opening_total"/>
                                     <field name="cash_register_balance_end" nolabel="1" attrs="{'invisible' : [('state', '=', 'opening_control')]}" class="oe_bold oe_pos_total" widget="monetary" options="{'currency_field': 'currency_id'}"/>
                                 </group>
                                 <div class="oe_clear"/>
                                     </p>
                                 </div>
                             </div>
-
-
-                            <group class="oe_subtotal_footer oe_right" attrs="{'invisible': ['|', ('cash_control', '=', False), ('state', '=', 'opening_control')]}">
-                                <field name="cash_register_balance_end_real" string="Real Closing Balance" class="oe_subtotal_footer_separator" widget="monetary" options="{'currency_field': 'currency_id'}"/>
-                                <field name="cash_register_difference" class="oe_subtotal_footer_separator oe_right oe_pos_total oe_pos_difference" widget="monetary" options="{'currency_field': 'currency_id'}"/>
-                            </group>
+                            <div>
+                                <group class="oe_subtotal_footer oe_right" attrs="{'invisible': ['|', ('cash_control', '=', False), ('state', '=', 'opening_control')]}">
+                                    <field name="cash_register_balance_end_real" string="Real Closing Balance" class="oe_subtotal_footer_separator" widget="monetary" options="{'currency_field': 'currency_id'}"/>
+                                </group>
+                                <group/>
+                                <group/>
+                                <group class="oe_subtotal_footer oe_right" attrs="{'invisible': ['|', ('cash_control', '=', False), ('state', '=', 'opening_control')]}">
+                                    <field name="cash_register_difference" class="oe_subtotal_footer_separator oe_right oe_pos_total oe_pos_difference" widget="monetary" options="{'currency_field': 'currency_id'}"/>
+                                </group>
+                            </div>
                         </group>
-
                         <separator string="Summary by Payment Methods" attrs="{'invisible' : [('state', '=', 'opening_control')]}"/>
                         <field name="statement_ids" attrs="{'invisible' : [('state', '=', 'opening_control')]}">
                             <tree string="Statements">
index 9d193af..d9a4d6d 100644 (file)
     box-shadow: 0px 3px 38px rgba(0,0,0,0.3);
     border-radius: 3px;
 }
-.openerp .oe_force_bold{
-  font-weight: bold !important;
-}
-.openerp .oe_pos_opening_total{
-  margin-right: 4px;
-}
-.openerp .oe_pos_total{
-  margin-left: -2px;
-}
-.openerp label.oe_mini_subtotal_footer_separator{
-  margin-right: -14px;
-}
-.openerp label.oe_subtotal_footer_separator{
-    width: 184px !important;
-}
-.openerp label.oe_pos_difference{
-    margin-right: -11px;
-    width: 195px !important;
-}