Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
7346 Lượt xem

I'm very new in ODOO and I'm trying to import my invoices as a Paid or Open but only import as a Draft. 
How can I import my invoices as a Paid or Open?  

Many Thanks =D

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi, default odoo doesn't give option to import invoice status. So while we import invoices, it will be in draft state. You have to enable the field "State" in import option to import invoice status by code customization. Please refer the following 

    state = fields.Selection([

            ('draft','Draft'),

            ('proforma', 'Pro-forma'),

            ('proforma2', 'Pro-forma'),

            ('open', 'Open'),

            ('paid', 'Paid'),

            ('cancel', 'Cancelled'),

        ], string='Status', index=True, readonly=False, default='draft',

        track_visibility='onchange', copy=False,

        help=" * The 'Draft' status is used when a user is encoding a new and unconfirmed Invoice.\n"

             " * The 'Pro-forma' status is used when the invoice does not have an invoice number.\n"

             " * The 'Open' status is used when user creates invoice, an invoice number is generated. It stays in the open status till the user pays the invoice.\n"

             " * The 'Paid' status is set automatically when the invoice is paid. Its related journal entries may or may not be reconciled.\n"

             " * The 'Cancelled' status is used when user cancel invoice.")


Hope this help you,

Thanks & Regards.

Ảnh đại diện
Huỷ bỏ

Hi,

Where is the menu to access this? Can you show me how can i access this code please?

Thank You

Câu trả lời hay nhất

Good day. There is no menu option to make this change. It is located within a python file in the addons directory.

If you are using windows, for example, the file will be located in the following directory:

"C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\purchase\models\purchase.py"

    state = fields.Selection([
        ('draft', 'RFQ'),
        ('sent', 'RFQ Sent'),
        ('to approve', 'To Approve'),
        ('purchase', 'Purchase Order'),
        ('done', 'Locked'),
        ('cancel', 'Cancelled')
    ], string='Status', readonly=True, index=True, copy=False, default='draft', tracking=True)

The readonly in the last line of code needs to be changed to False.


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 5 25
1420
4
thg 5 25
5100
1
thg 8 24
2385
1
thg 2 24
3134
3
thg 10 23
11202