Skip to content

[19.0] [FIX] sale_report_margin: report the purchase price as a unit cost + add other useful columns - #287

Open
ivantodorovich wants to merge 4 commits into
OCA:19.0from
camptocamp:19.0-imp-sale_report_margin-list-view
Open

ivantodorovich wants to merge 4 commits into
OCA:19.0from
camptocamp:19.0-imp-sale_report_margin-list-view

Conversation

@ivantodorovich

Copy link
Copy Markdown

Show purchase price, margin and margin percentage in the sales analysis list view. The purchase price is now the average unit cost converted to the company currency, like the unit price.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @sergio-teruel,
some modules you are maintaining are being modified, check this out!

@OCA-git-bot OCA-git-bot added series:19.0 mod:sale_report_margin Module sale_report_margin labels Sep 17, 2026
@ivantodorovich
ivantodorovich force-pushed the 19.0-imp-sale_report_margin-list-view branch from 87cf180 to 2033e37 Compare September 17, 2026 17:59
@ivantodorovich
ivantodorovich marked this pull request as ready for review September 17, 2026 18:01
@ivantodorovich ivantodorovich changed the title [19.0] [IMP] sale_report_margin: add margin columns to the list view [19.0] [FIX] sale_report_margin: report the purchase price as a unit cost + add other useful columns Sep 17, 2026
@ivantodorovich

Copy link
Copy Markdown
Author

Hello @sergio-teruel , would you mind reviewing this? 🙏🏻

@rrebollo rrebollo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installed on 19.0 and ran the module's tests plus a shell scenario: green; nothing blocks, and the comments are design calls. If you have a moment, we would also appreciate a review of our #257 (the 17.0 sale_margin_delivered_security migration) in return.

ivantodorovich and others added 4 commits November 11, 2026 09:18
The purchase price was a sum of the unit costs of the grouped lines,
without currency conversion. Report it as the average unit cost converted
to the company currency, like the unit price.
Ratio of the margin over the untaxed total of the grouped lines, as an
averaged measure.
Add the purchase price next to the unit price, and the margin and margin
percentage next to the total.
Restrict the purchase price and the margin percentage of the sales
analysis to the product cost readers, like sale_margin_security does for
the margin.
@ivantodorovich
ivantodorovich force-pushed the 19.0-imp-sale_report_margin-list-view branch from 2033e37 to 62175db Compare November 11, 2026 12:22

@rrebollo rrebollo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review. LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:sale_report_margin Module sale_report_margin series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants