-
-
Notifications
You must be signed in to change notification settings - Fork 289
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
[14.0][ADD] account_payment_order_inter_company #383
[14.0][ADD] account_payment_order_inter_company #383
Conversation
e53f5ae
to
049c4ee
Compare
|
||
def test_customer_invoice_is_paid_in_company_a(self): | ||
# Confirm the customer invoice in company A | ||
self.invoice_company_a.with_user(self.user_company_a.id).with_context( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Chafique test are good but can you simplify the code between the two test can you create the follwoing method
- "_create_intercompany_customer_invoice"
- "_pay_invoice(invoice, journal, payment_mode"
So you can share code between the two test and make them perfect ?
Also we need two new case.
Creating a supplier invoice in Company B and this will create a customer invoice in company A, then pay it from
- company B supplier invoice
- company A customer invoice
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sebastienbeau , I made the requested changes.
049c4ee
to
8464940
Compare
vals2 = {} | ||
vals = { | ||
"journal_id": journal.id, | ||
"move_id": invoice.id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warning you are adding new line in the invoice move !!
you need to create a new move with all payment line
( | ||
"bank_account_id", | ||
"=", | ||
payment_line.partner_bank_id.id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
match with the partner_bank_id.sanitized_acc_number.
This will solve case where the res.partner.bank are not shared but have the same value.
vals = { | ||
"journal_id": journal.id, | ||
"move_id": invoice.id, | ||
"partner_id": invoice.partner_id.id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not use partner_id !! Use commercial_partner_id !!
"credit": 0.0, | ||
"debit": payment_line.amount_currency, | ||
} | ||
if vals1 and vals2: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too complexe
3ebcf11
to
f921aee
Compare
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
new PR: #516 |
No description provided.