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

Migration of account_cutoff modules to 10.0 #41

Merged
merged 5 commits into from Nov 16, 2016

Conversation

adrienpeiffer
Copy link
Contributor

@adrienpeiffer adrienpeiffer commented Oct 17, 2016

alexis-via and others added 4 commits October 17, 2016 11:25
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.
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

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

And these?

Copy link
Contributor Author

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

Copy link
Member

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?

@pedrobaeza pedrobaeza mentioned this pull request Oct 17, 2016
9 tasks
Copy link

@Garamotte Garamotte left a 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')

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

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 ?

Copy link
Contributor Author

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 ?

Copy link
Member

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.

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.

Copy link
Contributor

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')

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')

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')

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')

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.

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 👍
Tested functionality using PR OCA/sale-workflow#357

Copy link
Member

@dvdhinesh dvdhinesh left a 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 👍

@pedrobaeza
Copy link
Member

Can you squash last 2 commits before merging?

@adrienpeiffer
Copy link
Contributor Author

@pedrobaeza it's done.

@pedrobaeza pedrobaeza merged commit ff08456 into OCA:10.0 Nov 16, 2016
Mraimou pushed a commit to camptocamp/account-closing that referenced this pull request Apr 20, 2021
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

6 participants