eBill Postfinance

ebill_postfinance
REPOSITORY
REPOSITORYOCA/l10n-switzerland
GIT
GIThttps://github.com/OCA/l10n-switzerland.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-switzerland/tree/18.0/ebill_postfinance
VERSION
VERSION 1.2.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSGitHub, Akim Juillerat, Thierry Ducrest, OCA-git-bot, Simone Orsi, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-switzerland
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:20
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-invoicing:
    - account_invoice_transmit_method
OCA/edi:
    - account_invoice_export
    - base_ebill_payment_contract
OCA/server-tools:
    - base_view_inheritance_extension
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - html_editor
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - l10n_ch
    - base_iban
    - l10n_din5008
    - sale
    - sales_team
    - account_payment
    - payment
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES ebilling_postfinance
zeep
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module implements the exchange of electronic invoices with the
Postfinance web service.

Code Analysis

Views touched (8)
XML IDNameModelTypeStatus
ebill_payment_contract_form_view ebill.payment.contract.form (in ebill_postfinance) ebill.payment.contract group Inherits base_ebill_payment_contract.ebill_payment_contract_form_view
ebill_postfinance_invoice_message_form_view ebill.postfinance.invoice.message.form ebill.postfinance.invoice.message form New
ebill_postfinance_invoice_message_search_view ebill.postfinance.invoice.message.search ebill.postfinance.invoice.message search New
ebill_postfinance_invoice_message_tree_view ebill.postfinance.invoice.message.list ebill.postfinance.invoice.message list New
postfinance_service_form_view postfinance.service.form ebill.postfinance.service form New
postfinance_service_search_view postfinance.service.search ebill.postfinance.service search New
postfinance_service_tree_view postfinance.service.list ebill.postfinance.service list New
rejected_invoice rejected_invoice ir.ui.view qweb New
Models touched (6)

New fields (0)

No new fields.

Public methods (5)
  • create_postfinance_ebill(self)
    Generate the message record for an invoice.
  • get_postfinance_other_reference(self)
    Allows glue module to insert <OTHER-REFERENCE> in the <HEADER> Add to the list ref, object strucutred like this: {'type': other reference allowed types, 'no': the content of <Reference-No> desired }
  • log_invoice_accepted_by_system(self)
  • log_invoice_refused_by_system(self)
  • postfinance_invoice_line_ids(self)
    Filter invoice line to be included in XML message. Invoicing line that are UX based (notes, sections) are removed.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (5)
  • is_postfinance_contract Boolean
    compute='_compute_is_postfinance_contract' store=False
  • is_postfinance_method_on_partner Boolean
    compute='_compute_is_postfinance_method_on_partner'
  • payment_type Selection
    default='qr' help='Payment type to use for the invoices sent, PDF will be generated and attached accordingly.' selection=[('qr', 'QR')] string='Payment method'
  • postfinance_billerid Char
    help='The PayerID of the customer' size=20 string='Contract ID'
  • postfinance_service_id Many2one → ebill.postfinance.service
    comodel_name='ebill.postfinance.service' ondelete='restrict' string='Service'
Public methods (1)
  • set_postfinance_method_on_partner(self)

New fields (17)
  • attachment_id Many2one → ir.attachment
    args: 'ir.attachment', 'PDF'
  • ebill_account_number Char
    size=20 args: 'Payer Id'
  • ebill_payment_contract_id Many2one → ebill.payment.contract
    comodel_name='ebill.payment.contract'
  • file_type_used Char
  • invoice_id Many2one → account.move
    comodel_name='account.move' ondelete='restrict'
  • payload Text
    args: 'Payload sent'
  • payload_size Float
    digits=(6, 3) readonly=True args: 'Payload Size (MB)'
  • payment_type Selection
    default='iban' readonly=True selection=[('iban', 'IBAN'), ('credit', 'CREDIT'), ('other', 'OTHER'), ('dd', 'DD'), ('esr', 'ESR')]
  • ref Char
    size=35 args: 'Reference No.'
  • response Text
  • server_reason_code Integer
    string='Error code'
  • server_reason_text Char
    string='Error text'
  • server_state Selection
    selection=[('invalid', 'Invalid'), ('processing', 'Processing'), ('unsigned', 'Unsigned'), ('open', 'Open'), ('paid', 'Paid'), ('rejected', 'Rejected'), ('incomplete', 'Incomplete'), ('deleted', 'Deleted')]
  • service_id Many2one → ebill.postfinance.service
    comodel_name='ebill.postfinance.service' ondelete='restrict' readonly=True required=True string='Service used'
  • state Selection
    default='draft' selection=[('draft', 'Draft'), ('sent', 'Sent'), ('error', 'Error'), ('processing', 'Processing'), ('reject', 'Reject'), ('done', 'Done')]
  • submitted_on Datetime
    string='Submitted on'
  • transaction_id Char
