diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 17:14:58 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 17:14:58 +0700 |
| commit | 1ca3b3df3421961caec3b747a364071c80f5c7da (patch) | |
| tree | 6778a1f0f3f9b4c6e26d6d87ccde16e24da6c9d6 /base_accounting_kit/models/multiple_invoice.py | |
| parent | b57188be371d36d96caac4b8d65a40745c0e972c (diff) | |
initial commit
Diffstat (limited to 'base_accounting_kit/models/multiple_invoice.py')
| -rw-r--r-- | base_accounting_kit/models/multiple_invoice.py | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/base_accounting_kit/models/multiple_invoice.py b/base_accounting_kit/models/multiple_invoice.py new file mode 100644 index 0000000..e1c99b1 --- /dev/null +++ b/base_accounting_kit/models/multiple_invoice.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +from odoo import fields, models + + +class MultipleInvoice(models.Model): + """Multiple Invoice Model""" + _name = "multiple.invoice" + _order = "sequence" + + sequence = fields.Integer('Sequence No') + + copy_name = fields.Char('Invoice Copy Name') + + journal_id = fields.Many2one('account.journal', string="Journal") + + +class AccountJournal(models.Model): + """Inheriting Account Journal Model""" + _inherit = "account.journal" + + multiple_invoice_ids = fields.One2many('multiple.invoice', 'journal_id', + string='Multiple Invoice') + + multiple_invoice_type = fields.Selection( + [('text', 'Text'), ('watermark', 'Watermark')], required=True, + default='text', string="Display Type") + + text_position = fields.Selection([ + ('header', 'Header'), + ('footer', 'Footer'), + ('body', 'Document Body') + ], required=True, default='header') + + body_text_position = fields.Selection([ + ('tl', 'Top Left'), + ('tr', 'Top Right'), + ('bl', 'Bottom Left'), + ('br', 'Bottom Right'), + + ], default='tl') + + text_align = fields.Selection([ + ('right', 'Right'), + ('left', 'Left'), + ('center', 'Center'), + + ], default='right') + + layout = fields.Char(related="company_id.external_report_layout_id.key") |
