فهرست منبع

commit incial

Rodney Enciso Arias 7 سال پیش
کامیت
4abab5ff17

+ 3 - 0
__init__.py

@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
+# import controllers
+import account_bank_statement_multi_store

BIN
__init__.pyc


+ 21 - 0
__openerp__.py

@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+{
+    'name': "Account Bank Statement Multi Store",
+
+    'summary': """
+        Filtra los metodos de pago en el registro de caja""",
+
+    'description': """
+        Filtra los metodos de pago, de acuerdo a las sucursales.
+        Depende del modulo 'multi_store' de ADHOC SA.
+    """,
+
+    'author': "Eiru Software / Rodney Enciso Arias",
+    'website': "http://www.eiru.com.py",
+    'category': 'Accounting',
+    'version': '0.2',
+    'depends': ['base','account_voucher','multi_store'],
+    'data': [
+        'views/account_bank_statement_multi_store.xml',
+    ],
+}

+ 8 - 0
account_bank_statement_multi_store.py

@@ -0,0 +1,8 @@
+# -*- coding: utf-8 -*-
+
+from openerp import models, fields, api
+
+class AccountBankStatementMultiStore(models.Model):
+    _inherit = 'account.bank.statement'
+
+    store_id = fields.Many2one('res.store', 'Current Store', default=lambda self: self.env.user.store_id)

BIN
account_bank_statement_multi_store.pyc


BIN
payment_method_filter.pyc


+ 54 - 0
views/account_bank_statement_multi_store.xml

@@ -0,0 +1,54 @@
+<openerp>
+    <data>
+        <record model="ir.ui.view" id="account_bank_statement_multi_store">
+            <field name="name">account.bank.statement.multi.store</field>
+            <field name="model">account.bank.statement</field>
+            <field name="inherit_id" ref="account.view_bank_statement_form2"/>
+            <field name="arch" type="xml">
+                <field name="journal_id" position="replace">
+                    <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>
+            </field>
+        </record>
+        <record model="ir.ui.view" id="account_bank_statement_multi_store_bank">
+            <field name="name">account.bank.statement.multi.store.bank</field>
+            <field name="model">account.bank.statement</field>
+            <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>
+                <field name="journal_id" position="before">
+                    <field name="store_id" string="Sucursal" widget="selection" invisible="1"/>
+                </field>
+            </field>
+        </record>
+        <record model="ir.ui.view" id="account_bank_statement_multi_store_usability">
+            <field name="name">account.bank.statement.multi.store.usability</field>
+            <field name="model">account.bank.statement</field>
+            <field name="inherit_id" ref="account_bank_statement_multi_store.account_bank_statement_multi_store"/>
+            <field name="groups_id" eval="[(6, 0, [ref('multi_store.group_multi_store')])]"/>
+            <field name="arch" type="xml">
+                <field name="store_id" position="attributes">
+                    <attribute name="invisible">0</attribute>
+                    <attribute name="required">1</attribute>
+                </field>
+            </field>
+        </record>
+        <record model="ir.ui.view" id="account_bank_statement_multi_store_usability">
+            <field name="name">account.bank.statement.multi.store.usability</field>
+            <field name="model">account.bank.statement</field>
+            <field name="inherit_id" ref="account_bank_statement_multi_store.account_bank_statement_multi_store_bank"/>
+            <field name="groups_id" eval="[(6, 0, [ref('multi_store.group_multi_store')])]"/>
+            <field name="arch" type="xml">
+                <field name="store_id" position="attributes">
+                    <attribute name="invisible">0</attribute>
+                    <attribute name="required">1</attribute>
+                </field>
+            </field>
+        </record>
+    </data>
+</openerp>