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
Migration of account_cutoff modules to 10.0 #41
Conversation
adrienpeiffer
commented
Oct 17, 2016
•
edited
edited
- Forward modification on 9.0 Port account_cutoff_base and account_cutoff_prepaid #37
Extract a new module account_invoice_start_end_dates from account_cutoff_prepaid
Use triple double quotes for docstring Replace <openerp> by <odoo> in XML Remove <data> tags in XML Remove POT files
@@ -0,0 +1,6 @@ | |||
This directory contains eggs that were downloaded by setuptools to build, test, and run plug-ins. |
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 this file?
@@ -0,0 +1 @@ | |||
../../../../account_cutoff_base |
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.
And these?
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.
This is the symlink to the module in the namespace package
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.
But why is this now needed?
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.
I think you should split some big python files into one file per model.
_description = 'Account Cut-off' | ||
|
||
@api.multi | ||
@api.depends('line_ids') |
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.
I think this field should also depend on line_ids.cutoff_amount
.
</record> | ||
</data> | ||
</openerp> | ||
<odoo noupdate="1"> |
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.
Is the change from noupdate="0"
to noupdate="1"
intentional ?
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.
This change is also in the version 9.0.
For me, record rules can be set as no updatable like it's done in Odoo core.
@alexis-via Any comment about this change ?
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.
I agree. This way, you can set in your DB other rule if needed.
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.
Ok, no problem.
I asked because this could have been a typo.
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.
yes, record rules should have noupdate="1"
@api.model | ||
def _get_default_source_journals(self): | ||
res = [] | ||
type = self._context.get('type') |
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.
Please avoid using python's reserved names as variable name.
def _inherit_default_cutoff_account_id(self): | ||
account_id = super(AccountCutoff, self).\ | ||
_inherit_default_cutoff_account_id() | ||
type = self._context.get('type') |
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.
Please avoid using python's reserved names as variable name.
inv = self.inv_model.browse(self.cr, self.uid, inv_id) | ||
self.assertEqual(amount, inv.amount_untaxed) | ||
return inv_id | ||
invoice.signal_workflow('invoice_open') |
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.
The workflow has been removed, you must use invoice.action_invoice_open()
now.
}), | ||
], | ||
}) | ||
invoice.signal_workflow('invoice_open') |
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.
The workflow has been removed, you must use invoice.action_invoice_open()
now.
12a4c63
to
b7429c4
Compare
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.
Code review 👍
Tested functionality using PR OCA/sale-workflow#357
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.
Code 👍
Functional: account_invoice_start_end_dates 👍
Can you squash last 2 commits before merging? |
b7429c4
to
cffcf04
Compare
@pedrobaeza it's done. |
simplify sale order line tree view