[MRG] Merge to remove the import invoice button from bank statement. You now have to pass through the selection form

(lp:c2c-financial-addons/6.1 rev 71)
This commit is contained in:
Joël Grand-Guillaume
2012-07-04 13:51:39 +02:00
parent 77441f2bf9
commit 63aec8280a
3 changed files with 22 additions and 1 deletions

View File

@@ -32,7 +32,9 @@
""",
'website': 'http://www.camptocamp.com',
'init_xml': [],
'update_xml': [],
'update_xml': [
"statement_voucher_view.xml",
],
'demo_xml': [],
'test': [],
'installable': True,

View File

@@ -34,6 +34,8 @@ class AccountVoucher(Model):
return super(AccountVoucher, self)._get_period(cr, uid, context)
def create(self, cr, uid, values, context=None):
import pdb
pdb.set_trace()
"""If no period defined in values, ask it from moves."""
if values.get('period_id') == False and context.get('move_line_ids'):
values['period_id'] = self._get_period(cr, uid, context)

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="account_voucher.view_bank_statement_form_invoice" model="ir.ui.view">
<field name="name">account.bank.statement.invoice.form.inherit</field>
<field name="model">account.bank.statement</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.view_bank_statement_form"/>
<field name="arch" type="xml">
<field name="currency" invisible="1" position="after">
</field>
</field>
</record>
</data>
</openerp>