Skip to Content
Catalog / SAL · Sales / AC product_sales_purchase_summary
AC product_sales_purchase_summary
ac_product_sales_purchase_summary

AC product_sales_purchase_summary

See every sale, purchase, and running stock balance for any product in one list

v19.0.1.0.0 Abdelfatah Mohammad (AlshayebCo) Sales Application

Inherits product product and product template to add a button method that opens the sale purchase report wizard with the product pre-filled. The wizard (sale purchase report wizard) runs a raw SQL query over stock_move_line to derive the opening balance, then searches sales order line and purchase order line within the date range, writes rows into the transient sale purchase report tree (qty_in/qty_out/running balance), and returns a list action filtered to those rows. purchase order line is extended with a stored related category_id and an action_purchase_history method; an inherited Purchase History list plus new pivot/graph/calendar/search views and a menu under purchase menu_procurement_management replace the stock purchase history. Depends on sale_stock and purchase_stock.

Overview

Buyers and inventory managers usually have to jump between sales orders, purchase orders, and stock moves to understand what happened to a single product. This module adds a one-click 'Purchase Sales Summary' button on every product that opens a wizard and builds a unified, date-ranged ledger of all sales and purchase lines for that product, complete with quantities in, quantities out, and a running stock balance that starts from the real opening stock on hand. It also upgrades Odoo's Purchase History into a full list/pivot/graph/calendar report with product-category tracking, rich filters, and a dedicated menu under Purchasing.

Workflow

Sale Purchase Report Wizard

Posted Only
All

Key Features

  • Adds a 'Purchase Sales Summary' button on both the product variant and product template forms.
  • Wizard generates a combined sales-and-purchase transaction ledger for a single product over a chosen date range.
  • Computes a true opening balance from done stock moves before the start date, then a running balance per line.
  • Splits each transaction into quantity in (purchases) and quantity out (sales) with sum totals in the list.
  • Lets you scope the report to confirmed/posted documents only or include all orders.
  • Color-codes the report (green for stock in, red for stock out) and links each row back to its source order.
  • Shows unit price, line total, currency, partner, and unit of measure for every movement.
  • Pulls invoice narration as remarks so notes from related bills/invoices appear inline.
  • Adds a Product Category column and a richer Purchase History report with pivot, graph, and calendar views.
  • Provides an extensive purchase-line search view with date, status, value, product-type, and group-by filters.

Technical Details

Technical Name ac_product_sales_purchase_summary
Version 19.0.1.0.0
License LGPL-3
Domain SAL · Sales

Menu Structure

Purchase History

Security

Two transient report models (the summary wizard and its result lines) grant full read/write/create/delete to all users with no specific group restriction, so anyone who can open a product can run the summary. The Purchase History menu is restricted to users in the Purchasing/Purchase User group.

All users (transient report wizard and result lines, no group set) Purchase User (purchase.group_purchase_user) for the Purchase History menu

Dependencies

sale_stock purchase_stock