Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

How to add calculations to the sales quote

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
purchasefieldssalev7
2 Antwoorden
6441 Weergaven
Avatar
Carlos Carmona

I could add these fields to the form:

  <tree string = "Sales Order Lines" editable = "bottom">
    <field name = "x_alto" />
    <field name = "x_ancho" />
  </ tree>

according understand and to use these fields to make calculations in the file named sale.py in this part of code:

_columns = {
    'x_alto': fields.float ('sale.order.line', 'High'),
    'x_ancho': fields.float ('sale.order.line', 'W'),
}

and else where in this code:

class sale_order_line class (osv.osv):
     def _amount_line def (self, cr, uid, ids, field_name, arg, context = None):
         self.pool.get tax_obj = ('account.tax')
         self.pool.get cur_obj = ('res.currency')
         res = {}
         if context is None:
             context = {}
         for line in self.browse (cr, uid, ids, context = context):
             #MODIFIQUE THIS LINE WAS SO: price = line.price_unit * (1 - (line.discount or 0.0) / 100.0)
             price = line.price_unit * (1 - (line.discount or 0.0) / 100.0) * (* line.x_ancho line.x_alto)
             tax_obj.compute_all taxes = (cr, uid, line.tax_id, price, line.product_uom_qty, line.product_id, line.order_id.partner_id)
             cur = line.order_id.pricelist_id.currency_id
             res [line.id] = cur_obj.round (cr, uid, cur, taxes ['Total'])
         return res


but to update and create a new quote, I choose product measures and give that and I do not take intoaccount for calculating square meters, as entonses could do. The idea is to add a couple of fields for height and width and calculate the square footage in order to know how much to charge. Or otherwise do not know if there is any module that you can add and calculate the data I need.

0
Avatar
Annuleer
Avatar
Nicolás Visús
Beste antwoord

Hola Carlos, respondí algo parecido en la siguiente pregunta:

https://www.odoo.com/forum/help-1/question/need-help-with-quote-in-m2-45617

Espero que sea de ayuda.

 

0
Avatar
Annuleer
Carlos Carmona
Auteur

ya veo, eso de espesificar las unidades de medida ya lo sabia pero si necesito carlcular metros cuadrados y su precio en base a estos. No se si el modulo de mrp me sirva. lo probe pero no aparece una opcion para cotizar lgun producto en metros cuadrados calculando esto. Investigando un poco encontre este nombre de modulo en la pagina de odoo que segun si permite estos calculos: product_lot_foundry pero solo esta para la version 5.0, intente instalarlo en la v7 para ver si lo instalaba pero no lo instala. Tambien agrege los campos para alto y ancho e intente modificar el codigo del modulo de sales (sales.py) en estas lineas de codigo: //en la clase de: class sale_order_line(osv.osv) de la funcion: def _amount_line(self, cr, uid, ids, field_name, arg, context=None): price = line.price_unit * (1 - (line.discount or 0.0) / 100.0)*(line.x_alto*line.x_ancho) //y este codigo del diccionario (me parece que es un diccionario) _columns = { 'x_alto': fields.float('sale.order.line', 'Alto'), 'x_ancho': fields.float('sale.order.line', 'Ancho'), donde segun yo, es en donde realiza los calculos del total, impuestos, etc de las cotizaciones de venta, pero de igual manera no me hace el calculo. No habra alguna alguna otra forma para calcular esto?

Carlos Carmona
Auteur

