Skip to content

[19.0][ADD] purchase_line_sale_history - #3123

Open
alan196 wants to merge 1 commit into
OCA:19.0from
Jarsa-dev:19.0-task-31940
Open

[19.0][ADD] purchase_line_sale_history#3123
alan196 wants to merge 1 commit into
OCA:19.0from
Jarsa-dev:19.0-task-31940

Conversation

@alan196

@alan196 alan196 commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

task#31940

New module that lets purchasers consult the sales history of a product while filling a purchase order, without leaving the order form.

  • Each purchase order line gets a Sales History checkbox; only one line per order can be active at a time (checking one unchecks the rest).
  • When active, a year x month pivot table is rendered below the order lines (OWL widget fed by a computed Json field) with the quantities of that product sold in posted customer invoices, credit notes subtracted.
  • The history is computed on the exact product variant of the line, so variants of the same template are never mixed.
  • The number of past years shown in addition to the current one is configurable in Purchase settings (default: 2).
  • Future months of the current year are shown as a dash, distinct from months with zero sales.

@OCA-git-bot OCA-git-bot added series:19.0 mod:purchase_line_sale_history Module purchase_line_sale_history labels Jul 12, 2026
@alan196
alan196 force-pushed the 19.0-task-31940 branch 4 times, most recently from 42ee64f to 95fdb78 Compare July 15, 2026 00:35
Add a Sales History toggle on purchase order lines that displays, below
the order lines, a year x month pivot table with the quantities of the
line's product sold in posted customer invoices (credit notes subtracted).
Only one line per order can be active at a time (enforced live in the
form via onchange and at API level via create/write), the history is
computed on the exact product variant, and the number of past years shown
is configurable in the purchase settings (default: 2).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:purchase_line_sale_history Module purchase_line_sale_history series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants