Merge pull request #147 from guewen/8-fix-w503

Fix W503 errors
This commit is contained in:
Pedro M. Baeza
2015-02-17 14:00:25 +01:00
2 changed files with 7 additions and 7 deletions

View File

@@ -1305,9 +1305,9 @@ class wizard_update_charts_accounts(orm.TransientModel):
'shortcut': account_template.shortcut,
'note': account_template.note,
'parent_id': (
account_template.parent_id
and account_template_mapping.get(p_id) or
False
account_template_mapping.get(p_id)
if account_template.parent_id
else False
),
'tax_ids': [(6, 0, tax_ids)],
'company_id': wizard.company_id.id,

View File

@@ -42,10 +42,10 @@ class account_invoice(models.Model):
if required by the fiscal position'''
for invoice in self:
if (
invoice.type in ('out_invoice', 'out_refund')
and invoice.fiscal_position
and invoice.fiscal_position.customer_must_have_vat
and not invoice.partner_id.vat):
invoice.type in ('out_invoice', 'out_refund') and
invoice.fiscal_position and
invoice.fiscal_position.customer_must_have_vat and
not invoice.partner_id.vat):
if invoice.type == 'out_invoice':
type_label = _('a Customer Invoice')
else: