Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

How to Change Custom icons for Payment Acquirers?

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
integrationpaymentodooAcquirer
7 Odpowiedzi
11295 Widoki
Awatar
Ayaz Mansuri

Hello...!!!

Currently I'm Working on Payment Integration Module., But Unable to set custom icon/image for payment methods.

if we create custom payment module, payment_demo, it will be set like...

<img t-if="not submit_txt" src="/payment_demo/static/src/img/demo_icon.png"/>

 But, How can i set custom icon without creating custom payment module..!!!

Thanks,

Ayaz Mansuri

8
Awatar
Odrzuć
Awatar
Ayaz Mansuri
Autor Najlepsza odpowiedź

Thank You Guys For your Contribution..but finally i've solved this without creating custom payment module, no need to place image in existing payment module, no need write methods., Just Put one field in payment acquirer model..like...

In Your Py File:

class acquirer(osv.Model):

    _inherit = 'payment.acquirer'

   _columns = { 

    'payment_icon': fields.char(string='Icon location', help='Custom icon to use for this acquirer.'),

}

In Your XML File:

<record id="acquirer_form_payment" model="ir.ui.view">

    <field name="name">acquirer.form.payerse</field>

    <field name="model">payment.acquirer</field>

    <field name="inherit_id" ref="payment.acquirer_form"/>

    <field name="arch" type="xml">

        <xpath expr='//group[@name="acquirer_display"]' position='after'>

    <group>

            <field name="payment_icon"/>

    </group>

        </xpath>

    </field>

</record> 

And...........

  <template id="payment_inherit" inherit_id="website_sale.payment">

    <!-- Enable custom icons in Payment Acquirers -->

    <xpath expr="//div[@id='payment_method']//img" position="attributes">

        <attribute name="t-att-src">acquirer.payment_icon or '/payment_%s/static/src/img/%s_icon.png' % (acquirer.provider, acquirer.provider)</attribute>

    </xpath>

</template>

Now Go to Settings > Payment Acquirers > Select any of payment Method > Go to payment_icon Field & Write icon image path like this. /your_module_name/static/src/img/lastschrift_icon.png

This is how you can change payment icons without creating custom payment module...!!!

Thanks...!!!


3
Awatar
Odrzuć
Awatar
Cybrosys Techno Solutions Pvt.Ltd
Najlepsza odpowiedź

Hi Mansuri,


The image icon should be saved in this format 'acquirername_icon.png'

The payment methods in odoo e-commerce is listed by using this methode in the corresponding template

        <li t-foreach="acquirers or []" t-as="acquirer">

            <label t-if="acquirer.button">

                <input t-att-value="acquirer.id" type="radio" name="acquirer" t-att-checked="acquirers[0] == acquirer"/>

                <img class="media-object" style="width: 60px; display: inline-block;"

                    t-att-title="acquirer.name"

                    t-att-src="'/payment_%s/static/src/img/%s_icon.png' % (acquirer.provider, acquirer.provider)"/>

                <span t-field="acquirer.name"/>

            </label>

        </li>

I hope it will help.

9
Awatar
Odrzuć
Lince

Where is the file, script, to write this code ?

fasluca

You don't need to include this code...its already there. just give name for that icon as mentioned in answer

nikesh

Hi Lince, At the time of installation of module 'payment_demo ' some datas are to be set in payment.acquirer as Demo demo test here you may need to create tempate demo_acquirer_button. Note: Look here the provider is 'demo'. You also have to inherit payment.acquirer and follow the code: class PaymentAcquirer(models.Model): _inherit = 'payment.acquirer' def _get_providers(self, cr, uid, context=None): providers = super(PaymentAcquirer, self)._get_providers(cr, uid, context=context) providers.append(['demo', 'demo']) return providers

Awatar
nikesh
Najlepsza odpowiedź

Hi Lince,
At the time of installation of module 'payment_demo ' some datas are to be set in payment.acquirer as

 

<openerp>
    <data noupdate="1">
        <record id="payment_acquirer_sagepay" model="payment.acquirer">
            <field name="name">Demo</field>
            <field name="provider">demo</field>
            <field name="company_id" ref="base.main_company"/>
            <field name="view_template_id" ref="demo_acquirer_button"/>
            <field name="environment">test</field>
        </record>
    </data>
</openerp>


Here you may need to create tempate demo_acquirer_button.

 Note: Look here the provider is 'demo'. You also have to inherit payment.acquirer and follow the code:

class PaymentAcquirer(models.Model): 
    _inherit = 'payment.acquirer'
    def _get_providers(self, cr, uid, context=None):
        providers = super(PaymentAcquirer, self)._get_providers(cr, uid, context=context)
        providers.append(['demo', 'demo'])
        return providers


1
Awatar
Odrzuć
Awatar
Prakash
Najlepsza odpowiedź

just place a icon as the name of acquire name in static/src/img.

For example if you want to change the image of payment_transfer;

place a  .png image  inside payment_transfer/static/src/img/ having name transfer_icon


For example if you want to change the image of payment_paypal;

place a  .png image  inside payment_paypal/static/src/img/ having name paypal_icon

 



0
Awatar
Odrzuć
Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
pax s300 terminal integration with odoo 12
integration payment odoo
Awatar
0
mar 19
3768
How to access data in payment acquirer
payment odoo eCommers Acquirer
Awatar
0
mar 15
5608
Intégration spotify
integration odoo
Awatar
Awatar
1
sie 25
10355
How to Develop Odoo with Continuous Integration ? Rozwiązane
integration odoo
Awatar
Awatar
1
wrz 25
6485
Does Odoo support Alma as a payment solution? Rozwiązane
payment ecommerce monetary odoo Acquirer
Awatar
Awatar
Awatar
3
lis 24
1777
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now