diff options
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") |