Hi Nicholas Visús, just checked the links you sent me and have seen the module you have mentioned and I managed to add it in the addons folder and update the list of modules appears but if I try to install I get the following error: OpenERP Server Error Client Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/openerp/addons/web/http.py", line 204, in dispatch response["result"] = method(self, **self.params) File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1132, in call_button action = self._call_kw(req, model, method, args, {}) File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1120, in _call_kw return getattr(req.session.model(model), method)(*args, **kwargs) File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 42, in proxy result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw) File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 30, in proxy_method result = self.session.send(self.service_name, method, *args) File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 103, in send raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info) Server Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 89, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 296, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 626, in dispatch res = fn(db, uid, *params) File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 190, in execute_kw return self.execute(db, uid, obj, method, *args, **kw or {}) File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 132, in wrapper return f(self, dbname, *args, **kwargs) File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 199, in execute res = self.execute_cr(cr, uid, obj, method, *args, **kw) File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 187, in execute_cr return getattr(object, method)(cr, uid, *args, **kw) File "/usr/lib/pymodules/python2.7/openerp/addons/base/module/module.py", line 424, in button_immediate_install return self._button_immediate_function(cr, uid, ids, self.button_install, context=context) File "/usr/lib/pymodules/python2.7/openerp/addons/base/module/module.py", line 475, in _button_immediate_function _, pool = pooler.restart_pool(cr.dbname, update_module=True) File "/usr/lib/pymodules/python2.7/openerp/pooler.py", line 39, in restart_pool registry = RegistryManager.new(db_name, force_demo, status, update_module) File "/usr/lib/pymodules/python2.7/openerp/modules/registry.py", line 233, in new openerp.modules.load_modules(registry.db, force_demo, status, update_module) File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 354, in load_modules loaded_modules, update_module) File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 256, in load_marked_modules loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks) File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 159, in load_module_graph load_openerp_module(package.name) File "/usr/lib/pymodules/python2.7/openerp/modules/module.py", line 405, in load_openerp_module __import__('openerp.addons.' + module_name) File "/usr/lib/pymodules/python2.7/openerp/modules/module.py", line 133, in load_module mod = imp.load_module('openerp.addons.' + module_part, f, path, descr) File "/usr/lib/pymodules/python2.7/openerp/addons/product_lot_foundry/__init__.py", line 20, in import product_lot_foundry File "/usr/lib/pymodules/python2.7/openerp/addons/product_lot_foundry/product_lot_foundry.py", line 26 _name = 'product.lot.foundry.heatcode' ^ IndentationError: expected an indented block how to might fix it?

Avatar
Carlos Carmona
Auteur Beste antwoord

ya veo, eso de espesificar las unidades de medida ya lo sabia pero si necesito carlcular metros cuadrados y su precio en base a estos. No se si el modulo de mrp me sirva. lo probe pero no aparece una opcion para cotizar lgun producto en metros cuadrados calculando esto. Investigando un poco encontre este nombre de modulo en la pagina de odoo que segun si permite estos calculos: product_lot_foundry pero solo esta para la version 5.0, intente instalarlo en la v7 para ver si lo instalaba pero no lo instala. Tambien agrege los campos para alto y ancho e intente modificar el codigo del modulo de sales (sales.py) en estas lineas de codigo:

//en la clase de: class sale_order_line(osv.osv) de la funcion:  def _amount_line(self, cr, uid, ids, field_name, arg, context=None):

price = line.price_unit * (1 - (line.discount or 0.0) / 100.0)*(line.x_alto*line.x_ancho)

//y este codigo del diccionario (me parece que es un diccionario) _columns = {

'x_alto': fields.float('sale.order.line', 'Alto'),
'x_ancho': fields.float('sale.order.line', 'Ancho'),

 

donde segun yo, es en donde realiza los calculos del total, impuestos, etc de las cotizaciones de venta, pero de igual manera no me hace el calculo.

No habra alguna alguna otra forma para calcular esto?

0
Avatar
Annuleer
Nicolás Visús

No sabría ayudarte con la programación en python. Te puedo decir que, nativamente, Odoo no ofrece esto que estás buscando. El módulo mrp no te va a servir porque, si entendí bien, lo que estás buscando tiene que ver con la venta. Concretamente necesitarías un desarrollo muy sencillo, básicamente una calculadora que multiplique alto x ancho. El módulo que hacés mención creo que te serviría aunque tiene un valor más: alto, ancho y grosor. Te dejo unos links que te pueden interesar: https://github.com/vnc-biz/openerp-extra-bundle/tree/master/product_lot_foundry http://huber.salazarcarlos.com/?p=339 https://www.odoo.com/forum/help-1/question/how-can-i-install-a-module-from-a-zip-file-5302

Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
v7 Delivery orders - how to add Customer reference from sale order?
python fields sale v7
Avatar
Avatar
1
mrt. 15
4686
how to modify the formulas of openerp
purchase sale v7 mod
Avatar
0
mrt. 15
4088
How to automate purchase orders based on minimum stock rules? Opgelost
purchase v7
Avatar
Avatar
1
dec. 24
9329
How can enter freight charges and transporting Charges in sale order? Opgelost
purchase sale
Avatar
Avatar
1
aug. 24
6359
module for trading and selling products by square meter
purchase module fields sale sale.order
Avatar
Avatar
Avatar
3
aug. 16
6677
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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