Public methods (8)
  • format_date(date_string=None)
    @staticmethod
    Format a date in the Jinja template.
  • format_date_yb(date_string=None)
    @staticmethod
    Format a date in the Jinja template.
  • send_to_postfinance(self)
  • set_as_paid(self, data)
  • set_transaction_id(self)
  • update_invoice_status(self)
    Update the export status in the chatter.
  • update_message_from_server_data(self, data)
    Update the invoice message with data received from the server. Keyword arguments: data -- Structure from the api Example: { 'BillerId': '41101000001021209', 'TransactionId': 'INV_2022_03_0001_2022_03_26_08_31_xml', 'eBillAccountId': '123412341234', 'Amount': Decimal('0'), 'State': 'Invalid', 'PaymentType': None, 'ESRReferenceNbr': None, 'DeliveryDate': datetime.datetime(2022, 3, 26, 0, 0), 'PaymentDueDate': None, 'ReasonCode': '16', 'ReasonText': 'some good reason' }
  • validate_xml_payload(self)
    Check the validity of yellowbill xml.

New fields (13)
  • active Boolean
    default=True
  • biller_id Char
    required=True size=17 string='Biller ID'
  • ebill_payment_contract_ids One2many → ebill.payment.contract
    comodel_name='ebill.payment.contract' inverse_name='postfinance_service_id' readonly=True string='Contracts'
  • file_type_to_use Selection
    default='XML' required=True selection=[('XML', 'XML Yellow Bill'), ('EAI.XML', 'Custom XML (SAPiDoc)'), ('struct.pdf', 'Factur X')] string='Invoice Format'
  • invoice_message_ids One2many → ebill.postfinance.invoice.message
    comodel_name='ebill.postfinance.invoice.message' inverse_name='service_id' readonly=True string='Invoice Messages'
  • name Char
    required=True
  • operation_timeout Integer
    default='600' help='Timeout for each HTTP (GET, POST) request in seconds.' string='HTTP Timeout'
  • partner_bank_id Many2one → res.partner.bank
    comodel_name='res.partner.bank' ondelete='restrict' string='Bank account'
  • password Char
  • use_file_type_xml_paynet Boolean
    help='Enable use of legacy SIX/Paynet invoice format.' string='Use Paynet/SIX format'
  • use_test_service Boolean
    help='Target the test service' string='Testing'
  • username Char
  • xml_file_language Many2one → res.lang
    comodel_name='res.lang' help='The language used to generate the XML file, if unset default to the customer language.' string='XML file Language'
Public methods (10)
  • cron_update_invoices(self)
    @api.model
  • get_ebill_recipient_subscription_status(self, recipient_id)
  • get_invoice_list(self, archive_data=False)
  • get_process_protocol_list(self, archive_data=False)
  • get_registration_protocol(self, create_date, archive_data=False)
  • get_registration_protocol_list(self, archive_data=False)
  • ping_service(self, test_error=False, test_exception=False)
    Ping the service, uses the authentication. test_error: will create an unhandled error in the repsonse test_exception: will create a FaultException
  • search_invoice(self, transaction_id=None)
    Get invoice status from the server. transaction_id:
  • test_ping(self)
    Test the service from the UI.
  • upload_file(self, transaction_id, file_type, data)

