Browse Source

[FIX] *: track_visibility=* -> tracking=True

pull/186/head
Miquel Raïch 4 years ago
parent
commit
81d04f80ff
  1. 2
      base_account_budget/models/account_budget.py
  2. 2
      employee_orientation/models/employee_orientation.py
  3. 2
      employee_orientation/models/employee_training.py
  4. 2
      employee_orientation/models/orientation_checklist_request.py
  5. 2
      employee_stages/models/employee_stages.py
  6. 10
      fleet_rental/models/car_rental.py
  7. 2
      front_office_management/models/fo_property_counter.py
  8. 4
      front_office_management/models/fo_visit.py
  9. 2
      invoice_stock_move/models/invoice_stock.py
  10. 4
      laundry_management/models/laundry.py
  11. 2
      medical_lab_management/models/lab_appointment.py
  12. 2
      medical_lab_management/models/lab_request.py
  13. 2
      mobile_service_shop/models/mobile_service.py
  14. 2
      sale_discount_total/models/account_invoice.py
  15. 2
      sale_discount_total/models/discount_approval.py
  16. 8
      sale_discount_total/models/sale.py
  17. 2
      theme_diva/models/configuration.py

2
base_account_budget/models/account_budget.py

@ -71,7 +71,7 @@ class Budget(models.Model):
('confirm', 'Confirmed'), ('confirm', 'Confirmed'),
('validate', 'Validated'), ('validate', 'Validated'),
('done', 'Done') ('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', budget_line = fields.One2many('budget.lines', 'budget_id', 'Budget Lines',
states={'done': [('readonly', True)]}, copy=True) states={'done': [('readonly', True)]}, copy=True)
company_id = fields.Many2one('res.company', 'Company', required=True, company_id = fields.Many2one('res.company', 'Company', required=True,

2
employee_orientation/models/employee_orientation.py

@ -48,7 +48,7 @@ class Orientation(models.Model):
('confirm', 'Confirmed'), ('confirm', 'Confirmed'),
('cancel', 'Canceled'), ('cancel', 'Canceled'),
('complete', 'Completed'), ('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): def confirm_orientation(self):
self.write({'state': 'confirm'}) self.write({'state': 'confirm'})

2
employee_orientation/models/employee_training.py

@ -54,7 +54,7 @@ class EmployeeTraining(models.Model):
('cancel', 'Canceled'), ('cancel', 'Canceled'),
('complete', 'Completed'), ('complete', 'Completed'),
('print', 'Print'), ('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') @api.onchange('program_department')
def employee_details(self): def employee_details(self):

2
employee_orientation/models/orientation_checklist_request.py

@ -47,7 +47,7 @@ class OrientationChecklistRequest(models.Model):
('new', 'New'), ('new', 'New'),
('cancel', 'Cancel'), ('cancel', 'Cancel'),
('complete', 'Completed'), ('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): def confirm_send_mail(self):
self.ensure_one() self.ensure_one()

2
employee_stages/models/employee_stages.py

@ -103,7 +103,7 @@ class EmployeeFormInherit(models.Model):
('notice_period', 'Notice Period'), ('notice_period', 'Notice Period'),
('relieved', 'Resigned'), ('relieved', 'Resigned'),
('terminate', 'Terminated')], string='Status', default='joined', ('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") help="Employee Stages.\nSlap On: Joined\nGrounding: Training\nTest period : Probation")
stages_history = fields.One2many('hr.employee.status.history', 'employee_id', string='Stage History', stages_history = fields.One2many('hr.employee.status.history', 'employee_id', string='Stage History',
help='It shows the duration and history of each stages') help='It shows the duration and history of each stages')

10
fleet_rental/models/car_rental.py

@ -64,13 +64,13 @@ class CarRentalContract(models.Model):
default='#FFFFFF', readonly=True) default='#FFFFFF', readonly=True)
cost = fields.Float(string="Rent Cost", help="This fields is to determine the cost of rent", required=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()), 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", rent_end_date = fields.Date(string="Rent End Date", required=True, help="End date of contract",
track_visibility='onchange') tracking=True)
state = fields.Selection( state = fields.Selection(
[('draft', 'Draft'), ('reserved', 'Reserved'), ('running', 'Running'), ('cancel', 'Cancel'), [('draft', 'Draft'), ('reserved', 'Reserved'), ('running', 'Running'), ('cancel', 'Cancel'),
('checking', 'Checking'), ('invoice', 'Invoice'), ('done', 'Done')], string="State", ('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") notes = fields.Text(string="Details & Notes")
cost_generated = fields.Float(string='Recurring Cost', cost_generated = fields.Float(string='Recurring Cost',
help="Costs paid at regular intervals, depending on the cost frequency") 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', first_payment = fields.Float(string='First Payment',
help="Transaction/Office/Contract charge amount, must paid by customer side other " help="Transaction/Office/Contract charge amount, must paid by customer side other "
"than recurrent payments", "than recurrent payments",
track_visibility='onchange', tracking=True,
required=True) required=True)
first_payment_inv = fields.Many2one('account.move', copy=False) first_payment_inv = fields.Many2one('account.move', copy=False)
first_invoice_created = fields.Boolean(string="First Invoice Created", invisible=True, 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) invoice_count = fields.Integer(compute='_invoice_count', string='# Invoice', copy=False)
check_verify = fields.Boolean(compute='check_action_verify', 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, sales_person = fields.Many2one('res.users', string='Sales Person', default=lambda self: self.env.uid,
track_visibility='always') tracking=True)
def action_run(self): def action_run(self):
self.state = 'running' self.state = 'running'

2
front_office_management/models/fo_property_counter.py

@ -19,7 +19,7 @@ class VisitDetails(models.Model):
('prop_in', 'Taken In'), ('prop_in', 'Taken In'),
('prop_out', 'Taken out'), ('prop_out', 'Taken out'),
('cancel', 'Cancelled'), ('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""' 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""') 'when he/she leave office change the state to ""Taken out""')

4
front_office_management/models/fo_visit.py

@ -27,7 +27,7 @@ class VisitDetails(models.Model):
('check_in', 'Checked In'), ('check_in', 'Checked In'),
('check_out', 'Checked Out'), ('check_out', 'Checked Out'),
('cancel', 'Cancelled'), ('cancel', 'Cancelled'),
], track_visibility='onchange', default='draft') ], tracking=True, default='draft')
@api.model @api.model
def create(self, vals): def create(self, vals):
@ -73,7 +73,7 @@ class PersonalBelongings(models.Model):
('0', 'Allowed'), ('0', 'Allowed'),
('1', 'Not Allowed'), ('1', 'Not Allowed'),
('2', 'Allowed With Permission'), ('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') @api.depends('belongings_id_fov_visitor', 'belongings_id_fov_employee')
def get_number(self): def get_number(self):

