Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

How to add calculations to the sales quote

Odoberať

Get notified when there's activity on this post

This question has been flagged
purchasefieldssalev7
2 Replies
6444 Zobrazenia
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
Zrušiť
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
Zrušiť
Carlos Carmona
Autor

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
Autor

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
Autor 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
Zrušiť
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!

Registrácia
Related Posts Replies Zobrazenia Aktivita
v7 Delivery orders - how to add Customer reference from sale order?
python fields sale v7
Avatar
Avatar
1
mar 15
4690
how to modify the formulas of openerp
purchase sale v7 mod
Avatar
0
mar 15
4090
How to automate purchase orders based on minimum stock rules? Solved
purchase v7
Avatar
Avatar
1
dec 24
9330
How can enter freight charges and transporting Charges in sale order? Solved
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
6679
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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