summaryrefslogtreecommitdiff
path: root/fixco_custom/models/account_payment.py
diff options
context:
space:
mode:
Diffstat (limited to 'fixco_custom/models/account_payment.py')
-rw-r--r--fixco_custom/models/account_payment.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/fixco_custom/models/account_payment.py b/fixco_custom/models/account_payment.py
new file mode 100644
index 0000000..2c7a5b4
--- /dev/null
+++ b/fixco_custom/models/account_payment.py
@@ -0,0 +1,11 @@
+from odoo import fields, models, api
+from odoo.tools.misc import format_date, OrderedSet
+from odoo.exceptions import UserError
+
+class AccountPayment(models.Model):
+ _inherit = 'account.payment'
+
+ @api.constrains('journal_id')
+ def set_default_journal_id(self):
+ for rec in self:
+ rec.journal_id = 21 \ No newline at end of file