New fields (1)
  • postfinance_ebill_client_order_ref Char
    compute='_compute_postfinance_ebill_client_order_ref'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/l10n-switzerland
GIT
GIThttps://github.com/OCA/l10n-switzerland.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-switzerland/tree/17.0/ebill_postfinance
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSThierry Ducrest, OCA-git-bot, oca-ci, Vincent Van Rossem
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-switzerland
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:11
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-invoicing:
    - account_invoice_transmit_method
OCA/edi:
    - account_invoice_export
    - base_ebill_payment_contract
OCA/server-tools:
    - base_view_inheritance_extension
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - l10n_ch
    - base_iban
    - l10n_din5008
    - sale
    - sales_team
    - account_payment
    - payment
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES ebilling_postfinance
zeep
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module implements the exchange of electronic invoices with the
Postfinance web service.

Code Analysis

Views touched (8)
XML IDNameModelTypeStatus
ebill_payment_contract_form_view ebill.payment.contract.form (in ebill_postfinance) ebill.payment.contract group Inherits base_ebill_payment_contract.ebill_payment_contract_form_view
ebill_postfinance_invoice_message_form_view ebill.postfinance.invoice.message.form ebill.postfinance.invoice.message form New
ebill_postfinance_invoice_message_search_view ebill.postfinance.invoice.message.search ebill.postfinance.invoice.message search New
ebill_postfinance_invoice_message_tree_view ebill.postfinance.invoice.message.tree ebill.postfinance.invoice.message tree New
postfinance_service_form_view postfinance.service.form ebill.postfinance.service form New
postfinance_service_search_view postfinance.service.search ebill.postfinance.service search New
postfinance_service_tree_view postfinance.service.tree ebill.postfinance.service tree New
rejected_invoice rejected_invoice ir.ui.view qweb New
Models touched (5)

New fields (0)

No new fields.

Public methods (5)
  • create_postfinance_ebill(self)
    Generate the message record for an invoice.
  • get_postfinance_other_reference(self)
    Allows glue module to insert <OTHER-REFERENCE> in the <HEADER> Add to the list ref, object strucutred like this: {'type': other reference allowed types, 'no': the content of <Reference-No> desired }
  • log_invoice_accepted_by_system(self)
  • log_invoice_refused_by_system(self)
  • postfinance_invoice_line_ids(self)
    Filter invoice line to be included in XML message. Invoicing line that are UX based (notes, sections) are removed.

New fields (5)
  • is_postfinance_contract Boolean
    compute='_compute_is_postfinance_contract' store=False
  • is_postfinance_method_on_partner Boolean
    compute='_compute_is_postfinance_method_on_partner'
  • payment_type Selection
    default='qr' help='Payment type to use for the invoices sent, PDF will be generated and attached accordingly.' selection=[('qr', 'QR')] string='Payment method'
  • postfinance_billerid Char
    help='The PayerID of the customer' size=20 string='Contract ID'
  • postfinance_service_id Many2one → ebill.postfinance.service
    comodel_name='ebill.postfinance.service' ondelete='restrict' string='Service'
Public methods (1)
  • set_postfinance_method_on_partner(self)

New fields (17)
  • attachment_id Many2one → ir.attachment
    args: 'ir.attachment', 'PDF'
  • ebill_account_number Char
    size=20 args: 'Payer Id'
  • ebill_payment_contract_id Many2one → ebill.payment.contract
    comodel_name='ebill.payment.contract'
  • file_type_used Char
  • invoice_id Many2one → account.move
    comodel_name='account.move' ondelete='restrict'
  • payload Text
    args: 'Payload sent'
  • payload_size Float
    digits=(6, 3) readonly=True args: 'Payload Size (MB)'
  • payment_type Selection
    default='iban' readonly=True selection=[('iban', 'IBAN'), ('credit', 'CREDIT'), ('other', 'OTHER'), ('dd', 'DD'), ('esr', 'ESR')]
  • ref Char
    size=35 args: 'Reference No.'
  • response Text
  • server_reason_code Integer
    string='Error code'
  • server_reason_text Char
    string='Error text'
  • server_state Selection
    selection=[('invalid', 'Invalid'), ('processing', 'Processing'), ('unsigned', 'Unsigned'), ('open', 'Open'), ('paid', 'Paid'), ('rejected', 'Rejected'), ('incomplete', 'Incomplete'), ('deleted', 'Deleted')]
  • service_id Many2one → ebill.postfinance.service
    comodel_name='ebill.postfinance.service' ondelete='restrict' readonly=True required=True string='Service used'
  • state Selection
    default='draft' selection=[('draft', 'Draft'), ('sent', 'Sent'), ('error', 'Error'), ('processing', 'Processing'), ('reject', 'Reject'), ('done', 'Done')]
  • submitted_on Datetime
    string='Submitted on'
  • transaction_id Char
