Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

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

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

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

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
vatodooV8account.invoice.line
2 Respuestas
4722 Vistas
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
Descartar
Avatar
Serpent Consulting Services Pvt. Ltd.
Mejor respuesta

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
Descartar
Avatar
Cyril Gaspard (GEM)
Mejor respuesta

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
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
Import VAT number for a supplier Resuelto
import vat odooV8
Avatar
1
dic 15
5766
Ho to insert TIN (VAT code) without Country Code?
vat vat_base odooV8
Avatar
0
sept 15
6363
CONFIGURACION DE CORREO PROPIO POR PRUMERA VEZ
odooV8
Avatar
0
mar 25
2078
How to remove model if not in the py files anymore
odooV8
Avatar
0
ene 25
4406
Start odoo server automatically in Ubuntu 14.04 on reboot Resuelto
odooV8
Avatar
Avatar
1
ago 23
16031
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة 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 es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

Sitio web hecho con

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