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

[11.0][MIG] l10n_nl_tax_invoice_basis #122

Merged
merged 2 commits into from
Jan 16, 2018

Conversation

astirpe
Copy link
Member

@astirpe astirpe commented Nov 25, 2017

Port of l10n_nl_tax_invoice_basis to v11

@astirpe astirpe force-pushed the 11_mig_l10n_nl_tax_invoice_basis branch from 31ba563 to 93c1e2a Compare December 7, 2017 09:21
@hbrunn hbrunn added this to the 11.0 milestone Dec 11, 2017
return [
('company_id', '=', domain_params['company_id']),
'|',
] + tax_date_domain + date_domain
Copy link
Member

Choose a reason for hiding this comment

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

I like using expression.AND / expression.OR in such cases, but I won't block on this

Copy link

Choose a reason for hiding this comment

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

@astirpe Should we merge it or do you want to change the line with the remark?

Copy link
Member Author

Choose a reason for hiding this comment

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

I would prefer to keep this part of code as it is.

to_date,
company_id
)
if not self._context.get('skip_invoice_basis_domain'):
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't you check here if your flag on the company is set too?

Copy link
Member

Choose a reason for hiding this comment

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

and for stopping condition, I always recommend

if $stopping_condition:
    return $result

because then you save a level of indentation, and it's clearer what's going on imho

Copy link
Member

Choose a reason for hiding this comment

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

so #122 (comment) is my only real request for change, the rest take or leave as you prefer

Copy link
Member Author

Choose a reason for hiding this comment

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

With latest commit I just return if the stopping_condition is true.

The idea to keep two separate checks, one for the 'skip_invoice_basis_domain' in the context and the other for the country, is that:
if 'skip_invoice_basis_domain' is defined in the context, I skip the next check: the browse of the company and the subsequent check on its country. The intention is to save a prefetch call by the ORM, in case the context already triggered the stop condition.

@melroy89
Copy link

melroy89 commented Jan 8, 2018

@pedrobaeza Please merge.

@pedrobaeza
Copy link
Member

Sorry, but this is as localization repository and I shouldn't do that task as general community coordinator, being very country specific and not being able to have an opinion on this. There are several PSC members that can do that if appropriated.

@hbrunn
Copy link
Member

hbrunn commented Jan 10, 2018

@astirpe can you fix the conflict? then i'll merge

@hbrunn
Copy link
Member

hbrunn commented Jan 10, 2018

PS: while being at it, please squash your v11 commits

@astirpe
Copy link
Member Author

astirpe commented Jan 10, 2018

@hbrunn I probably made a mistake: I used the Github interface to resolve the conflicts and now I got a merge with branch 11.0. This causes a lot of unwanted commits in my commits history, see https://github.com/onesteinbv/l10n-netherlands/commits/11_mig_l10n_nl_tax_invoice_basis. Is there a way to revert the merge?

@hbrunn
Copy link
Member

hbrunn commented Jan 10, 2018

hmmm, I never really used github's edit functions, save for some typos. What I'd do is to squash the commits locally and force push

@astirpe astirpe force-pushed the 11_mig_l10n_nl_tax_invoice_basis branch from f2ac0b2 to cd79b89 Compare January 10, 2018 09:01
@astirpe
Copy link
Member Author

astirpe commented Jan 10, 2018

It seems it's ok now, may I ask you to double check?

@melroy89
Copy link

LGTM, lets merge it?

@hbrunn hbrunn merged commit b9f000d into OCA:11.0 Jan 16, 2018
@astirpe astirpe deleted the 11_mig_l10n_nl_tax_invoice_basis branch January 16, 2018 06:18
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.

4 participants