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

I'm trying to modify expense report ( view_hr_expense_sheet_form ). There is a table at the bottom in which users can add expenses but also include previously created expenses that weren't send to the manger yet - I don't want that.

User should only be permitted to add completely new records, without ability to choose existing expenses.

This is how this field is declared inside Odoo:

    nolabel="1" 
    widget="many2many"
    domain="[('state', '=', 'draft'), ('employee_id', '=', employee_id), ('company_id', '=', company_id)]"
    options="{'reload_on_button': True}"
    context="{'form_view_ref' : 'hr_expense.hr_expense_view_form_without_header', 'default_company_id': company_id, 'default_employee_id': employee_id}">                                                                  
            
...

How can I archive this?

Other option would be, to only show records that are not assigned to any other existing sheet if that way it would be easier.



Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 8 22
3354
1
thg 3 25
2415
1
thg 9 24
2079
1
thg 5 23
2718
2
thg 4 23
8343