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
    • Schvalovania
    • 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
    • Estate Managament
    • 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

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
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

XML-RPC Question: Why do account.analytic.line not become invoiceable when importing through xmlrpc?

Odoberať

Get notified when there's activity on this post

This question has been flagged
accountingxmlrpctimesheets
5004 Zobrazenia
Avatar
Michael Hucke

Just have written an importer for OpenProject Ticket System to Odoo 10.0.

Everything works just perfect and automatic. Except one issue, where we just found a workaround, but no real solution yet.

Therefor i'll describe what we do and the workaround:

Maybe i am just missing something obvious someone may give the hint for me.

Excerpt of what the code does:

 # create sale.order for each imported project    .....
            odoo_id = ProjectProject.create(project_project)    .....
        saleorder = {                    'state': 'draft',                    'date_order': mk_date(row['created_on']),                    'user_id': 1,                    'currency_id': 1,                    'client_order_ref': 'Ticketsystem',                    'partner_id': partner_id[0],                    'partner_invoice_id': partner_id[0],                    'partner_shipping_id': partner_id[0],                    'project_id': pid[0]['analytic_account_id'][0], # Kostenstelle                    'project_project_id': odoo_id, # Projekt                    'picking_policy': 'direct',                    'pricelist_id': 1,                    'note': 'created from openproject import',                    'origin': project_project['openproject_id'],                    'warehouse_id': 1,                    'order_line': [                        (0, 0, {                            'product_uom_qty': 1,                            'product_uom': 5,                            'product_id': general_service_product, # this is product.product of type service, order_policy "timesheet"                        }),                    ],                }        SaleOrder = odoo.get_model('sale.order')        so_id = SaleOrder.search([('origin', '=', project_project['openproject_id'])])        if len(so_id) == 0:
            SaleOrder.create(saleorder)    .....
        # create account.analytic.line    .....
        accaline = {            'openproject_id': row['id'], # used to be able to update/add timesheet entries from openproject            'account_id': none2false(lookup_project_aa(lookup_project(row['project_id']))), # Analysekonto / many2one            'amount': row['hours'] * o.gethourprice(row['id']), # Betrag / monetary            'company_id': 1, # Unternehmen / many2one            'date': mk_date(row['spent_on']), # Datum / date            'name': cleantext(row['comments']), # Beschreibung / char            'product_id': general_service_product, # Produkt / many2one            'project_id': lookup_project(row['project_id']), # Projekt / many2one            'task_id': lookup_task('work_package_id'), # Aufgabe / many2one            'unit_amount': row['hours'], # Anzahl / float            'user_id': lookup_user(row['user_id']), # Benutzer / many2one            }        AccountAnalyticLine = odoo.get_model('account.analytic.line') # this is my xml-rpc factory        odoo_id = AccountAnalyticLine.search([('openproject_id', '=', accaline['openproject_id'])])        if not odoo_id:
            odoo_id = AccountAnalyticLine.create(accaline)    .....


After doing such import, Account analytic lines are all there.

But in Sales/Sales to invoice there is nothing to be invoiced.

Expected Result:

 

- all imported analytic entries should be on "sales to invoice"

Observed Result:

 

No imported entries appear to be invoiced

Workaround:

1. go into Accounting/Advisor/Analytic entries and select & export all, just one unimportant field like "ref".

2. re-import file from 1.

After this, all analytic entries are found to be billable under "Sales to invoice". Although there is no observable result in analytic entries.

Question:

What can be done programmatically to make those analytic entries invoiceable directly with import, without described workaround?

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
Auto Fiscal Localization for New Companies in Odoo 17
accounting xmlrpc FiscalPosition
Avatar
0
jan 25
1453
Custom Field Calculation
accounting employee timesheets
Avatar
Avatar
1
jún 24
2465
record timesheets for active projects on the balance sheet Solved
accounting accounts timesheets
Avatar
Avatar
1
máj 23
4768
API - XMLRPC - Retrieve Accounting invoices from multiple companies at once
accounting xmlrpc multicompany
Avatar
Avatar
1
mar 21
3390
I found a small typo in the Odoo 19 Chart of Accounts — and it made my day 😆
accounting
Avatar
Avatar
1
nov 25
59
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 ภาษาไทย 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