Repository
OCA/l10n-switzerland · module folder · Try on Runboat
Module version
3.3.0
Category
Localization
Folder size
5.06 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/l10n-switzerland
Last tracking update
2026-08-07 07:32:01
Authors
Camptocamp, Odoo Community Association (OCA)
Maintainers
Camptocamp, Odoo Community Association (OCA)
Committers
Yannick Vaucher, GitHub, Akim Juillerat, Iryna Vyshnevska, Weblate, OCA Transbot, OCA-git-bot, oca-travis, Iryna Vushnevska
Odoo dependencies
Python dependencies
PyPDF2
System dependencies
None
Required by
l10n_ch_invoice_with_payment
Description

Code Analysis

Views touched (7)
XML IDNameModelTypeStatus
assets_backend assets_backend ir.ui.view qweb Inherits web.assets_backend
invoice_form_add_isr_ref account.invoice.form.isr.ref account.invoice form Inherits l10n_ch.isr_invoice_form
isr_batch_print_view ISR Batch Print Wizard isr.batch.print.wizard form New
l10n_ch_view_res_partner_bank_from_invoice_slip res.partner_bank.form.l10n_ch res.partner.bank form Inherits base.view_partner_bank_form
pay_slip_form pay slip form l10n_ch.payment_slip form New
pay_slip_lsit pay slip lsit l10n_ch.payment_slip tree New
res_config_settings_view_form res.config.settings.view.form.inherit.payment_slip res.config.settings form Inherits account.res_config_settings_view_form
HTTP endpoints (1)
Route(s)HandlerAuthTypeMethodsFlags
(inherited route override) ReportController.report_routes inherited http ALL
Models touched (9)

New fields (4)
  • isr_reference Text
    compute='_compute_full_isr_name' oldname='bvr_reference' store=True string='ISR ref'
  • partner_bank_id Many2one → res.partner.bank
    help='The partner bank account to pay\nKeep empty to use the default' args: 'res.partner.bank', 'Bank Account'
  • reference Char
    copy=False
  • slip_ids One2many → l10n_ch.payment_slip
    comodel_name='l10n_ch.payment_slip' inverse_name='invoice_id' string='Related slip'
Public methods (4)
  • action_invoice_draft(self)
    @api.multi
  • get_payment_move_line(self)
    Return the move line related to current invoice slips :return: recordset of `account.move.line` :rtype: :py:class:`openerp.model.Models`
  • invoice_validate(self)
    @api.multi
    Copy the ISR reference in the transaction_ref of move lines. For customers invoices: the ISR reference is computed using ``get_isr_ref()`` on the invoice or move lines. For suppliers invoices: the ISR reference is stored in the reference field of the invoice.
  • print_isr(self)
    @api.multi

New fields (2)
  • invoice_id Many2one → account.invoice
    index=True oldname='invoice' args: 'account.invoice'
  • payment_slip_ids One2many → l10n_ch.payment_slip
    comodel_name='l10n_ch.payment_slip' inverse_name='move_line_id' readonly=True string='Payment Slips'
Public methods (0)

No public methods.

New fields (1)
  • report_type Selection
    selection_add=[('reportlab-pdf', 'Report renderer')]
Public methods (3)
  • merge_pdf_in_memory(self, docs)
  • merge_pdf_on_disk(self, docs)
  • render_reportlab_pdf(self, res_ids=None, data=None)
    @api.multi

New fields (2)
  • error_message Text
    readonly=True args: 'Errors'
  • invoice_ids Many2many → account.invoice
    comodel_name='account.invoice' string='Invoices'
Public methods (3)
  • check_generatable(self, invoices)
    @api.model
  • default_get(self, fields)
    @api.model
  • print_payment_slips(self)
    @api.multi

New fields (7)
  • a4_pdf Binary
    compute='_compute_a4_report' readonly=True args: 'Slip A4 PDF'
  • amount_total Float
    compute='_compute_amount' args: 'Total amount of ISR'
  • invoice_id Many2one → account.invoice
    comodel_name='account.invoice' readonly=True related='move_line_id.invoice_id' store=True string='Related invoice'
  • move_line_id Many2one → account.move.line
    ondelete='cascade' readonly=True string='Related move' args: 'account.move.line'
  • reference Char
    compute='_compute_ref' index=True store=True args: 'ISR Ref.'
  • scan_line Char
    compute='_compute_scan_line' readonly=True args: 'Scan Line'
  • slip_image Binary
    compute='_compute_payment_slip_image' readonly=True args: 'Slip Image'
