Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

odoo 9 sale analysis adding new measures.

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
salereporting
2 Răspunsuri
5840 Vizualizări
Imagine profil
Jiashun Chen

Dear,

I tried to do sale report as nice format  for printing like this 

Just want 3 cols to sumup saled products  qtys with UoM. I know there is a way to show UoM in odoo. But It is kind of messy if there are many Uom. like this 


So I tried to add UoM In measures like this.

But the result doesn't show up as i expected. see this.


Can Someone helps. Thanks a million.

0
Imagine profil
Abandonează
Imagine profil
mario@rehilete.com.mx
Cel mai bun răspuns

Hi, i'm testing and i write this code:

Function read_group is the key!

# -*- coding: utf-8 -*-
import logging, re

from odoo import api, fields, models
from odoo.exceptions import UserError
from odoo.osv.expression import expression
from pprint import pformat

_logger = logging.getLogger(__name__)


class SaleReport(models.Model):
_inherit = "sale.report"

# @api.depends('partner_id')
def _compute_objetivo_zona(self):
for rec in self:
_logger.warning("sadjhasjkdasjdkjjjkjhkjhk")
_logger.warning(rec.partner_id.x_zonas.x_studio_objetivos)

objetivo_zona = 0.0
partner = rec.partner_id
zone_id = partner.x_zonas

if zone_id:
objetivo_zona = zone_id.x_studio_objetivos

_logger.warning(objetivo_zona)
_logger.warning("sadjhasjkdasjdkjjjkjhkjhk")

rec.update({
'objetivo_zona': 5.0
})

zone_id = fields.Many2one('x_zonas', 'Zonas', readonly=True)
objetivo_zona = fields.Float('Objetivo', default=0.0, readonly=True)

def _select(self):
return super(SaleReport, self)._select() + ", zone.x_studio_objetivos as objetivo_zona"

@api.model
def read_group(self, domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True):
_logger.warning("HACK ESCONDER CAMPO")
_logger.warning(pformat(fields))
has_field_objetivo = False
newfields = []

# Buscar campos objetivos para no molestar en suma
for field in fields:
if field != 'objetivo_zona:sum':
newfields.append(field)
else:
has_field_objetivo = True

res = super(SaleReport, self).read_group(domain, newfields, groupby, offset=offset, limit=limit,
orderby=orderby,
lazy=lazy)

_logger.warning("RES ANTES")
_logger.warning(res)

if has_field_objetivo:
zones = {}
zone_total = 0

# Procesar Campos
for dato in res:
_logger.warning("DATO INDIVIDUAL")
_logger.warning(pformat(dato))

if 'zone_id' in dato:
if dato['zone_id']:
zone_id = dato['zone_id'][0]

if zone_id in zones:
zone = zones[zone_id]
dato['objetivo_zona'] = 0
else:
zone = self.env['x_zonas'].search([('id', '=', dato['zone_id'][0])])
zones[zone_id] = zone
if zone:
dato['objetivo_zona'] = zone.x_studio_objetivos

if zone:
zone_total += zone.x_studio_objetivos

_logger.warning(zone_total)

_logger.warning("RES FINAL")
_logger.warning(res)

return res

def _query(self, with_clause='', fields={}, groupby='', from_clause=''):
fields['zone_id'] = ", partner.x_studio_zona as zone_id"
fields['objetivo_zona'] = ", zone.x_studio_objetivos as objetivo_zona"
#
from_clause = 'left join x_zonas zone on (partner.x_studio_zona = x_zonas.id)'

groupby += ', partner.x_studio_zona'
return super(SaleReport, self)._query(with_clause, fields, groupby, from_clause)

0
Imagine profil
Abandonează
Imagine profil
Jiashun Chen
Autor Cel mai bun răspuns

Anyone suggest an odoo addon that report sale summary. for example, there are dozens sale orders, I want to get the summary list of sale products among these orders, then I can get the total qty of each product.

0
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
Bug trying to remove a table cell using removeParentNode
sale reporting v6
Imagine profil
0
mar. 15
7984
Issue After Migration: Unable to Save Sales Order in v18 Rezolvat
sale
Imagine profil
Imagine profil
1
mai 25
1893
How to set serial numbers for the sale order line
sale
Imagine profil
Imagine profil
Imagine profil
2
feb. 25
10830
Canned reports in Odoo 17 for all the modules
reporting
Imagine profil
Imagine profil
1
nov. 24
2490
Profit and lost account
reporting
Imagine profil
0
aug. 24
2236
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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