Public methods (8)
  • format_date(date_string=None)
    @staticmethod
    Format a date in the Jinja template.
  • format_date_yb(date_string=None)
    @staticmethod
    Format a date in the Jinja template.
  • send_to_postfinance(self)
  • set_as_paid(self, data)
  • set_transaction_id(self)
  • update_invoice_status(self)
    Update the export status in the chatter.
  • update_message_from_server_data(self, data)
    Update the invoice message with data received from the server. Keyword arguments: data -- Structure from the api Example: { 'BillerId': '41101000001021209', 'TransactionId': 'INV_2022_03_0001_2022_03_26_08_31_xml', 'eBillAccountId': '123412341234', 'Amount': Decimal('0'), 'State': 'Invalid', 'PaymentType': None, 'ESRReferenceNbr': None, 'DeliveryDate': datetime.datetime(2022, 3, 26, 0, 0), 'PaymentDueDate': None, 'ReasonCode': '16', 'ReasonText': 'some good reason' }
  • validate_xml_payload(self)
    Check the validity of yellowbill xml.

New fields (12)
  • active Boolean
    default=True
  • biller_id Char
    required=True size=17 string='Biller ID'
  • ebill_payment_contract_ids One2many → ebill.payment.contract
    comodel_name='ebill.payment.contract' inverse_name='postfinance_service_id' readonly=True string='Contracts'
  • file_type_to_use Selection
    default='XML' required=True selection=[('XML', 'XML Yellow Bill'), ('EAI.XML', 'Custom XML (SAPiDoc)'), ('struct.pdf', 'Factur X')] string='Invoice Format'
  • invoice_message_ids One2many → ebill.postfinance.invoice.message
    comodel_name='ebill.postfinance.invoice.message' inverse_name='service_id' readonly=True string='Invoice Messages'
  • name Char
    required=True
  • operation_timeout Integer
    default='600' help='Timeout for each HTTP (GET, POST) request in seconds.' string='HTTP Timeout'
  • partner_bank_id Many2one → res.partner.bank
    comodel_name='res.partner.bank' ondelete='restrict' string='Bank account'
  • password Char
  • use_file_type_xml_paynet Boolean
    help='Enable use of legacy SIX/Paynet invoice format.' string='Use Paynet/SIX format'
  • use_test_service Boolean
    help='Target the test service' string='Testing'
  • username Char
Public methods (10)
  • cron_update_invoices(self)
    @api.model
  • get_ebill_recipient_subscription_status(self, recipient_id)
  • get_invoice_list(self, archive_data=False)
  • get_process_protocol_list(self, archive_data=False)
  • get_registration_protocol(self, create_date, archive_data=False)
  • get_registration_protocol_list(self, archive_data=False)
  • ping_service(self, test_error=False, test_exception=False)
    Ping the service, uses the authentication. test_error: will create an unhandled error in the repsonse test_exception: will create a FaultException
  • search_invoice(self, transaction_id=None)
    Get invoice status from the server. transaction_id:
  • test_ping(self)
    Test the service from the UI.
  • upload_file(self, transaction_id, file_type, data)

New fields (1)
  • postfinance_ebill_client_order_ref Char
    compute='_compute_postfinance_ebill_client_order_ref'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/l10n-switzerland
