Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Artificial Intelligence
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Property Management
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

Adding FileInput Component through patch not working

Odoberať

Get notified when there's activity on this post

This question has been flagged
javascriptdevelopmentaccountingdebug
1 Odpoveď
1119 Zobrazenia
Avatar
Bishwo

I am trying to add a file upload button on the bank reconciliation widget through:

<t t-name="account_statement_custom.BankRecRecordFormButtonsHeaderLeft" t-inherit="account_accountant.BankRecRecordFormButtonsHeaderLeft" t-inherit-mode="extension">
<xpath expr="//div[hasclass('o_bank_rec_stats_buttons_aside_left')]" position="inside">
<FileInput>
Upload
</FileInput>
</xpath>
</t>
I have added FileInput to the Controller through patching:
import { FileInput } from "@web/core/file_input/file_input";
patch(BankRecKanbanController.components, {         FileInput, });
But I am still getting the error:
OwlError: Cannot find the definition of component "FileInput"

This seems strange. If I add the FileInput component in the BankRecKanbanController code itself. So I feel like it should work through this patch mechanism as well. What am I missing?
Thank you,

Edit:
AccountFileUploader works but it doesn't fit my use case.
import { FileInput } from "@web/core/file_input/file_input";
patch(BankRecKanbanController.components, {         AccountFileUploader, });

Intrestingly direct modification to account_accountant/static/src/components/bank_reconciliation/kanban.js also works. But obviously this is not a solution.

export class BankRecKanbanController extends KanbanController {
static template = "account.BankRecoKanbanController";
static props = {
...KanbanController.props,
skipRestore: { optional: true },
};
static components = {
...KanbanController.components,
Dropdown,
DropdownItem,
Many2OneField,
Many2ManyTagsField,
DateTimeField,
CharField,
AnalyticDistribution,
Chatter,
TagsList,
HtmlField,
BankRecMonetaryField,
Notebook,
BankRecViewEmbedder,
​FileUploader,
​FileInput
};

Update:
I couldn't find an answer so I ended up implementing it inline

0
Avatar
Zrušiť
Codesphere Tech


Refer below examples from Odoo Default

import { Discuss } from "@mail/core/public_web/discuss";
import { Call } from "@mail/discuss/call/common/call";
import { useState } from "@odoo/owl";
import { useService } from "@web/core/utils/hooks";

import { patch } from "@web/core/utils/patch";

Object.assign(Discuss.components, { Call });

patch(Discuss.prototype, {
setup() {
super.setup(...arguments);
this.rtc = useState(useService("discuss.rtc"));
},
});

import { registry } from "@web/core/registry";
import { AccountFileUploader } from "@account/components/account_file_uploader/account_file_uploader";
import { UploadDropZone } from "@account/components/upload_drop_zone/upload_drop_zone";
import { BankRecKanbanView, BankRecKanbanController, BankRecKanbanRenderer } from "@account_accountant/components/bank_reconciliation/kanban";
import { useState } from "@odoo/owl";

export class BankRecKanbanUploadController extends BankRecKanbanController {
static components = {
...BankRecKanbanController.components,
AccountFileUploader,
}
}

Codesphere Tech

Try this:

import { BankRecKanbanController } from "@account_accountant/components/bank_reconciliation/kanban";
import { FileInput } from "@web/core/file_input/file_input";
import { patch } from "@web/core/utils/patch";

patch(BankRecKanbanController, {
components: {
...BankRecKanbanController.components,
FileInput,
},
});

Avatar
Bishwo
Autor Best Answer

Thank you. AccountFileUploader works but FileInput doesn't work. I need FileInput

0
Avatar
Zrušiť
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrácia
Related Posts Replies Zobrazenia Aktivita
Help with Subscription Webhooks
webclient javascript development accounting debug
Avatar
Avatar
1
okt 25
2485
Full Breakdown Ho rakha hia bhai
development accounting debug
Avatar
0
apr 26
1
How to hide the title or the close (X) button from a dialogService dialog?
javascript development debug
Avatar
Avatar
2
sep 25
2349
Updating acc_holder_name via external function
javascript development configuration accounting function debug
Avatar
0
sep 25
1441
OWL Component Not Rendering in Custom Layout (Odoo 18) — Likely XML Template Issue
javascript development project debug
Avatar
Avatar
Avatar
2
jún 26
5855
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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