Skip to content

[18.0][ADD] project_sale_link#1583

Open
mathben wants to merge 1 commit intoOCA:18.0from
ERPLibre:18.0-project_sale_link
Open

[18.0][ADD] project_sale_link#1583
mathben wants to merge 1 commit intoOCA:18.0from
ERPLibre:18.0-project_sale_link

Conversation

@mathben
Copy link
Copy Markdown
Contributor

@mathben mathben commented Oct 15, 2025

  • copying project_purchase_link and rename purchase to sale

@mathben mathben changed the title [ADD] project_sale_link [18.0][ADD] project_sale_link Oct 15, 2025
@mathben mathben force-pushed the 18.0-project_sale_link branch 7 times, most recently from 0d27c75 to 3310ff0 Compare October 15, 2025 09:10
@mathben mathben changed the title [18.0][ADD] project_sale_link [18.0][WIP][ADD] project_sale_link Oct 15, 2025
@mathben mathben force-pushed the 18.0-project_sale_link branch 2 times, most recently from 4f2c2e7 to a5c3038 Compare October 17, 2025 05:54
@mathben mathben changed the title [18.0][WIP][ADD] project_sale_link [18.0][ADD] project_sale_link Oct 17, 2025
@mathben mathben force-pushed the 18.0-project_sale_link branch 4 times, most recently from 2ed9dcb to a68adfc Compare October 17, 2025 20:57
Copy link
Copy Markdown
Member

@flotho flotho left a comment

Choose a reason for hiding this comment

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

Hi,
LGTM
sucessfully tested on runboat

@mathben
Copy link
Copy Markdown
Contributor Author

mathben commented Dec 6, 2025

ping @carlos-lopez-tecnativa @pedrobaeza
Thanks you!

@pedrobaeza
Copy link
Copy Markdown
Member

Copy from where? Did the previous authors sign the OCA CLA? You should also respect the whole commit history, and rename it from the beginning with:

git filter-branch --tree-filter 'if [ -d <old_module_name> ]; then mv <old_module_name> <new_module_name>; fi' HEAD
git rebase origin/18.0

@mathben
Copy link
Copy Markdown
Contributor Author

mathben commented Dec 9, 2025

Copy from where?

This repository : https://github.com/OCA/project/tree/18.0/project_purchase_link

Did the previous authors sign the OCA CLA?

I didn't check : https://github.com/OCA/project/blob/18.0/project_purchase_link/readme/CONTRIBUTORS.md

You should also respect the whole commit history, and rename it from the beginning with

The history : https://github.com/OCA/project/commits/18.0/project_purchase_link
It's a little hard to copy, the history is already in this repository.
I run your command to test and nothing done (except recommit all history).
Thanks @pedrobaeza

@pedrobaeza
Copy link
Copy Markdown
Member

OK, then it's not a copy, but it's a "brother" module inspired from the other. Isn't this what sale_project do? In any case, it's OK to add it and just mention in the CREDITS.md file that this comes from project_purchase_link.

@leemannd
Copy link
Copy Markdown
Contributor

leemannd commented Dec 9, 2025

Hello, we formerly already had a similar module in 13.0 -> #940

Copy link
Copy Markdown
Contributor

@alexey-pelykh alexey-pelykh left a comment

Choose a reason for hiding this comment

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

The compute methods _compute_sale_info and _compute_sale_invoice_info multiply price_subtotal * count which double-counts amounts since read_group already returns the sum -- the purchase sibling correctly just sums group["price_subtotal"]. Also, _domain_sale_invoice does not filter on move_type, so the invoice count mixes vendor bills with customer invoices. Finally, per @pedrobaeza's suggestion, CREDITS.md should mention this module is inspired by project_purchase_link.

Comment thread project_sale_link/models/project_project.py
Comment thread project_sale_link/models/project_project.py
Comment thread project_sale_link/models/project_project.py
Comment thread project_sale_link/__manifest__.py Outdated
@mathben
Copy link
Copy Markdown
Contributor Author

mathben commented Apr 17, 2026

@alexey-pelykh thanks for your review, I apply your suggestion. I change type of sale_line_total from integer to monetary.
Because I copied the module project_purchase_link, we have the same bug in this module too.
https://github.com/OCA/project/blob/18.0/project_purchase_link/models/project_project.py#L121

@pedrobaeza CREDITS.md added

@leemannd is really similar with module version 13, I didn't test.

Thanks

@mathben mathben force-pushed the 18.0-project_sale_link branch from 1deb333 to 428ea18 Compare April 17, 2026 06:02
- copying project_purchase_link and rename purchase to sale
@mathben mathben force-pushed the 18.0-project_sale_link branch from 428ea18 to 82c4445 Compare April 17, 2026 06:18
@pedrobaeza pedrobaeza added this to the 18.0 milestone Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:project_sale_link Module project_sale_link series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants