-
-
Notifications
You must be signed in to change notification settings - Fork 779
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 Port account_fiscal_position_vat_check #408
10.0 Port account_fiscal_position_vat_check #408
Conversation
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.
A little change to start with a proper version number 😏
|
||
{ | ||
'name': 'Account Fiscal Position VAT Check', | ||
'version': '8.0.0.1.1', | ||
'version': '10.0.0.1.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.
10.0.1.0.0
|
||
@api.multi | ||
def action_move_create(self): | ||
'''Check that the customer has VAT set |
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.
Docstrings uses triple double-quote
|
||
@api.onchange('property_account_position_id') | ||
def fiscal_position_change(self): | ||
'''Warning if the fiscal position requires a VAT number and the |
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.
Double quote
'''Warning if the fiscal position requires a VAT number and the | ||
partner doesn't have one yet''' | ||
fp = self.property_account_position_id | ||
if fp and self.customer and not self.vat: |
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.
You can save one if
putting directly if fp.vat_required
in the first condition
- better version number to start - triple quotes on docstrings - remove one if
"that require the customer to have a VAT number, " | ||
"but the VAT number is missing.") % fp.name | ||
} | ||
if fp and fp.vat_required and self.customer and not self.vat: |
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.
You don't need to check fp
, as fp.vat_required
will be False if fp is an empty recordset, but not blocking.
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 only
[MIG] account_fiscal_position_vat_check: to v10
[MIG] account_fiscal_position_vat_check: to v10
[MIG] account_fiscal_position_vat_check: to v10
[MIG] account_fiscal_position_vat_check: to v10
[MIG] account_fiscal_position_vat_check: to v10
[MIG] account_fiscal_position_vat_check: to v10
[MIG] account_fiscal_position_vat_check: to v10
No description provided.