Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

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

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

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

Naroči se

Get notified when there's activity on this post

This question has been flagged
accountingxmlrpctimesheets
4988 Prikazi
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
Opusti
Enjoying the discussion? Don't just read, join in!

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

Prijavi
Related Posts Odgovori Prikazi Aktivnost
Auto Fiscal Localization for New Companies in Odoo 17
accounting xmlrpc FiscalPosition
Avatar
0
jan. 25
1451
Custom Field Calculation
accounting employee timesheets
Avatar
Avatar
1
jun. 24
2450
record timesheets for active projects on the balance sheet Solved
accounting accounts timesheets
Avatar
Avatar
1
maj 23
4761
API - XMLRPC - Retrieve Accounting invoices from multiple companies at once
accounting xmlrpc multicompany
Avatar
Avatar
1
mar. 21
3381
¿Cómo llamar a Jetblue Airlines en Mexico?
accounting
Avatar
0
nov. 25
2
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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