Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sale_commission] Commissions are not being settled for invoices duplicated from a settled invoice. #61

Closed
ivantodorovich opened this issue Jan 30, 2016 · 3 comments

Comments

@ivantodorovich
Copy link
Contributor

  1. Create an invoice with agent lines
  2. Settle the invoice from the commissions wizard
  3. Duplicate the invoice
  4. Try to settle de invoice

Result: Invoice is ignored in the settlement.
Expected: Invoice commission should be settled.

This bug won't occur, though, if the invoice is duplicated from a not settled invoice.

I'm guessing the account.invoice.line.agent's settled field is being copied aswell when duplicating an invoice, hence ignoring this invoice line from settlements.

Is there a way to avoid this? a way to reset this field value when duplicating?
I don't know how to do it, yet, at least not without investigating the web for a few hours.

@pedrobaeza
Copy link
Member

You can set copy=False in the field definition to avoid it.

@ivantodorovich
Copy link
Contributor Author

settled = fields.Boolean(compute="_compute_settled", store=True, copy=False)

What about the other account.invoice.line.agent fields, like invoice_line, invoice, invoice_date. Should they be set to copy=False, too?

@pedrobaeza
Copy link
Member

They are automatically linked to the new records, so they are not needed.

pedrobaeza added a commit that referenced this issue Feb 2, 2016
[FIX][8.0][sale_commission] Fixes #61 and #63.
mbcosta pushed a commit to akretion/commission that referenced this issue Apr 11, 2017
etobella pushed a commit to etobella/commission that referenced this issue Oct 17, 2017
aitorbouzas pushed a commit to aitorbouzas/commission that referenced this issue Oct 5, 2018
aitorbouzas pushed a commit to aitorbouzas/commission that referenced this issue Oct 5, 2018
Fix refunds

Fixes OCA#61 and OCA#63.
pedrobaeza pushed a commit to Tecnativa/commission that referenced this issue Dec 14, 2018
pedrobaeza pushed a commit to Tecnativa/commission that referenced this issue Dec 14, 2018
* Show wizards results
* Fix refunds
* Fixes OCA#61
* Fixes OCA#63.
manuelcalerosolis pushed a commit to Tecnativa/commission that referenced this issue Mar 31, 2020
* Show wizards results
* Fix refunds
* Fixes OCA#61
* Fixes OCA#63.
manuelcalerosolis pushed a commit to Tecnativa/commission that referenced this issue Apr 13, 2020
* Show wizards results
* Fix refunds
* Fixes OCA#61
* Fixes OCA#63.
manuelcalerosolis pushed a commit to Tecnativa/commission that referenced this issue Apr 16, 2020
* Show wizards results
* Fix refunds
* Fixes OCA#61
* Fixes OCA#63.
pedrobaeza pushed a commit to Tecnativa/commission that referenced this issue Jul 6, 2020
* Show wizards results
* Fix refunds
* Fixes OCA#61
* Fixes OCA#63.
cjallais pushed a commit to archeti-org/commission that referenced this issue Feb 9, 2021
* Show wizards results
* Fix refunds
* Fixes OCA#61
* Fixes OCA#63.
fredzamoabg pushed a commit to fredzamoabg/commission that referenced this issue May 25, 2021
* Show wizards results
* Fix refunds
* Fixes OCA#61
* Fixes OCA#63.
manuelcalerosolis pushed a commit to xtendoo-corporation/commission that referenced this issue Mar 8, 2022
* Show wizards results
* Fix refunds
* Fixes OCA#61
* Fixes OCA#63.
slominchar pushed a commit to archeti-org/commission that referenced this issue Mar 9, 2022
* Show wizards results
* Fix refunds
* Fixes OCA#61
* Fixes OCA#63.
AungKoKoLin1997 pushed a commit to AungKoKoLin1997/commission that referenced this issue Sep 7, 2022
* Show wizards results
* Fix refunds
* Fixes OCA#61
* Fixes OCA#63.
AungKoKoLin1997 pushed a commit to qrtl/commission that referenced this issue Sep 19, 2022
* Show wizards results
* Fix refunds
* Fixes OCA#61
* Fixes OCA#63.
AungKoKoLin1997 pushed a commit to qrtl/commission that referenced this issue Nov 5, 2022
* Show wizards results
* Fix refunds
* Fixes OCA#61
* Fixes OCA#63.
yostashiro pushed a commit to qrtl/commission that referenced this issue Nov 19, 2022
* Show wizards results
* Fix refunds
* Fixes OCA#61
* Fixes OCA#63.
hildickethan pushed a commit to Studio73/commission that referenced this issue Dec 26, 2022
* Show wizards results
* Fix refunds
* Fixes OCA#61
* Fixes OCA#63.
hildickethan pushed a commit to Studio73/commission that referenced this issue Dec 27, 2022
* Show wizards results
* Fix refunds
* Fixes OCA#61
* Fixes OCA#63.
hildickethan pushed a commit to Studio73/commission that referenced this issue Dec 28, 2022
* Show wizards results
* Fix refunds
* Fixes OCA#61
* Fixes OCA#63.
hildickethan pushed a commit to Studio73/commission that referenced this issue Jan 2, 2023
* Show wizards results
* Fix refunds
* Fixes OCA#61
* Fixes OCA#63.
ambientWave pushed a commit to ambientWave/commission that referenced this issue Jan 19, 2024
* Show wizards results
* Fix refunds
* Fixes OCA#61
* Fixes OCA#63.
Tisho99 pushed a commit to sygel-technology/commission that referenced this issue Apr 30, 2024
* Show wizards results
* Fix refunds
* Fixes OCA#61
* Fixes OCA#63.
Borruso pushed a commit to Borruso/commission that referenced this issue Dec 6, 2024
* Show wizards results
* Fix refunds
* Fixes OCA#61
* Fixes OCA#63.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants