Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Guest House
    • Distributeur de boissons
    • Hotel
    Real Estate
    • Real Estate Agency
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consulting
    • Accounting Firm
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Solar Energy Systems
    • Cordonnier
    • Services de nettoyage
    • HVAC Services
    Others
    • Nonprofit Organization
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

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

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

Problem with custom_field VAT price per account.invoice.line and recompute taxe account.invoice

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
vatodooV8account.invoice.line
2 Réponses
4620 Vues
Avatar
Youri Lebarch

I try to add a field in treeview account_invoice_line in invoice which compute and display VAT price per account_invoice_line (1). It's done but when try to recompute total tax (2), the VAT price per line is recompute to 0 (Except for line create in sale.order)



Have you an idea for VAT prices are good for all account.invoice.line 


My code : 

class cap_account_invoice_line(osv.osv):

_inherit = 'account.invoice.line'

_columns = {

'price_with_tax':fields.float(string='Prix TTC', store=True, readonly=True,),

}

@api.multi

def product_id_change(self, product, account_id, uom_id, qty=0, name='', type_x='out_invoice',

partner_id=False, fposition_id=False, price_unit=False, currency_id=False, company_id=None,context = None):

if context is None:

context = {}

if partner_id:

res = super(cap_account_invoice_line, self).product_id_change(product, uom_id, qty=qty, name=name, type=type_x,

partner_id=partner_id, fposition_id=fposition_id, price_unit=price_unit, currency_id=currency_id,

company_id=company_id)

if res == 0:

return res

context = self._context

company_id = company_id if company_id is not None else context.get('company_id', False)

self = self.with_context(company_id=company_id, force_company=company_id)

part = self.env['res.partner'].browse(partner_id)

product = self.env['product.product'].browse(product)

fpos = self.env['account.fiscal.position'].browse(fposition_id)

if type in ('out_invoice', 'out_refund'):

account = product.property_account_income or product.categ_id.property_account_income_categ

else:

account = product.property_account_expense or product.categ_id.property_account_expense_categ

account = fpos.map_account(account)

if type in ('out_invoice', 'out_refund'):

taxes = product.taxes_id or account.tax_ids

else:

taxes = product.supplier_taxes_id or account.tax_ids

taxes = fpos.map_tax(taxes)

taxes.ids

values = res['value']

price = values.get('price_unit', 0) * (1 - values.get('discount', 0) / 100.0)

taxes = values.get('invoice_line_tax_id')

taxes = self.env['account.tax'].browse(taxes)

tax_res = taxes.compute_all(price, qty,product=product, partner=part)

values['price_with_tax'] = tax_res['total_included']

res['value'] = values

return res

@api.multi

def uos_id_change(self, product, uom, qty=0, name='', type_x='out_invoice', partner_id=False,

fposition_id=False, price_unit=False, currency_id=False, company_id=None):

if uom:

super(cap_account_invoice_line, self).uos_id_change(product, uom, qty, name, type_x, partner_id, fposition_id, price_unit, currency_id, company_id)





1
Avatar
Ignorer
Avatar
Serpent Consulting Services Pvt. Ltd.
Meilleure réponse

Hi,

While you recompute the invoice, did you make sure your vat price is already affecting the price_subtotal of the invoice line?

Logically, your new field should affect the calculations of the field subtotal. And that subtotal will affect the other float fields of the invoice.

Hope this helps.

Thanks.

0
Avatar
Ignorer
Avatar
Cyril Gaspard (GEM)
Meilleure réponse

Hi,

for price VAT in invoice line see :


https://www.odoo.com/fr_FR/forum/help-1/question/is-it-possible-to-show-both-tax-included-and-tax-excluded-total-price-in-invoice-lines-83343

bye

1
Avatar
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
Import VAT number for a supplier Résolu
import vat odooV8
Avatar
1
déc. 15
5656
Ho to insert TIN (VAT code) without Country Code?
vat vat_base odooV8
Avatar
0
sept. 15
6235
CONFIGURACION DE CORREO PROPIO POR PRUMERA VEZ
odooV8
Avatar
0
mars 25
1943
How to remove model if not in the py files anymore
odooV8
Avatar
0
janv. 25
4226
Start odoo server automatically in Ubuntu 14.04 on reboot Résolu
odooV8
Avatar
Avatar
1
août 23
15841
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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