[IMP] improve UI for V7

This commit is contained in:
unknown
2014-01-06 13:01:01 +01:00
committed by Holger Brunn
8 changed files with 85 additions and 62 deletions

View File

@@ -106,4 +106,5 @@
recognized and made available at server (re)start.
''',
'installable': True,
'auto_install': False,
}

View File

@@ -247,6 +247,7 @@ class account_banking_imported_file(orm.Model):
'file': fields.binary('Raw Data', readonly=True,
states={'draft': [('readonly', False)]}
),
'file_name': fields.char('File name', size=256),
'log': fields.text('Import Log', readonly=True,
states={'draft': [('readonly', False)]}
),

View File

@@ -16,7 +16,10 @@
id="account_banking.menu_finance_banking_settings"
parent="account.menu_finance_configuration"
/>
<menuitem action="account.action_view_bank_statement_tree"
id="account.journal_cash_move_lines"
sequence="18"
parent="account.menu_finance_bank_and_cash"/>
<!-- Add a shortcut menu for bank accounts -->
<record model="ir.actions.act_window" id="action_account_banking_res_partner_banks">
<field name="name">Bank Accounts</field>
@@ -105,7 +108,8 @@
<field name="date" />
<field name="user_id" />
<field name="state" />
<field name="file"/>
<field name="file" filename="file_name"/>
<field name="file_name" invisible="1"/>
<field name="format" />
</page>
<page string="Statements">
@@ -142,17 +146,17 @@
<!-- Add a menu item for it -->
<menuitem name="Imported Bank Statements Files"
id="menu_action_account_banking_imported_files"
parent="account_banking.menu_finance_banking_actions"
parent="account.menu_finance_bank_and_cash"
action="action_account_banking_imported_files"
sequence="12"
sequence="15"
/>
<!-- Add the import wizard to the menu -->
<menuitem name="Import Bank Statements File"
id="menu_account_banking_import_wizard"
parent="account_banking.menu_finance_banking_actions"
parent="account.menu_finance_bank_and_cash"
action="wizard_account_banking_import_file"
sequence="15"/>
sequence="12"/>
<!-- Add the import wizard to the statement's right menu -->
<act_window name="Import Bank Statements File"

View File

@@ -140,6 +140,7 @@ class banking_import(orm.TransientModel):
import_id = statement_file_obj.create(cr, uid, dict(
company_id = company.id,
file = statements_file,
file_name = banking_import.file_name,
state = 'unfinished',
format = parser.name,
))
@@ -353,7 +354,7 @@ class banking_import(orm.TransientModel):
'%s: %s' % (_('Number of bank costs invoices created'),
results.bank_costs_invoice_cnt),
'',
'%s:' % ('Error report'),
'%s:' % (_('Error report')),
'',
]
text_log = '\n'.join(report + results.log)
@@ -390,6 +391,7 @@ class banking_import(orm.TransientModel):
'error': [('readonly', True)],
},
),
'file_name': fields.char('File name', size=256),
'file': fields.binary(
'Statements File', required=True,
help = ('The Transactions File to import. Please note that while it is '

View File

@@ -5,15 +5,16 @@
<field name="name">account.banking.bank.import</field>
<field name="model">account.banking.bank.import</field>
<field name="arch" type="xml">
<form string="Import Bank Transactions File">
<group colspan="4" states="init,ready,error">
<separator colspan="4" string="Select the processing details:"/>
<field name="company" colspan="1"/>
<field name="file"/>
<newline />
<field name="parser"/>
<field name="state" invisible="1"/>
</group>
<form string="Import Bank Transactions File" version="7.0">
<group colspan="4" states="init,ready,error">
<separator colspan="4" string="Select the processing details:"/>
<field name="company" colspan="1"/>
<field name="file" filename="file_name"/>
<field name="file_name" invisible="1"/>
<newline />
<field name="parser"/>
<field name="state" invisible="1"/>
</group>
<notebook colspan="4">
<page attrs="{'invisible': [('state', '!=', 'review')]}" string="Transactions">
<field name="line_ids" colspan="4" nolabel="1">
@@ -37,16 +38,16 @@
attrs="{'invisible': [('state', '!=', 'ready')]}" />
</page>
</notebook>
<group colspan="2" >
<button icon="gtk-cancel"
special="cancel"
states="init"
string="Cancel"/>
<button icon="gtk-ok"
string="Import"
states="init"
name="import_statements_file"
type="object"/>
<footer>
<div attrs="{'invisible': [('state', '!=', 'init')]}">
<button string="Import" class="oe_highlight"
states="init" name="import_statements_file"
type="object"/>
or
<button class="oe_link" special="cancel"
states="init" string="Cancel"/>
</div>
<button icon="gtk-close"
special="cancel"
string="Close"
@@ -61,7 +62,7 @@
type="object"
string="Confirm"
states="review"/>
</group>
</footer>
</form>
</field>
</record>

View File

@@ -5,7 +5,7 @@
<field name="name">transaction.wizard.first</field>
<field name="model">banking.transaction.wizard</field>
<field name="arch" type="xml">
<form string="Match transaction">
<form string="Match transaction" version="7.0">
<!-- fields used for form logic -->
<field name="statement_line_parent_id" invisible="True"/>
<field name="invoice_ids" invisible="True"/>
@@ -36,22 +36,25 @@
<separator string="Multiple matches" colspan="2"/>
<label colspan="2" string="Multiple matches were found for this bank transfer. You must pick one of the matches or select a match manually below." />
</group>
<group attrs="{'readonly': [('match_multi', '!=', True)]}" col="8">
</group>
</group>
<group>
<newline/>
<!-- show if we have an invoice type match (but the user may need to select from multiple options)
or whenever there is an invoice_id (e.g. in case of a manual match)
-->
<field name='invoice_id'
attrs="{'readonly': [('match_multi', '=', False)], 'invisible': [('match_type', '!=', 'invoice'),('invoice_id', '=', False)]}"
attrs="{'readonly': [('match_multi', '=', False)], 'invisible': [('match_type', '!=', 'invoice'),('invoice_id', '=', False)]}" colspan="2"
domain="[('id', 'in', invoice_ids[0][2])]"
/>
<!-- show if we have a move type match or a manual match without an invoice_id
-->
<field name='move_line_id'
attrs="{'readonly': [('match_multi', '=', False)], 'invisible': [('match_type', '!=', 'move'),('invoice_id', '=', False)]}"
attrs="{'readonly': [('match_multi', '=', False)], 'invisible': [('match_type', '!=', 'move'),('invoice_id', '=', False)]}" colspan="2"
domain="[('id', 'in', move_line_ids[0][2])]"
/>
<field name='analytic_account_id' />
</group>
<newline/>
<field colspan="2" name='analytic_account_id' />
<button colspan="1"
name="trigger_write"
type="object"
@@ -85,9 +88,11 @@
</page>
<!-- Manual selection -->
<page string="Manual match">
<separator string="Match one or more invoices" colspan="4"/>
<field name="manual_invoice_ids" colspan="4"
context="{'search_default_partner_id': partner_id}"
/>
<separator string="Or match one or more entries" colspan="4"/>
<field name="manual_move_line_ids" colspan="4"
context="{'search_default_partner_id': partner_id}"
/>
@@ -120,11 +125,10 @@
</group>
</page>
</notebook>
<group colspan="2">
<separator/>
<footer>
<button icon="gtk-ok" string="Close" special="cancel"/>
</group>
</group>
</footer>
</form>
</field>
</record>

View File

@@ -6,7 +6,7 @@
<field name="type">form</field>
<field name="model">banking.link_partner</field>
<field name="arch" type="xml">
<form string="Link partner">
<form string="Link partner" version="7.0" >
<group colspan="4" col="6" string="Transaction data">
<field name="ref" />
<field name="amount" />
@@ -40,15 +40,20 @@
<field name="email" widget="email"/>
</group>
</group>
<button icon="gtk-cancel" string="Cancel" special="cancel" />
<button icon="gtk-ok" string="Create partner"
name="link_partner" type="object"
attrs="{'invisible': [('partner_id', '!=', False)]}"
/>
<button icon="gtk-ok" string="Link existing partner"
name="link_partner" type="object"
attrs="{'invisible': [('partner_id', '==', False)]}"
/>
<footer>
<button string="Create partner"
name="link_partner" type="object"
class="oe_highlight"
attrs="{'invisible': [('partner_id', '!=', False)]}"
/>
<button string="Link existing partner"
class="oe_highlight"
name="link_partner" type="object"
attrs="{'invisible': [('partner_id', '==', False)]}"
/>
or
<button class="oe_link" string="Cancel" special="cancel" />
</footer>
</form>
</field>
</record>

View File

@@ -12,24 +12,29 @@
</field>
<xpath expr="//group/separator[@string='Multiple matches']/.."
position="after">
<field name='payment_line_id'
attrs="{'invisible': [('match_type', 'not in',
('storno', 'payment', 'payment_manual'))]}"
/>
<group>
<field name='payment_line_id'
attrs="{'invisible': [('match_type', 'not in',
('storno', 'payment', 'payment_manual'))]}" />
</group>
</xpath>
<field name="move_line_id" position="after">
<field name='payment_order_id'
attrs="{'readonly': [('match_multi', '=', False)],
'invisible': [('match_type', 'not in',
('payment_order', 'payment_order_manual'))]
}"
domain="[('id', 'in', payment_order_ids[0][2])]"
/>
</field>
<field name="manual_move_line_ids" position="after">
<field name="manual_payment_line_id"/>
<field name="manual_payment_order_id"/>
<group>
<field name='payment_order_id'
attrs="{'readonly': [('match_multi', '=', False)],
'invisible': [('match_type', 'not in',
('payment_order', 'payment_order_manual'))]}"
domain="[('id', 'in', payment_order_ids[0][2])]" />
</group>
</field>
<page string="Manual match" position="after">
<page string="Match Payments">
<separator string="Match this payment line" colspan="4"/>
<field name="manual_payment_line_id"/>
<separator string="Match this payment order" colspan="4"/>
<field name="manual_payment_order_id"/>
</page>
</page>
</field>
</record>
</data>