mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[FIX] replace old naming of exception + simplify xpath expression to make it more portable
This commit is contained in:
@@ -394,7 +394,7 @@ class AccountStatement(orm.Model):
|
||||
], context=context)
|
||||
if line_without_account:
|
||||
stat = self.browse(cr, uid, stat_id, context=context)
|
||||
raise osv.except_osv(_('User error'),
|
||||
raise orm.except_orm(_('User error'),
|
||||
_('You should fill all account on the line of the'
|
||||
' statement %s')%stat.name)
|
||||
return super(AccountStatement, self).button_confirm_bank(cr, uid, ids, context=context)
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
<field name="type">form</field>
|
||||
<field eval="20" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/sheet/notebook/page/field[@name='line_ids']/form/group/field[@name='account_id']" position="attributes">
|
||||
<xpath expr="//field[@name='line_ids']/form//field[@name='account_id']" position="attributes">
|
||||
<attribute name="attrs">{'required': [('already_completed','=', True)]}</attribute>
|
||||
</xpath>
|
||||
<xpath expr="/form/sheet/notebook/page/field[@name='line_ids']/tree/field[@name='account_id']" position="attributes">
|
||||
<xpath expr="//field[@name='line_ids']/tree//field[@name='account_id']" position="attributes">
|
||||
<attribute name="attrs">{'required': [('already_completed','=', True)]}</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user