2
invoice_stock_move/models/invoice_stock.py

@ -54,7 +54,7 @@ class InvoiceStockMove(models.Model):
('cancel', 'Cancelled'), ('cancel', 'Cancelled'),
('done', 'Received'), ('done', 'Received'),
], string='Status', index=True, readonly=True, default='draft', ], string='Status', index=True, readonly=True, default='draft',
track_visibility='onchange', copy=False) tracking=True, copy=False)
def action_stock_move(self): def action_stock_move(self):
if not self.picking_type_id: if not self.picking_type_id:

4
laundry_management/models/laundry.py

@ -187,7 +187,7 @@ class LaundryManagement(models.Model):
'order': [('readonly', False)]}, 'order': [('readonly', False)]},
required=True, required=True,
change_default=True, index=True, change_default=True, index=True,
track_visibility='always') tracking=True)
partner_invoice_id = fields.Many2one('res.partner', partner_invoice_id = fields.Many2one('res.partner',
string='Invoice Address', string='Invoice Address',
readonly=True, required=True, readonly=True, required=True,
@ -220,7 +220,7 @@ class LaundryManagement(models.Model):
('return', 'Returned'), ('return', 'Returned'),
('cancel', 'Cancelled'), ('cancel', 'Cancelled'),
], string='Status', readonly=True, copy=False, index=True, ], string='Status', readonly=True, copy=False, index=True,
track_visibility='onchange', default='draft') tracking=True, default='draft')
class LaundryManagementLine(models.Model): class LaundryManagementLine(models.Model):

2
medical_lab_management/models/lab_appointment.py

@ -54,7 +54,7 @@ class Appointment(models.Model):
('to_invoice', 'To Invoice'), ('to_invoice', 'To Invoice'),
('invoiced', 'Done'), ('invoiced', 'Done'),
('cancel', 'Cancelled'), ('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([ priority = fields.Selection([

2
medical_lab_management/models/lab_request.py

@ -47,7 +47,7 @@ class LabRequest(models.Model):
('completed', 'Completed'), ('completed', 'Completed'),
('cancel', 'Cancelled'), ('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 @api.model
def create(self, vals): def create(self, vals):

2
mobile_service_shop/models/mobile_service.py

@ -65,7 +65,7 @@ class MobileServiceShop(models.Model):
service_state = fields.Selection([('draft', 'Draft'), ('assigned', 'Assigned'), service_state = fields.Selection([('draft', 'Draft'), ('assigned', 'Assigned'),
('completed', 'Completed'), ('returned', 'Returned'), ('completed', 'Completed'), ('returned', 'Returned'),
('not_solved', 'Not solved')], ('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') complaints_tree = fields.One2many('mobile.complaint.tree', 'complaint_id', string='Complaints Tree')

2
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, discount_rate = fields.Float('Discount Amount', digits=(16, 2), readonly=True,
states={'draft': [('readonly', False)]}) states={'draft': [('readonly', False)]})
amount_discount = fields.Monetary(string='Discount', store=True, readonly=True, compute='_compute_amount', 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') @api.onchange('discount_type', 'discount_rate', 'invoice_line_ids')
def supply_rate(self): def supply_rate(self):

2
sale_discount_total/models/discount_approval.py

@ -33,7 +33,7 @@ class sale_discount(models.Model):
('sale', 'Sales Order'), ('sale', 'Sales Order'),
('done', 'Locked'), ('done', 'Locked'),
('cancel', 'Cancelled'), ('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): def action_confirm(self):

8
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'), discount_rate = fields.Float('Discount Rate', digits=dp.get_precision('Account'),
readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}) readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]})
amount_untaxed = fields.Monetary(string='Untaxed Amount', store=True, readonly=True, compute='_amount_all', 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', 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', 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', 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') @api.onchange('discount_type', 'discount_rate', 'order_line')
def supply_rate(self): def supply_rate(self):

2
theme_diva/models/configuration.py

@ -54,5 +54,5 @@ class WebsiteProductFeatured(models.Model):
string="Featured List", string="Featured List",
default=_default_featured_list) default=_default_featured_list)
user_id = fields.Many2one('res.users', string="Person Responsible", user_id = fields.Many2one('res.users', string="Person Responsible",
track_visibility='onchange', tracking=True,
default=lambda self: self.env.uid) default=lambda self: self.env.uid)

Loading…
Cancel
Save