OCA / l10n-brazil

Localização brasileira oficial do Odoo.
https://odoo-community.org/psc-teams/brazil-66
GNU Affero General Public License v3.0
235 stars 244 forks source link

[14.0][ADD] comments_ids in sale.order #3161

Closed mileo closed 1 month ago

mileo commented 1 month ago

Hoje os comentários de um pedido criado no pedido de venda não são carregados, não sei o que é melhor colocar na tela ou carregar através de algum método da criação / confirmação do documento fiscal.

Hoje é o que ocorre com a natureza da operação.

    @api.onchange("fiscal_operation_id")
    def _onchange_fiscal_operation_id(self):
        if self.fiscal_operation_id:
            self.operation_name = self.fiscal_operation_id.name
            self.comment_ids = self.fiscal_operation_id.comment_ids
    def _document_number(self):
        self.ensure_one()
        if self.issuer == DOCUMENT_ISSUER_COMPANY:
            if self.document_serie_id:
                self.document_serie = self.document_serie_id.code

                if self.document_type == MODELO_FISCAL_NFSE and not self.rps_number:
                    self.rps_number = self.document_serie_id.next_seq_number()

                if (
                    self.document_type != MODELO_FISCAL_NFSE
                    and not self.document_number
                ):
                    self.document_number = self.document_serie_id.next_seq_number()

            if not self.operation_name:
                self.operation_name = ", ".join(
                    [
                        line.name
                        for line in self.fiscal_line_ids.mapped("fiscal_operation_id")
                    ]
                )

            if self.document_electronic and not self.document_key:
                self._generate_key()
OCA-git-bot commented 1 month ago

Hi @renatonlima, some modules you are maintaining are being modified, check this out!

mileo commented 1 month ago

/ocabot merge minor

OCA-git-bot commented 1 month ago

Hey, thanks for contributing! Proceeding to merge this for you. Prepared branch 14.0-ocabot-merge-pr-3161-by-mileo-bump-minor, awaiting test results.

OCA-git-bot commented 1 month ago

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

marcelsavegnago commented 1 month ago

@mileo pode portar para as proximas versões ?