[MERGE] account_cancel: reorganize files, finish migration and lint
This commit is contained in:
@@ -13,8 +13,8 @@ This module adds 'Allow Canceling Entries' field on form view of account journal
|
||||
If set to true it allows user to cancel entries & invoices.
|
||||
""",
|
||||
'website': 'https://www.odoo.com/page/accounting',
|
||||
'depends' : ['account'],
|
||||
'data': ['account_cancel_view.xml' ],
|
||||
'depends': ['account'],
|
||||
'data': ['views/account_views.xml'],
|
||||
'demo': [],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from openerp import models, api, _
|
||||
from openerp.exceptions import Warning
|
||||
from odoo import models, api, _
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
class BankStatement(models.Model):
|
||||
@@ -25,5 +25,5 @@ class BankStatementLine(models.Model):
|
||||
if not self.env.context.get('bank_statement_cancel'):
|
||||
for line in self:
|
||||
if line.statement_id.state == 'confirm':
|
||||
raise Warning(_("Please set the bank statement to New before canceling."))
|
||||
raise UserError(_("Please set the bank statement to New before canceling."))
|
||||
return super(BankStatementLine, self).cancel()
|
||||
|
||||
+3
-6
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_account_journal_form_inherit" model="ir.ui.view">
|
||||
<field name="name">account.journal.form</field>
|
||||
<field name="model">account.journal</field>
|
||||
@@ -69,6 +68,4 @@
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user