addons14/account_banking_pain_base/models/account_payment_order.py
def generate_party_block(
        self, parent_node, party_type, order, partner_bank, gen_args, bank_line=None
    ):
        """Generate the piece of the XML file corresponding to Name+IBAN+BIC
        This code is mutualized between TRF and DD
        In some localization (l10n_ch_sepa for example), they need the
        bank_line argument"""
        assert order in ("B", "C"), "Order can be 'B' or 'C'"
        party_type_label = _("Partner name")
        if party_type == "Cdtr":
            party_type_label = _("Creditor name")
        elif party_type == "Dbtr":
            party_type_label = _("Debtor name")
        name = "partner_bank.acc_holder_name or partner_bank.partner_id.name"
        eval_ctx = {"partner_bank": partner_bank}
        party_name = self._prepare_field(
            party_type_label,
            name,
            eval_ctx,
            gen_args.get("name_maxsize"),
            gen_args=gen_args,
        )
        # At C level, the order is : BIC, Name, IBAN
        # At B level, the order is : Name, IBAN, BIC
        if order == "C":
            self.generate_party_agent(
                parent_node,
                party_type,
                order,
                partner_bank,
                gen_args,
                bank_line=bank_line,
            )
        party = etree.SubElement(parent_node, party_type)
        party_nm = etree.SubElement(party, "Nm")
        party_nm.text = party_name
        partner = partner_bank.partner_id

        self.generate_address_block(party, partner, gen_args)

        self.generate_party_id(party, party_type, partner)

        self.generate_party_acc_number(
            parent_node, party_type, order, partner_bank, gen_args, bank_line=bank_line
        )

        if order == "B":
            self.generate_party_agent(
                parent_node,
                party_type,
                order,
                partner_bank,
                gen_args,
                bank_line=bank_line,
            )
        return True
Generate the piece of the XML file corresponding to Name+IBAN+BIC
        This code is mutualized between TRF and DD
        In some localization (l10n_ch_sepa for example), they need the
        bank_line argument
Generate the piece of the XML file corresponding to Name+IBAN+BIC
This code is mutualized between TRF and DD
In some localization (l10n_ch_sepa for example), they need the
bank_line argument
Generate the piece of the XML file corresponding to Name + IBAN + BIC This code is mutualized between TRF and DD In some localization ( l10n_ch_sepa for example ) they need the bank_line argument
def generate_party_block(
        self, parent_node, party_type, order, partner_bank, gen_args, bank_line=None
    ):
        assert order in ("B", "C"), "Order can be 'B' or 'C'"
        party_type_label = _("Partner name")
        if party_type == "Cdtr":
            party_type_label = _("Creditor name")
        elif party_type == "Dbtr":
            party_type_label = _("Debtor name")
        name = "partner_bank.acc_holder_name or partner_bank.partner_id.name"
        eval_ctx = {"partner_bank": partner_bank}
        party_name = self._prepare_field(
            party_type_label,
            name,
            eval_ctx,
            gen_args.get("name_maxsize"),
            gen_args=gen_args,
        )
        if order == "C":
            self.generate_party_agent(
                parent_node,
                party_type,
                order,
                partner_bank,
                gen_args,
                bank_line=bank_line,
            )
        party = etree.SubElement(parent_node, party_type)
        party_nm = etree.SubElement(party, "Nm")
        party_nm.text = party_name
        partner = partner_bank.partner_id
        self.generate_address_block(party, partner, gen_args)
        self.generate_party_id(party, party_type, partner)
        self.generate_party_acc_number(
            parent_node, party_type, order, partner_bank, gen_args, bank_line=bank_line
        )
        if order == "B":
            self.generate_party_agent(
                parent_node,
                party_type,
                order,
                partner_bank,
                gen_args,
                bank_line=bank_line,
            )
        return True
def generate_party_block ( self , parent_node , party_type , order , partner_bank , gen_args , bank_line = None ) : assert order in ( "B" , "C" ) , "Order can be 'B' or 'C'" party_type_label = _ ( "Partner name" ) if party_type == "Cdtr" : party_type_label = _ ( "Creditor name" ) elif party_type == "Dbtr" : party_type_label = _ ( "Debtor name" ) name = "partner_bank.acc_holder_name or partner_bank.partner_id.name" eval_ctx = { "partner_bank" : partner_bank } party_name = self . _prepare_field ( party_type_label , name , eval_ctx , gen_args . get ( "name_maxsize" ) , gen_args = gen_args , ) if order == "C" : self . generate_party_agent ( parent_node , party_type , order , partner_bank , gen_args , bank_line = bank_line , ) party = etree . SubElement ( parent_node , party_type ) party_nm = etree . SubElement ( party , "Nm" ) party_nm . text = party_name partner = partner_bank . partner_id self . generate_address_block ( party , partner , gen_args ) self . generate_party_id ( party , party_type , partner ) self . generate_party_acc_number ( parent_node , party_type , order , partner_bank , gen_args , bank_line = bank_line ) if order == "B" : self . generate_party_agent ( parent_node , party_type , order , partner_bank , gen_args , bank_line = bank_line , ) return True
Generate the piece of the XML file corresponding to Name+IBAN+BIC
This code is mutualized between TRF and DD
In some localization (l10n_ch_sepa for example), they need the
bank_line argument
Generate the piece of the XML file corresponding to Name + IBAN + BIC This code is mutualized between TRF and DD In some localization ( l10n_ch_sepa for example ) they need the bank_line argument
"""Generate the piece of the XML file corresponding to Name+IBAN+BIC
        This code is mutualized between TRF and DD
        In some localization (l10n_ch_sepa for example), they need the
        bank_line argument""" # At C level, the order is : BIC, Name, IBAN # At B level, the order is : Name, IBAN, BIC
self
parent_node
party_type
order
partner_bank
gen_args
bank_line