Parcourir la source

[FIX] estados

Rodney Enciso Arias il y a 7 ans
Parent
commit
e56b2234ed
1 fichiers modifiés avec 4 ajouts et 3 suppressions
  1. 4 3
      views/account_bank_statement_multi_store.xml

+ 4 - 3
views/account_bank_statement_multi_store.xml

@@ -9,7 +9,7 @@
                     <field name="journal_id" domain="[('type','=','cash'),('store_ids','=',store_id)]" widget="selection" on_change="onchange_journal_id(journal_id)" string="Metodo de pago"/>
                 </field>
                 <field name="journal_id" position="before">
-                    <field name="store_id" string="Sucursal" widget="selection" invisible="1"/>
+                    <field name="store_id" string="Sucursal" widget="selection" invisible="1" attrs="{'readonly': [('state','=','confirm')]}"/>
                 </field>
             </field>
         </record>
@@ -19,10 +19,11 @@
             <field name="inherit_id" ref="account.view_bank_statement_form"/>
             <field name="arch" type="xml">
                 <field name="journal_id" position="replace">
-                    <field name="journal_id" domain="[('type','=','bank'),('store_ids','=',store_id)]" widget="selection" on_change="onchange_journal_id(journal_id)" string="Metodo de pago"/>
+                    <!-- <field name="journal_id" domain="[('type','=','bank'),('store_ids','=',store_id)]" widget="selection" on_change="onchange_journal_id(journal_id)" string="Metodo de pago" /> -->
+                     <field name="journal_id" domain="[('type', '=', 'bank'),('store_ids','=',store_id)]" on_change="onchange_journal_id(journal_id)" attrs="{'readonly': [('move_line_ids', '!=', [])]}" widget="selection"/>
                 </field>
                 <field name="journal_id" position="before">
-                    <field name="store_id" string="Sucursal" widget="selection" invisible="1"/>
+                    <field name="store_id" string="Sucursal" widget="selection" invisible="1" attrs="{'readonly': [('state','=','confirm')]}"/>
                 </field>
             </field>
         </record>