mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[FIX] account_exception: minor corrections after code review
H11044
This commit is contained in:
@@ -16,7 +16,6 @@ Custom exceptions on journal entries
|
||||
'account',
|
||||
],
|
||||
'data': [
|
||||
# 'demo/account_exception_demo.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'views/account_move_views.xml',
|
||||
'wizard/account_move_exception_confirm_views.xml',
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<field name="description">No phone number on customer</field>
|
||||
<field name="sequence">50</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="code">failed = journal_entry.move_type == 'out_invoice' and not journal_entry.partner_id.phone</field>
|
||||
<field name="code">failed = self.move_type == 'out_invoice' and not self.partner_id.phone</field>
|
||||
<field name="active" eval="True"/>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -22,13 +22,6 @@ class ExceptionRule(models.Model):
|
||||
class AccountMove(models.Model):
|
||||
_inherit = ['account.move', 'base.exception']
|
||||
_name = "account.move"
|
||||
_order = 'main_exception_id asc, date desc, name desc, id desc'
|
||||
|
||||
@api.model
|
||||
def _exception_rule_eval_context(self, rec):
|
||||
res = super(AccountMove, self)._exception_rule_eval_context(rec)
|
||||
res['journal_entry'] = rec
|
||||
return res
|
||||
|
||||
@api.model
|
||||
def _reverse_field(self):
|
||||
|
||||
Reference in New Issue
Block a user