diff --git a/base_account_budget/models/account_budget.py b/base_account_budget/models/account_budget.py index ab9674d24..59a68b193 100644 --- a/base_account_budget/models/account_budget.py +++ b/base_account_budget/models/account_budget.py @@ -71,7 +71,7 @@ class Budget(models.Model): ('confirm', 'Confirmed'), ('validate', 'Validated'), ('done', 'Done') - ], 'Status', default='draft', index=True, required=True, readonly=True, copy=False, track_visibility='always') + ], 'Status', default='draft', index=True, required=True, readonly=True, copy=False, tracking=True) budget_line = fields.One2many('budget.lines', 'budget_id', 'Budget Lines', states={'done': [('readonly', True)]}, copy=True) company_id = fields.Many2one('res.company', 'Company', required=True, diff --git a/employee_orientation/models/employee_orientation.py b/employee_orientation/models/employee_orientation.py index be6196bac..4fac1c6b1 100644 --- a/employee_orientation/models/employee_orientation.py +++ b/employee_orientation/models/employee_orientation.py @@ -48,7 +48,7 @@ class Orientation(models.Model): ('confirm', 'Confirmed'), ('cancel', 'Canceled'), ('complete', 'Completed'), - ], string='Status', readonly=True, copy=False, index=True, track_visibility='onchange', default='draft') + ], string='Status', readonly=True, copy=False, index=True, tracking=True, default='draft') def confirm_orientation(self): self.write({'state': 'confirm'}) diff --git a/employee_orientation/models/employee_training.py b/employee_orientation/models/employee_training.py index ebd5affe4..33dc7210e 100644 --- a/employee_orientation/models/employee_training.py +++ b/employee_orientation/models/employee_training.py @@ -54,7 +54,7 @@ class EmployeeTraining(models.Model): ('cancel', 'Canceled'), ('complete', 'Completed'), ('print', 'Print'), - ], string='Status', readonly=True, copy=False, index=True, track_visibility='onchange', default='new') + ], string='Status', readonly=True, copy=False, index=True, tracking=True, default='new') @api.onchange('program_department') def employee_details(self): diff --git a/employee_orientation/models/orientation_checklist_request.py b/employee_orientation/models/orientation_checklist_request.py index 5fd12f82d..57027acee 100644 --- a/employee_orientation/models/orientation_checklist_request.py +++ b/employee_orientation/models/orientation_checklist_request.py @@ -47,7 +47,7 @@ class OrientationChecklistRequest(models.Model): ('new', 'New'), ('cancel', 'Cancel'), ('complete', 'Completed'), - ], string='Status', readonly=True, copy=False, index=True, track_visibility='onchange', default='new') + ], string='Status', readonly=True, copy=False, index=True, tracking=True, default='new') def confirm_send_mail(self): self.ensure_one() diff --git a/employee_stages/models/employee_stages.py b/employee_stages/models/employee_stages.py index 9a2b7e69e..d9397fe23 100755 --- a/employee_stages/models/employee_stages.py +++ b/employee_stages/models/employee_stages.py @@ -103,7 +103,7 @@ class EmployeeFormInherit(models.Model): ('notice_period', 'Notice Period'), ('relieved', 'Resigned'), ('terminate', 'Terminated')], string='Status', default='joined', - track_visibility='always', copy=False, + tracking=True, copy=False, help="Employee Stages.\nSlap On: Joined\nGrounding: Training\nTest period : Probation") stages_history = fields.One2many('hr.employee.status.history', 'employee_id', string='Stage History', help='It shows the duration and history of each stages') diff --git a/fleet_rental/models/car_rental.py b/fleet_rental/models/car_rental.py index 77ff4dd33..c1c0bee9f 100755 --- a/fleet_rental/models/car_rental.py +++ b/fleet_rental/models/car_rental.py @@ -64,13 +64,13 @@ class CarRentalContract(models.Model): default='#FFFFFF', readonly=True) cost = fields.Float(string="Rent Cost", help="This fields is to determine the cost of rent", required=True) rent_start_date = fields.Date(string="Rent Start Date", required=True, default=str(date.today()), - help="Start date of contract", track_visibility='onchange') + help="Start date of contract", tracking=True) rent_end_date = fields.Date(string="Rent End Date", required=True, help="End date of contract", - track_visibility='onchange') + tracking=True) state = fields.Selection( [('draft', 'Draft'), ('reserved', 'Reserved'), ('running', 'Running'), ('cancel', 'Cancel'), ('checking', 'Checking'), ('invoice', 'Invoice'), ('done', 'Done')], string="State", - default="draft", copy=False, track_visibility='onchange') + default="draft", copy=False, tracking=True) notes = fields.Text(string="Details & Notes") cost_generated = fields.Float(string='Recurring Cost', help="Costs paid at regular intervals, depending on the cost frequency") @@ -86,7 +86,7 @@ class CarRentalContract(models.Model): first_payment = fields.Float(string='First Payment', help="Transaction/Office/Contract charge amount, must paid by customer side other " "than recurrent payments", - track_visibility='onchange', + tracking=True, required=True) first_payment_inv = fields.Many2one('account.move', copy=False) first_invoice_created = fields.Boolean(string="First Invoice Created", invisible=True, copy=False) @@ -107,7 +107,7 @@ class CarRentalContract(models.Model): invoice_count = fields.Integer(compute='_invoice_count', string='# Invoice', copy=False) check_verify = fields.Boolean(compute='check_action_verify', copy=False) sales_person = fields.Many2one('res.users', string='Sales Person', default=lambda self: self.env.uid, - track_visibility='always') + tracking=True) def action_run(self): self.state = 'running' diff --git a/front_office_management/models/fo_property_counter.py b/front_office_management/models/fo_property_counter.py index 7d8983a16..46cb5ae30 100644 --- a/front_office_management/models/fo_property_counter.py +++ b/front_office_management/models/fo_property_counter.py @@ -19,7 +19,7 @@ class VisitDetails(models.Model): ('prop_in', 'Taken In'), ('prop_out', 'Taken out'), ('cancel', 'Cancelled'), - ], track_visibility='onchange', default='draft', + ], tracking=True, default='draft', help='If the employee taken the belongings to the company change state to ""Taken In""' 'when he/she leave office change the state to ""Taken out""') diff --git a/front_office_management/models/fo_visit.py b/front_office_management/models/fo_visit.py index 7eb18c188..fd65befe2 100644 --- a/front_office_management/models/fo_visit.py +++ b/front_office_management/models/fo_visit.py @@ -27,7 +27,7 @@ class VisitDetails(models.Model): ('check_in', 'Checked In'), ('check_out', 'Checked Out'), ('cancel', 'Cancelled'), - ], track_visibility='onchange', default='draft') + ], tracking=True, default='draft') @api.model def create(self, vals): @@ -73,7 +73,7 @@ class PersonalBelongings(models.Model): ('0', 'Allowed'), ('1', 'Not Allowed'), ('2', 'Allowed With Permission'), - ], 'Permission', required=True, index=True, default='0', track_visibility='onchange') + ], 'Permission', required=True, index=True, default='0') @api.depends('belongings_id_fov_visitor', 'belongings_id_fov_employee') def get_number(self): diff --git a/invoice_stock_move/models/invoice_stock.py b/invoice_stock_move/models/invoice_stock.py index 3d5ca5ea7..b314e7ade 100644 --- a/invoice_stock_move/models/invoice_stock.py +++ b/invoice_stock_move/models/invoice_stock.py @@ -54,7 +54,7 @@ class InvoiceStockMove(models.Model): ('cancel', 'Cancelled'), ('done', 'Received'), ], string='Status', index=True, readonly=True, default='draft', - track_visibility='onchange', copy=False) + tracking=True, copy=False) def action_stock_move(self): if not self.picking_type_id: diff --git a/laundry_management/models/laundry.py b/laundry_management/models/laundry.py index 7822671e3..54c91518c 100755 --- a/laundry_management/models/laundry.py +++ b/laundry_management/models/laundry.py @@ -187,7 +187,7 @@ class LaundryManagement(models.Model): 'order': [('readonly', False)]}, required=True, change_default=True, index=True, - track_visibility='always') + tracking=True) partner_invoice_id = fields.Many2one('res.partner', string='Invoice Address', readonly=True, required=True, @@ -220,7 +220,7 @@ class LaundryManagement(models.Model): ('return', 'Returned'), ('cancel', 'Cancelled'), ], string='Status', readonly=True, copy=False, index=True, - track_visibility='onchange', default='draft') + tracking=True, default='draft') class LaundryManagementLine(models.Model): diff --git a/medical_lab_management/models/lab_appointment.py b/medical_lab_management/models/lab_appointment.py index a4c76ff28..05c6a40ca 100644 --- a/medical_lab_management/models/lab_appointment.py +++ b/medical_lab_management/models/lab_appointment.py @@ -54,7 +54,7 @@ class Appointment(models.Model): ('to_invoice', 'To Invoice'), ('invoiced', 'Done'), ('cancel', 'Cancelled'), - ], string='Status', readonly=True, copy=False, index=True, track_visibility='onchange', default='draft', + ], string='Status', readonly=True, copy=False, index=True, tracking=True, default='draft', ) priority = fields.Selection([ diff --git a/medical_lab_management/models/lab_request.py b/medical_lab_management/models/lab_request.py index f0867e0be..cab0dc00f 100644 --- a/medical_lab_management/models/lab_request.py +++ b/medical_lab_management/models/lab_request.py @@ -47,7 +47,7 @@ class LabRequest(models.Model): ('completed', 'Completed'), ('cancel', 'Cancelled'), - ], string='Status', readonly=True, copy=False, index=True, track_visibility='onchange', default='draft') + ], string='Status', readonly=True, copy=False, index=True, tracking=True, default='draft') @api.model def create(self, vals): diff --git a/mobile_service_shop/models/mobile_service.py b/mobile_service_shop/models/mobile_service.py index 6ecca2ef0..b769019e4 100644 --- a/mobile_service_shop/models/mobile_service.py +++ b/mobile_service_shop/models/mobile_service.py @@ -65,7 +65,7 @@ class MobileServiceShop(models.Model): service_state = fields.Selection([('draft', 'Draft'), ('assigned', 'Assigned'), ('completed', 'Completed'), ('returned', 'Returned'), ('not_solved', 'Not solved')], - string='Service Status', default='draft', track_visibility='always') + string='Service Status', default='draft', tracking=True) complaints_tree = fields.One2many('mobile.complaint.tree', 'complaint_id', string='Complaints Tree') diff --git a/sale_discount_total/models/account_invoice.py b/sale_discount_total/models/account_invoice.py index 971600e3b..73c0aaf26 100644 --- a/sale_discount_total/models/account_invoice.py +++ b/sale_discount_total/models/account_invoice.py @@ -141,7 +141,7 @@ class AccountInvoice(models.Model): discount_rate = fields.Float('Discount Amount', digits=(16, 2), readonly=True, states={'draft': [('readonly', False)]}) amount_discount = fields.Monetary(string='Discount', store=True, readonly=True, compute='_compute_amount', - track_visibility='always') + tracking=True) @api.onchange('discount_type', 'discount_rate', 'invoice_line_ids') def supply_rate(self): diff --git a/sale_discount_total/models/discount_approval.py b/sale_discount_total/models/discount_approval.py index 160d6ecb4..0dd09e410 100644 --- a/sale_discount_total/models/discount_approval.py +++ b/sale_discount_total/models/discount_approval.py @@ -33,7 +33,7 @@ class sale_discount(models.Model): ('sale', 'Sales Order'), ('done', 'Locked'), ('cancel', 'Cancelled'), - ], string='Status', readonly=True, copy=False, index=True, track_visibility='onchange', default='draft') + ], string='Status', readonly=True, copy=False, index=True, tracking=True, default='draft') def action_confirm(self): diff --git a/sale_discount_total/models/sale.py b/sale_discount_total/models/sale.py index 76cbc8cf5..df571a81a 100644 --- a/sale_discount_total/models/sale.py +++ b/sale_discount_total/models/sale.py @@ -52,13 +52,13 @@ class SaleOrder(models.Model): discount_rate = fields.Float('Discount Rate', digits=dp.get_precision('Account'), readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}) amount_untaxed = fields.Monetary(string='Untaxed Amount', store=True, readonly=True, compute='_amount_all', - track_visibility='always') + tracking=True) amount_tax = fields.Monetary(string='Taxes', store=True, readonly=True, compute='_amount_all', - track_visibility='always') + tracking=True) amount_total = fields.Monetary(string='Total', store=True, readonly=True, compute='_amount_all', - track_visibility='always') + tracking=True) amount_discount = fields.Monetary(string='Discount', store=True, readonly=True, compute='_amount_all', - digits=dp.get_precision('Account'), track_visibility='always') + digits=dp.get_precision('Account'), tracking=True) @api.onchange('discount_type', 'discount_rate', 'order_line') def supply_rate(self): diff --git a/theme_diva/models/configuration.py b/theme_diva/models/configuration.py index 3f6eec03e..3df9cd0d4 100644 --- a/theme_diva/models/configuration.py +++ b/theme_diva/models/configuration.py @@ -54,5 +54,5 @@ class WebsiteProductFeatured(models.Model): string="Featured List", default=_default_featured_list) user_id = fields.Many2one('res.users', string="Person Responsible", - track_visibility='onchange', + tracking=True, default=lambda self: self.env.uid)