콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
1381 화면


Does anyone know why these codes do not create a button in the print section of account move of odoo16?


Code button:


xml version="1.0" encoding="utf-8"

odoo>

        record id="invoice_report_menu" model="ir.actions.report"

                field name="name" Factura 1 field

                field name="model" account.move field

                field name="report_type" qweb-pdf field

                field name="report_name" facturas_personalizadas.report_facturas_personalizadas field

                field name="report_file" facturas_personalizadas.report_facturas_personalizadas field

                field name="binding_model_id" ref="account.model_account_move" 

                field name="binding_type" report field

        record

odoo



code .py:

from odoo import models, fields, api

from datetime import datetime


class report_invoice(models.AbstractModel):

    _name = 'report.facturas_personalizadas.report_facturas_personalizadas'


@api.model

    def _get_report_values(self, docids, data=None):

        docs = self.env['account.move'].browse(docids)

        return {

            'doc_ids': docs.ids,

            'doc_model': 'account.move',

            'docs': docs,

       }





아바타
취소
베스트 답변

Hi,

The XML template you provided seems correct. If the print button is not visible in the model, please ensure that you have included the XML file in the views section of your manifest file. Additionally, consider upgrading your custom module.


Hope it helps

아바타
취소
베스트 답변

Hello,

please make sure that the xml file name is defined on __manifest__.py

아바타
취소