Skip to content

10.0 contract#40

Merged
pedrobaeza merged 7 commits into
OCA:10.0from
StefanRijnhart:10.0-contract
Dec 5, 2016
Merged

10.0 contract#40
pedrobaeza merged 7 commits into
OCA:10.0from
StefanRijnhart:10.0-contract

Conversation

@StefanRijnhart

Copy link
Copy Markdown
Member

No description provided.

@pedrobaeza

Copy link
Copy Markdown
Member

Travis is failing saying that decimal_precision is not imported. Maybe dependency chain has changed? Can you check it?

@pedrobaeza pedrobaeza mentioned this pull request Nov 12, 2016
8 tasks
@StefanRijnhart

Copy link
Copy Markdown
Member Author

No worries @pedrobaeza. That is why it's work in progress...

@StefanRijnhart StefanRijnhart force-pushed the 10.0-contract branch 3 times, most recently from 096aaef to 3a6d3e9 Compare November 13, 2016 11:48
@StefanRijnhart

Copy link
Copy Markdown
Member Author

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.
Only substantial change is that the sale groups are now no longer available anymore without the sale module, so I transferred the permissions to the accounting groups. Right now, the accounting user groups can only read the analytic invoice line configuration, but maybe they should have all permissions instead?

Comment thread contract/README.rst Outdated
@@ -21,16 +22,27 @@ To use this module, you need to:

#. Go to Sales -> Contracts and select or create a new contract.

@susport susport Nov 17, 2016

Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Member Author

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.

@susport susport left a comment

Copy link
Copy Markdown

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.

@StefanRijnhart

Copy link
Copy Markdown
Member Author

@susport I think being able to invoice retroactively could be useful in some cases so I would rather not implement the check you suggested.

Comment thread contract/__manifest__.py Outdated
{
'name': 'Contracts Management recurring',
'version': '9.0.1.0.0',
'version': '10.0.1.1.0',

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done

if self.date_start and self.recurring_invoices:
self.recurring_next_date = self.date_start

@api.model

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

s/relalive/relative

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done

Comment thread contract/models/contract.py Outdated
# Get other invoice values from partner onchange
invoice._onchange_partner_id()
return invoice._convert_to_write(invoice._cache)
return invoice._convert_to_write(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why changing this?

Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown
Member

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...

@lasley lasley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM thanks @StefanRijnhart

@pedrobaeza

Copy link
Copy Markdown
Member

@StefanRijnhart, can you please squash last 4 commits into one before proceeding to merge?

@StefanRijnhart

Copy link
Copy Markdown
Member Author

Thanks for the reviews. Discovered a bug though.

@pedrobaeza about the squashing, that would remove credits so I'd rather not.

@StefanRijnhart

Copy link
Copy Markdown
Member Author

@pedrobaeza Oh, the last four commits. Will do!

@pedrobaeza

Copy link
Copy Markdown
Member

No, what I want you to do is to squash your migration commits together.

@pedrobaeza

Copy link
Copy Markdown
Member

We have commented at the same time 😉

@lasley lasley mentioned this pull request Nov 30, 2016
1 task

@lasley lasley left a comment

Copy link
Copy Markdown
Contributor

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.

@lasley lasley mentioned this pull request Dec 1, 2016
1 task
@StefanRijnhart

Copy link
Copy Markdown
Member Author

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.

@pedrobaeza

Copy link
Copy Markdown
Member

I'm relief to see that we don't need to introduce a new hack.

@pedrobaeza

Copy link
Copy Markdown
Member

Merging this PR. @lasley, please rebase for your PR about variable_quantity.

@pedrobaeza pedrobaeza merged commit 43636b6 into OCA:10.0 Dec 5, 2016
@rafaelbn

rafaelbn commented May 6, 2017

Copy link
Copy Markdown
Member

I see some changes in the menus, are they intentionally?

2017-05-07_0-55-32

2017-05-07_1-01-53

@StefanRijnhart

Copy link
Copy Markdown
Member Author

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants