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č

How to add calculations to the sales quote

Naroči se

Get notified when there's activity on this post

This question has been flagged
purchasefieldssalev7
2 Odgovori
6439 Prikazi
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
Opusti
Avatar
Nicolás Visús
Best Answer

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
Opusti
Carlos Carmona
Avtor

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
Avtor

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
Avtor Best Answer

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
Opusti
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

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
v7 Delivery orders - how to add Customer reference from sale order?
python fields sale v7
Avatar
Avatar
1
mar. 15
4683
how to modify the formulas of openerp
purchase sale v7 mod
Avatar
0
mar. 15
4088
How to automate purchase orders based on minimum stock rules? Solved
purchase v7
Avatar
Avatar
1
dec. 24
9329
How can enter freight charges and transporting Charges in sale order? Solved
purchase sale
Avatar
Avatar
1
avg. 24
6359
module for trading and selling products by square meter
purchase module fields sale sale.order
Avatar
Avatar
Avatar
3
avg. 16
6676
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