GIT
GIThttps://github.com/OCA/l10n-switzerland.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-switzerland/tree/16.0/ebill_postfinance
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSGitHub, Akim Juillerat, Florent Xicluna, Thierry Ducrest, OCA-git-bot, oca-ci, Julien Guenat, Jens Vogler
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-switzerland
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:54:00
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-invoicing:
    - account_invoice_transmit_method
OCA/edi:
    - account_invoice_export
    - base_ebill_payment_contract
OCA/server-tools:
    - base_view_inheritance_extension
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - l10n_ch
    - l10n_multilang
    - base_iban
    - l10n_din5008
    - sale
    - sales_team
    - account_payment
    - payment
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES ebilling_postfinance
zeep
astor
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (8)
XML IDNameModelTypeStatus
ebill_payment_contract_form_view ebill.payment.contract.form (in ebill_postfinance) ebill.payment.contract group Inherits base_ebill_payment_contract.ebill_payment_contract_form_view
ebill_postfinance_invoice_message_form_view ebill.postfinance.invoice.message.form ebill.postfinance.invoice.message form New
ebill_postfinance_invoice_message_search_view ebill.postfinance.invoice.message.search ebill.postfinance.invoice.message search New
ebill_postfinance_invoice_message_tree_view ebill.postfinance.invoice.message.tree ebill.postfinance.invoice.message tree New
postfinance_service_form_view postfinance.service.form ebill.postfinance.service form New
postfinance_service_search_view postfinance.service.search ebill.postfinance.service search New
postfinance_service_tree_view postfinance.service.tree ebill.postfinance.service tree New
rejected_invoice rejected_invoice ir.ui.view qweb New
Models touched (5)

New fields (0)

No new fields.

Public methods (5)
  • create_postfinance_ebill(self)
    Generate the message record for an invoice.
  • get_postfinance_other_reference(self)
    Allows glue module to insert <OTHER-REFERENCE> in the <HEADER> Add to the list ref, object strucutred like this: {'type': other reference allowed types, 'no': the content of <Reference-No> desired }
  • log_invoice_accepted_by_system(self)
  • log_invoice_refused_by_system(self)
  • postfinance_invoice_line_ids(self)
    Filter invoice line to be included in XML message. Invoicing line that are UX based (notes, sections) are removed.

New fields (5)
  • is_postfinance_contract Boolean
    compute='_compute_is_postfinance_contract' store=False
  • is_postfinance_method_on_partner Boolean
    compute='_compute_is_postfinance_method_on_partner'
  • payment_type Selection
    default='qr' help='Payment type to use for the invoices sent, PDF will be generated and attached accordingly.' selection=[('qr', 'QR'), ('isr', 'ISR')] string='Payment method'
  • postfinance_billerid Char
    help='The PayerID of the customer' size=20 string='Contract ID'
  • postfinance_service_id Many2one → ebill.postfinance.service
    comodel_name='ebill.postfinance.service' ondelete='restrict' string='Service'
Public methods (1)
  • set_postfinance_method_on_partner(self)

New fields (17)
  • attachment_id Many2one → ir.attachment
    args: 'ir.attachment', 'PDF'
  • ebill_account_number Char
    size=20 args: 'Payer Id'
  • ebill_payment_contract_id Many2one → ebill.payment.contract
    comodel_name='ebill.payment.contract'
  • file_type_used Char
  • invoice_id Many2one → account.move
    comodel_name='account.move' ondelete='restrict'
  • payload Text
    args: 'Payload sent'
  • payload_size Float
    digits=(6, 3) readonly=True args: 'Payload Size (MB)'
  • payment_type Selection
    default='iban' readonly=True selection=[('iban', 'IBAN'), ('credit', 'CREDIT'), ('other', 'OTHER'), ('dd', 'DD'), ('esr', 'ESR')]
  • ref Char
    size=35 args: 'Reference No.'
  • response Text
  • server_reason_code Integer
    string='Error code'
  • server_reason_text Char
    string='Error text'
  • server_state Selection
    selection=[('invalid', 'Invalid'), ('processing', 'Processing'), ('unsigned', 'Unsigned'), ('open', 'Open'), ('paid', 'Paid'), ('rejected', 'Rejected'), ('incomplete', 'Incomplete'), ('deleted', 'Deleted')]
  • service_id Many2one → ebill.postfinance.service
    comodel_name='ebill.postfinance.service' ondelete='restrict' readonly=True required=True string='Service used'
  • state Selection
    default='draft' selection=[('draft', 'Draft'), ('sent', 'Sent'), ('error', 'Error'), ('processing', 'Processing'), ('reject', 'Reject'), ('done', 'Done')]
  • submitted_on Datetime
    string='Submitted on'
  • transaction_id Char