Public methods (5)
  • create_slip_from_move_line(self, move_line)
    @api.model
    Generate `l10n_ch.payment_slip` from `account.move.line` recordset :param move_lines: Record of `account.move.line` :type move_line: :py:class:`openerp.models.Model` :return: Recordset of `l10n_ch.payment_slip` :rtype: :py:class:`openerp.models.Model`
  • font_absolute_path(self)
    @api.model
    Will get the ocrb font absolute path :return: path to the font
  • get_comm_partner(self)
    Determine wich partner should be display on the payment slip :return: corresponding `res.partner` record :rtype: :py:class:`openerp.models.Model`
  • get_slip_for_move_line(self, move_line)
    @api.model
    Return pyment slip related to move :param move: `account.move.line` record :type move: :py:class:`openerp.models.Model` :return: payment slip recordset related to move line :rtype: :py:class:`openerp.models.Model`
  • image_absolute_path(self, file_name)
    @api.model
    Will get image absolute path :param file_name: name of image :return: image path :rtype: str

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (13)
  • isr_add_horz Float
    help='Horiz. position in inch for address' oldname='bvr_add_horz' args: 'ISR horiz. position address (inch)'
  • isr_add_vert Float
    help='Vert. position in inch for address' oldname='bvr_add_vert' args: 'ISR vert. position for address (inch)'
  • isr_amount_line_horz Float
    default=0.0 help='Horiz. position in inch for amount line' oldname='bvr_amount_line_horz' args: 'ISR horiz. position for amount line (inch)'
  • isr_amount_line_vert Float
    default=0.0 help='Vert. position in inch for amount line' oldname='bvr_amount_line_vert' args: 'ISR vert. position for amount line (inch)'
  • isr_background Boolean
    oldname='bvr_background' args: 'Insert ISR background ?'
  • isr_delta_horz Float
    help='horiz. delta in inch 1.2 will print the ISR 1.2 inch on the left, negative value is possible' oldname='bvr_delta_horz' args: 'ISR Horz. Delta (inch)'
  • isr_delta_vert Float
    help='vert. delta in inch 1.2 will print the ISR 1.2 inch lower, negative value is possible' oldname='bvr_delta_vert' args: 'ISR Vert. Delta (inch)'
  • isr_header_partner_address Boolean
    default=False help='Enabling this will print partner address top-right on the page header' oldname='bvr_header_partner_address' args: 'Header partner address'
  • isr_scan_line_font_size Integer
    oldname='bvr_scan_line_font_size' args: 'ISR scan line font size (pt)'
  • isr_scan_line_horz Float
    help='Horiz. position in inch for scan line' oldname='bvr_scan_line_horz' args: 'ISR horiz. position for scan line(inch)'
  • isr_scan_line_letter_spacing Float
    oldname='bvr_scan_line_letter_spacing' args: 'ISR scan line letter spacing'
  • isr_scan_line_vert Float
    help='Vert. position in inch for scan line' oldname='bvr_scan_line_vert' args: 'ISR vert. position for scan line (inch)'
  • merge_mode Selection
    default='in_memory' required=True string='Payment Slips Merge Mode' args: [('in_memory', 'Merge Slips in Memory, faster but can exhaust memory'), ('on_disk', 'Merge Slips on Disk, slower but safer')]
Public methods (0)

No public methods.

New fields (13)
  • isr_add_horz Float
    readonly=False related='company_id.isr_add_horz'
  • isr_add_vert Float
    readonly=False related='company_id.isr_add_vert'
  • isr_amount_line_horz Float
    readonly=False related='company_id.isr_amount_line_horz'
  • isr_amount_line_vert Float
    readonly=False related='company_id.isr_amount_line_vert'
  • isr_background Boolean
    readonly=False related='company_id.isr_background'
  • isr_delta_horz Float
    readonly=False related='company_id.isr_delta_horz'
  • isr_delta_vert Float
    readonly=False related='company_id.isr_delta_vert'
  • isr_header_partner_address Boolean
    readonly=False related='company_id.isr_header_partner_address'
  • isr_scan_line_font_size Integer
    readonly=False related='company_id.isr_scan_line_font_size'
  • isr_scan_line_horz Float
    readonly=False related='company_id.isr_scan_line_horz'
  • isr_scan_line_letter_spacing Float
    readonly=False related='company_id.isr_scan_line_letter_spacing'
  • isr_scan_line_vert Float
    readonly=False related='company_id.isr_scan_line_vert'
  • merge_mode Selection
    readonly=False related='company_id.merge_mode'
Public methods (0)

No public methods.

New fields (4)
  • l10n_ch_isrb_id_number Char
    help='ISR-B Customer ID number for ISR. Used only when generating ISR reference through a bank. This will prefix your references. It is not necessary for standard ISR from Postfinance. e.g. 999999' args: 'ISR-B Internal ID'
  • print_account Boolean
    args: 'Print Account Number on ISR'
  • print_bank Boolean
    args: 'Print Bank on ISR'
  • print_partner Boolean
    args: 'Print Partner Address on ISR'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…