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

[12.0][MIG[REF] Split Fiscal Mixin Document in two class Fields and Methods #881

Merged

Conversation

mbcosta
Copy link
Contributor

@mbcosta mbcosta commented May 29, 2020

Split Fiscal Mixin Document in two class Fields and Methods for allow use it in inherit class.

cc @renatonlima @rvalyi @mileo

@mbcosta mbcosta force-pushed the 12.0-split_fields_methods_fiscal_document branch from c6bad04 to 2b4feab Compare May 29, 2020 17:45
for comment_id in self.fiscal_operation_id.comment_ids:
self.comment_ids += comment_id

subsequent_documents = [(6, 0, {})]
Copy link
Member

Choose a reason for hiding this comment

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

Precisa ter um metodo _onchange_fiscal_operation_id no l10n_br_fiscal.document para chamar o super e depois colocar essa parte do código do documento subsequente.

@rvalyi rvalyi mentioned this pull request May 29, 2020
@mbcosta mbcosta force-pushed the 12.0-split_fields_methods_fiscal_document branch from 2b4feab to 9ae3ca3 Compare May 29, 2020 18:22
@renatonlima renatonlima self-requested a review May 29, 2020 19:13
@mbcosta mbcosta force-pushed the 12.0-split_fields_methods_fiscal_document branch from 9ae3ca3 to 2ad8842 Compare May 29, 2020 19:19
from odoo import api, models


class FiscalDocumentMixin(models.AbstractModel):
Copy link
Member

Choose a reason for hiding this comment

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

Tem que mudar o nome dessa class:

Suggested change
class FiscalDocumentMixin(models.AbstractModel):
class FiscalDocumentMixinMethods(models.AbstractModel):

@mbcosta mbcosta force-pushed the 12.0-split_fields_methods_fiscal_document branch from 2ad8842 to de1dc62 Compare May 29, 2020 19:40
@mbcosta
Copy link
Contributor Author

mbcosta commented Jun 2, 2020

Hi @renatonlima @rvalyi thanks for your review, I made the changes

@@ -0,0 +1,83 @@
# Copyright (C) 2019 Renato Lima - Akretion <[email protected]>
Copy link
Member

Choose a reason for hiding this comment

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

@mbcosta Coloca seu nome e 2020

Copy link
Member

Choose a reason for hiding this comment

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

desculpa @hendrixcosta no caso eu nao acho justificado: o Magno apenas cortou uma classe o arquivo em 2 copiando esse meu PR da linha #839 e a mando da gente. Quando alguém alterar uma porção significativa de código a gente nunca teve problema em acrescentar o @author. Porem não eh legal passar a imagem do que qualquer pessoa que alterar 2 linhas num arquivo acrescenta copyrights no projeto, pois vc qdo essas 2 linhas tem mentoria da gente ou que eh fix obvio eh discutivel e vc sabe que infelizmente aqui tem gente que ta para trolar o projeto de querer enfiar o nome dele ou da empresa dele a qualquer custo para fingir que tem algum papel de relevância (e ver o apescto comercial por tras) enquanto nao tem. Eh triste ter gente assim, mas aqui tem, entao a gente tem que ver o examplo que a gente da tb. Pensa que se vc der esse examplo, daqui 2 anos, pode ter gente que altera 5% do codigo dos seus modulos de RH e ja vai querer passar a imagem que fez o mesmo quanto vc e querer se prevalecer do trabalho, de coordenar o projeto e sei la o que... Nos modulos que vc lidera vc pode ate decidir isso, mas eh uma coisa para vc pensar... Ai por examplo o Magno ta trabalhando em migrar os modulos de CNAB ai vc vai ver que ele vai accrescentar os copryrights (que na vdd são da Akretion) e autoria dele sem o menor problema, e ja tem, mas ai eh trabalho significativo.

Copy link
Member

@rvalyi rvalyi left a comment

Choose a reason for hiding this comment

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

The considerations in case of several fiscal documents per invoice could be implemented later as it is a possible new feature. At least care has been taken already so it could be done #894

@OCA OCA deleted a comment from OCA-git-bot Jun 12, 2020
…Fields and Methods for allow use it in inherit class.
@renatonlima renatonlima force-pushed the 12.0-split_fields_methods_fiscal_document branch from de1dc62 to d6c6965 Compare June 12, 2020 21:13
@renatonlima
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 12.0-ocabot-merge-pr-881-by-renatonlima-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit bb1a94b into OCA:12.0 Jun 12, 2020
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 6067b13. Thanks a lot for contributing to OCA. ❤️

mileo pushed a commit to kmee/l10n-brazil that referenced this pull request Mar 2, 2021
Signed-off-by renatonlima
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.

7 participants