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

[8.0][IMP] Partial Payments #104

Closed
wants to merge 13 commits into from
Closed

Conversation

mbcosta
Copy link
Contributor

@mbcosta mbcosta commented Oct 25, 2016

In some cases of use the company make sells with Payment Terms like this two times in 07 and 28 days or three times in 30, 60, 90 days, the commission was paid or with Invoice created or after all Invoice is Paid, I included other option after the first Partial Payments we can create the Settlement with value based in the same percentage was paid. Example:

Total Invoice = 20000
Two Payments = 10000 after 7 days and 10000 after 28 days
Total Commission = 4000

After make the first payment
Total of Settlement need to be = 2000
And after second payment
Total of Settlement need to be = 2000

@mbcosta mbcosta force-pushed the 8.0-partial_payments branch 3 times, most recently from fd156c0 to 9938445 Compare October 29, 2016 17:52
Copy link
Member

@atchuthan atchuthan left a comment

Choose a reason for hiding this comment

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

Code review 👍

@@ -31,7 +31,8 @@
"Daniel Campos <danielcampos@avanzosc.es>",
"Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>",
"Oihane Crucelaegui <oihanecruce@gmail.com>",
"Iván Todorovich <ivan.todorovich@gmail.com",
"Iván Todorovich <ivan.todorovich@gmail.com"
Copy link
Member

Choose a reason for hiding this comment

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

Don't remove comma

@@ -172,8 +179,11 @@ class SettlementLine(models.Model):
comodel_name="res.partner", readonly=True, related="agent_line.agent",
store=True)
settled_amount = fields.Float(
related="agent_line.amount", readonly=True, store=True)
string='Settled Amount', digits_compute=dp.get_precision('Account'))
Copy link
Member

Choose a reason for hiding this comment

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

Why removing this related field?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @pedrobaeza, thank you for review, the reason is the related field has the total value to be paid to commission but now with partial payments this field can't be the same because here the value can be 30%, 50% etc depending the prorportional of what was paid in invoice

@@ -14,7 +15,9 @@ class Settlement(models.Model):
def _default_currency(self):
return self.env.user.company_id.currency_id.id

total = fields.Float(compute="_compute_total", readonly=True, store=True)
total = fields.Float(
compute="_compute_total", readonly=True, store=True,
Copy link
Member

Choose a reason for hiding this comment

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

A compute field is already readonly without inverse function.

effective_date = fields.Date(
string="Effective date",
help="In case of commission type is based in Payments use this date"
" in case of based in Invoice use invoice date.")
Copy link
Member

Choose a reason for hiding this comment

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

Add dots and commas to the redaction of the help.

@mbcosta mbcosta force-pushed the 8.0-partial_payments branch 2 times, most recently from 6264775 to cfd5563 Compare April 11, 2017 17:12
@pedrobaeza
Copy link
Member

There are conflicting files and this is very old. I'm going to close it. If you still see this as needed, please fix the conflicts and open a new PR.

@pedrobaeza pedrobaeza closed this Apr 1, 2018
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

Successfully merging this pull request may close these issues.

None yet

3 participants