-
-
Notifications
You must be signed in to change notification settings - Fork 511
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
10.0 contract #40
10.0 contract #40
Conversation
[IMP] contract: Add pre-paid invoicing type. Fix yearly
Travis is failing saying that |
No worries @pedrobaeza. That is why it's work in progress... |
096aaef
to
3a6d3e9
Compare
Now ready for review. Because the 10.0 branch had not received any changes I simply merged in the latest changes of 9.0. I hope that is alright. |
@@ -21,16 +22,27 @@ To use this module, you need to: | |||
|
|||
#. Go to Sales -> Contracts and select or create a new contract. |
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.
Contracts menu is not in Sales, it is in Invoicing menu.
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.
Thanks, I have realigned this description with reality.
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.
Validate that Date of Next Invoice is greater than the current date.
@susport I think being able to invoice retroactively could be useful in some cases so I would rather not implement the check you suggested. |
e477f72
to
f82548b
Compare
@@ -5,19 +5,19 @@ | |||
|
|||
{ | |||
'name': 'Contracts Management recurring', | |||
'version': '9.0.1.0.0', | |||
'version': '10.0.1.1.0', |
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.
10.0.1.0.0, as the first 10.0 version
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.
Done
@@ -145,11 +155,34 @@ def _onchange_recurring_invoices(self): | |||
self.recurring_next_date = self.date_start | |||
|
|||
@api.model | |||
def get_relalive_delta(self, recurring_rule_type, interval): |
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.
s/relalive/relative
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.
Done
}) | ||
# Get other invoice values from partner onchange | ||
invoice._onchange_partner_id() | ||
return invoice._convert_to_write(invoice._cache) | ||
return invoice._convert_to_write( | ||
{name: invoice[name] for name in invoice._cache}) |
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.
Why changing this?
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.
Because in the case of empty values for many2one records, the cache contains an empty tuple instead of an empty recordset. The invoice record contains the correct value.
Before I added this change, this line broke the test. I took the modification from the Odoo core addons where it is used in several places.
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.
Uhm, that's something ugly that doesn't happen on v9. Another hack to take into account...
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.
LGTM thanks @StefanRijnhart
@StefanRijnhart, can you please squash last 4 commits into one before proceeding to merge? |
Thanks for the reviews. Discovered a bug though. @pedrobaeza about the squashing, that would remove credits so I'd rather not. |
@pedrobaeza Oh, the last four commits. Will do! |
No, what I want you to do is to squash your migration commits together. |
We have commented at the same time 😉 |
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.
contract_variable_quantity
is included here, but not installable.
d5744a0
to
6292acc
Compare
Ready for merging, rebased and all. The bug I experienced was related to another call to convert_to_write. However, the problem with this method was fixed upstream in odoo/odoo@51680426, so I could revert my changes to this call. |
I'm relief to see that we don't need to introduce a new hack. |
Merging this PR. @lasley, please rebase for your PR about variable_quantity. |
@rafaelbn Yes, sale menus are no longer available in Odoo 10.0 without the additional dependency on the sale module so I moved the menus to the accounting menu |
No description provided.