Public methods (8)
  • format_date(date_string=None)
    @staticmethod
    Format a date in the Jinja template.
  • format_date_yb(date_string=None)
    @staticmethod
    Format a date in the Jinja template.
  • send_to_postfinance(self)
  • set_as_paid(self, data)
  • set_transaction_id(self)
  • update_invoice_status(self)
    Update the export status in the chatter.
  • update_message_from_server_data(self, data)
    Update the invoice message with data received from the server. Keyword arguments: data -- Structure from the api Example: { 'BillerId': '41101000001021209', 'TransactionId': 'INV_2022_03_0001_2022_03_26_08_31_xml', 'eBillAccountId': '123412341234', 'Amount': Decimal('0'), 'State': 'Invalid', 'PaymentType': None, 'ESRReferenceNbr': None, 'DeliveryDate': datetime.datetime(2022, 3, 26, 0, 0), 'PaymentDueDate': None, 'ReasonCode': '16', 'ReasonText': 'some good reason' }
  • validate_xml_payload(self)
    Check the validity of yellowbill xml.

New fields (12)
  • active Boolean
    default=True
  • biller_id Char
    required=True size=17 string='Biller ID'
  • ebill_payment_contract_ids One2many → ebill.payment.contract
    comodel_name='ebill.payment.contract' inverse_name='postfinance_service_id' readonly=True string='Contracts'
  • file_type_to_use Selection
    default='XML' required=True selection=[('XML', 'XML Yellow Bill'), ('EAI.XML', 'Custom XML (SAPiDoc)'), ('struct.pdf', 'Factur X')] string='Invoice Format'
  • invoice_message_ids One2many → ebill.postfinance.invoice.message
    comodel_name='ebill.postfinance.invoice.message' inverse_name='service_id' readonly=True string='Invoice Messages'
  • name Char
    required=True
  • operation_timeout Integer
    default='600' help='Timeout for each HTTP (GET, POST) request in seconds.' string='HTTP Timeout'
  • partner_bank_id Many2one → res.partner.bank
    comodel_name='res.partner.bank' ondelete='restrict' string='Bank account'
  • password Char
  • use_file_type_xml_paynet Boolean
    help='Enable use of legacy SIX/Paynet invoice format.' string='Use Paynet/SIX format'
  • use_test_service Boolean
    help='Target the test service' string='Testing'
  • username Char
Public methods (10)
  • cron_update_invoices(self)
    @api.model
  • get_ebill_recipient_subscription_status(self, recipient_id)
  • get_invoice_list(self, archive_data=False)
  • get_process_protocol_list(self, archive_data=False)
  • get_registration_protocol(self, create_date, archive_data=False)
  • get_registration_protocol_list(self, archive_data=False)
  • ping_service(self, test_error=False, test_exception=False)
    Ping the service, uses the authentication. test_error: will create an unhandled error in the repsonse test_exception: will create a FaultException
  • search_invoice(self, transaction_id=None)
    Get invoice status from the server. transaction_id:
  • test_ping(self)
    Test the service from the UI.
  • upload_file(self, transaction_id, file_type, data)

New fields (1)
  • postfinance_ebill_client_order_ref Char
    compute='_compute_postfinance_ebill_client_order_ref'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/l10n-switzerland
