[MIGR] Module account_statement_base_completion

This commit is contained in:
Joel Grand-Guillaume
2012-12-18 21:22:52 +01:00
parent ed6a7cf512
commit 64c68c7b05
2 changed files with 8 additions and 9 deletions

View File

@@ -353,8 +353,7 @@ class AccountBankSatement(Model):
+ "\n" + error_log + "-------------" + "\n"]
log = "\n".join(log_line)
self.write(cr, uid, [stat_id], {'completion_logs' : log}, context=context)
logger.notifyChannel('Bank Statement Completion', netsvc.LOG_INFO,
"Bank Statement ID %s has %s lines completed"%(stat_id, number_imported))
self.message_post(cr, uid, [stat_id], body=_('Statement %s auto-completed for %s lines completed') % (st_number,number_imported), context=context)
return True
def button_auto_completion(self, cr, uid, ids, context=None):

View File

@@ -10,21 +10,21 @@
<field name="type">form</field>
<field name="arch" type="xml">
<data>
<xpath expr="/form/notebook/page/field[@name='line_ids']/form/field[@name='sequence']" position="after">
<xpath expr="/form/sheet/notebook/page/field[@name='line_ids']/form/group/field[@name='sequence']" position="after">
<separator colspan="4" string="Importation related infos"/>
<field name="label" />
<field name="already_completed" />
</xpath>
<xpath expr="/form/group[2]" position="attributes">
<!-- <xpath expr="/form/group[2]" position="attributes">
<attribute name="col">10</attribute>
</xpath>
</xpath> -->
<xpath expr="/form/group/field[@name='balance_end']" position="after">
<xpath expr="/form/sheet/div[@name='import_buttons']" position="after">
<button name="button_auto_completion" string="Auto Completion" states='draft,open' type="object" colspan="1"/>
</xpath>
<xpath expr="/form/notebook/page[@string='Journal Entries']" position="after">
<xpath expr="/form/sheet/notebook/page[@string='Transactions']" position="after">
<page string="Completion Logs" attrs="{'invisible':[('completion_logs','=',False)]}">
<field name="completion_logs" colspan="4" nolabel="1" attrs="{'invisible':[('completion_logs','=',False)]}"/>
</page>
@@ -40,7 +40,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<data>
<xpath expr="/form/notebook/page/field[@name='line_ids']/tree/field[@name='amount']" position="after">
<xpath expr="/form/sheet/notebook/page/field[@name='line_ids']/tree/field[@name='amount']" position="after">
<field name="already_completed" />
</xpath>
</data>