GIT
GIThttps://github.com/OCA/l10n-switzerland.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-switzerland/tree/14.0/ebill_postfinance
VERSION
VERSION 1.1.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSThierry Ducrest, oca-travis, OCA-git-bot
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-switzerland
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:41:13
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-invoicing:
    - account_invoice_transmit_method
OCA/edi:
    - account_invoice_export
    - base_ebill_payment_contract
OCA/l10n-switzerland:
    - l10n_ch_base_bank
OCA/queue:
    - queue_job
OCA/server-tools:
    - base_view_inheritance_extension
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - base_sparse_field
    - base_iban
    - l10n_ch
    - l10n_multilang
    - l10n_ch_qriban
    - sale
    - sales_team
    - payment
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES ebilling_postfinance
zeep
astor
requests
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (8)
XML IDNameModelTypeStatus
ebill_payment_contract_form_view ebill.payment.contract.form (in ebill_postfinance) ebill.payment.contract group Inherits base_ebill_payment_contract.ebill_payment_contract_form_view
ebill_postfinance_invoice_message_form_view ebill.postfinance.invoice.message.form ebill.postfinance.invoice.message form New
ebill_postfinance_invoice_message_search_view ebill.postfinance.invoice.message.search ebill.postfinance.invoice.message search New
ebill_postfinance_invoice_message_tree_view ebill.postfinance.invoice.message.tree ebill.postfinance.invoice.message tree New
postfinance_service_form_view postfinance.service.form ebill.postfinance.service form New
postfinance_service_search_view postfinance.service.search ebill.postfinance.service search New
postfinance_service_tree_view postfinance.service.tree ebill.postfinance.service tree New
rejected_invoice rejected_invoice ir.ui.view qweb New
Models touched (5)

New fields (0)

No new fields.

Public methods (5)
  • create_postfinance_ebill(self)
    Generate the message record for an invoice.
  • get_postfinance_other_reference(self)
    Allows glue module to insert <OTHER-REFERENCE> in the <HEADER> Add to the list ref, object strucutred like this: {'type': other reference allowed types, 'no': the content of <Reference-No> desired }
  • log_invoice_accepted_by_system(self)
  • log_invoice_refused_by_system(self)
  • postfinance_invoice_line_ids(self)
    Filter invoice line to be included in XML message. Invoicing line that are UX based (notes, sections) are removed.

New fields (5)
  • is_postfinance_contract Boolean
    compute='_compute_is_postfinance_contract' store=False
  • is_postfinance_method_on_partner Boolean
    compute='_compute_is_postfinance_method_on_partner'
  • payment_type Selection
    default='qr' help='Payment type to use for the invoices sent, PDF will be generated and attached accordingly.' selection=[('qr', 'QR'), ('isr', 'ISR')] string='Payment method'
  • postfinance_billerid Char
    size=20 string='Biller ID'
  • postfinance_service_id Many2one → ebill.postfinance.service
    comodel_name='ebill.postfinance.service' ondelete='restrict' string='Service'
Public methods (1)
  • set_postfinance_method_on_partner(self)

New fields (17)
  • attachment_id Many2one → ir.attachment
    args: 'ir.attachment', 'PDF'
  • ebill_account_number Char
    size=20 args: 'Paynet Id'
  • ebill_payment_contract_id Many2one → ebill.payment.contract
    comodel_name='ebill.payment.contract'
  • file_type_used Char
  • invoice_id Many2one → account.move
    comodel_name='account.move' ondelete='restrict'
  • payload Text
    args: 'Payload sent'
  • payload_size Float
    compute='_compute_payload_size' digits=(6, 3) args: 'Payload Size (MB)'
  • payment_type Selection
    default='iban' readonly=True selection=[('iban', 'IBAN'), ('credit', 'CREDIT'), ('other', 'OTHER'), ('dd', 'DD'), ('esr', 'ESR')]
  • ref Char
    size=35 args: 'Reference No.'
  • response Text
    args: 'Response'
  • server_reason_code Integer
    string='Error code'
  • server_reason_text Char
    string='Error text'
  • server_state Selection
    selection=[('invalid', 'Invalid'), ('processing', 'Processing'), ('unsigned', 'Unsigned'), ('open', 'Open'), ('paid', 'Paid'), ('rejected', 'Rejected'), ('incomplete', 'Incomplete'), ('deleted', 'Deleted')]
  • service_id Many2one → ebill.postfinance.service
    comodel_name='ebill.postfinance.service' ondelete='restrict' readonly=True required=True string='Service used'
  • state Selection
    default='draft' selection=[('draft', 'Draft'), ('sent', 'Sent'), ('error', 'Error'), ('processing', 'Processing'), ('reject', 'Reject'), ('done', 'Done')]
  • submitted_on Datetime
    string='Submitted on'
  • transaction_id Char
    string='Transaction Id'
Public methods (8)
  • format_date(date_string=None)
    @staticmethod
    Format a date in the Jinja template.
  • format_date_yb(date_string=None)
    @staticmethod
    Format a date in the Jinja template.
  • send_to_postfinance(self)
  • set_as_paid(self, data)
  • set_transaction_id(self)
  • update_invoice_status(self)
    Update the export status in the chatter.
  • update_message_from_server_data(self, data)
    Update the invoice message with data received from the server. Keyword arguments: data -- Structure from the api Example: { 'BillerId': '41101000001021209', 'TransactionId': 'INV_2022_03_0001_2022_03_26_08_31_xml', 'eBillAccountId': '123412341234', 'Amount': Decimal('0'), 'State': 'Invalid', 'PaymentType': None, 'ESRReferenceNbr': None, 'DeliveryDate': datetime.datetime(2022, 3, 26, 0, 0), 'PaymentDueDate': None, 'ReasonCode': '16', 'ReasonText': 'some good reason' }
  • validate_xml_payload(self)
    Check the validity of yellowbill xml.

New fields (12)
  • active Boolean
    default=True
  • biller_id Char
    required=True size=17 string='Biller ID'
  • ebill_payment_contract_ids One2many → ebill.payment.contract
    comodel_name='ebill.payment.contract' inverse_name='postfinance_service_id' readonly=True string='Contracts'
  • file_type_to_use Selection
    default='XML' required=True selection=[('XML', 'XML Yellow Bill'), ('EAI.XML', 'Custom XML (SAPiDoc)'), ('struct.pdf', 'Factur X')] string='Invoice Format'
  • invoice_message_ids One2many → ebill.postfinance.invoice.message
    comodel_name='ebill.postfinance.invoice.message' inverse_name='service_id' readonly=True string='Invoice Messages'
  • name Char
    required=True
  • operation_timeout Integer
    default='600' help='Timeout for each HTTP (GET, POST) request in seconds.' string='HTTP Timeout'
  • partner_bank_id Many2one → res.partner.bank
    comodel_name='res.partner.bank' ondelete='restrict' string='Bank account'
  • password Char
  • use_file_type_xml_paynet Boolean
    help='Enable use of legacy SIX/Paynet invoice format.' string='Use Paynet/SIX format'
  • use_test_service Boolean
    help='Target the test service' string='Testing'
  • username Char
Public methods (10)
  • cron_update_invoices(self)
    @api.model
  • get_ebill_recipient_subscription_status(self, recipient_id)
  • get_invoice_list(self, archive_data=False)
  • get_process_protocol_list(self, archive_data=False)
  • get_registration_protocol(self, create_date, archive_data=False)
  • get_registration_protocol_list(self, archive_data=False)
  • ping_service(self, test_error=False, test_exception=False)
    Ping the service, uses the authentication. test_error: will create an unhandled error in the repsonse test_exception: will create a FaultException
  • search_invoice(self, transaction_id=None)
    Get invoice status from the server. transaction_id:
  • test_ping(self)
    Test the service from the UI.
  • upload_file(self, transaction_id, file_type, data)

New fields (1)
  • postfinance_ebill_client_order_ref Char
    compute='_compute_postfinance_ebill_client_order_ref'
Public methods (0)

No public methods.