From 5289d46f4b8244e31725283264e23ba0cb66c6a2 Mon Sep 17 00:00:00 2001 From: SHEREEF PT Date: Fri, 5 May 2017 09:24:37 +0530 Subject: [PATCH] [ADD]Validations Added --- fleet_car_workshop/__openerp__.py | 6 +- fleet_car_workshop/models/car_workshop.py | 10 +- .../static/description/index.html | 2 +- .../static/description/index.html~ | 150 ------------------ 4 files changed, 11 insertions(+), 157 deletions(-) delete mode 100644 fleet_car_workshop/static/description/index.html~ diff --git a/fleet_car_workshop/__openerp__.py b/fleet_car_workshop/__openerp__.py index 6bac45996..7ed4d2ba3 100644 --- a/fleet_car_workshop/__openerp__.py +++ b/fleet_car_workshop/__openerp__.py @@ -22,13 +22,13 @@ ############################################################################## { 'name': 'Car Workshop', - 'version': '8.0.1.0.0', + 'version': '8.0.1.1.0', 'summary': 'Vehicle Workshop Operations', 'description': 'Vehicle workshop operations & Its reports', 'category': 'Industries', 'author': 'Cybrosys Techno Solutions', - 'website': "http://www.cybrosys.com", 'company': 'Cybrosys Techno Solutions', + 'website': "http://www.cybrosys.com", 'depends': ['base', 'fleet', 'account_accountant'], @@ -48,5 +48,5 @@ 'license': 'AGPL-3', 'installable': True, 'auto_install': False, - 'application': False, + 'application': True, } diff --git a/fleet_car_workshop/models/car_workshop.py b/fleet_car_workshop/models/car_workshop.py index 946badc8d..48f462d17 100644 --- a/fleet_car_workshop/models/car_workshop.py +++ b/fleet_car_workshop/models/car_workshop.py @@ -56,7 +56,8 @@ class CarWorkshop(models.Model): date_last_stage_update = fields.Datetime(string='Last Stage Update', select=True, copy=False, readonly=True) id = fields.Integer(string='ID', readonly=True) color = fields.Integer(string='Color Index') - company_id = fields.Many2one('res.company', 'Company') + company_id = fields.Many2one('res.company', string='Company', + default=lambda self: self.env['res.company']._company_default_get('car.workshop')) stage_id = fields.Many2one('worksheet.stages', string='Stage', track_visibility='onchange', copy=False) state = fields.Selection([ ('waiting', 'Ready'), @@ -90,8 +91,6 @@ class CarWorkshop(models.Model): 'sequence': 10, 'active': True, 'user_id': lambda obj, cr, uid, ctx=None: uid, - 'company_id': lambda self, cr, uid, ctx=None: self.pool.get('res.company')._company_default_get(cr, uid, 'car.workshop', - context=ctx), 'partner_id': lambda self, cr, uid, ctx=None: self._get_default_vehicle(cr, uid, context=ctx), 'date_start': fields.datetime.now(), } @@ -156,6 +155,11 @@ class CarWorkshop(models.Model): inv_line_obj.create(inv_line_data) for records in self.materials_used: + if records.material.id: + income_account = records.material.property_account_income.id + if not income_account: + raise osv.except_osv(_('UserError!'), _('There is no income account defined ' + 'for this product: "%s".') % (records.material.name,)) inv_line_data = { 'name': records.material.name, diff --git a/fleet_car_workshop/static/description/index.html b/fleet_car_workshop/static/description/index.html index 907de0ca7..5fa3a4618 100644 --- a/fleet_car_workshop/static/description/index.html +++ b/fleet_car_workshop/static/description/index.html @@ -106,7 +106,7 @@ great ease. Keep track of everything, like vehicle owner details,

-

Goto Car Workshop >Confiouration >Settings

+

Goto Car Workshop >Configuration >Settings

diff --git a/fleet_car_workshop/static/description/index.html~ b/fleet_car_workshop/static/description/index.html~ deleted file mode 100644 index c4c6ca52b..000000000 --- a/fleet_car_workshop/static/description/index.html~ +++ /dev/null @@ -1,150 +0,0 @@ -
-
-

Car Workshop Management

-

- -

-Car Workshop Management helps to manage automobile workshop with -great ease. Keep track of everything, like vehicle owner details, - Works assigned, Bill details of service provided, etc..Some other features are as below: -

* User Friendly Interface

-

* Effective Time management

-

* Separate Journal Configuration

-

* Integrated to Accounting to Create Invoices

-

- -
-
- -
-
-
-

Dashboard/All Vehicles

-

Whole Workshop Analysis

-
-
-
- -
-
-
-
- -
-
-

All works

-
-

-

Goto Car Workshop -->Search -->Worksheet

-

Organise all the works according to their Status. Works/Tasks assigned works using the kanban view and - control deadlines in the calendar view.Each Work may have it's own stages. -

-
-
-

Kanban

- - -
-
-

Calendar

- -
-
-
- -
-
-
-

Worksheet View

-

All details related to a work/task

-
-
-
- -
-
-
-
- -
-
-

Time sheet

-
-

-

Goto Car Workshop >Search >Worksheet >Time sheet

-

-

* In time sheet ,Planned work is the sub works related to main Work. By ticking - 'Completed' that work will be automatically updated to Work done.

-

* Work done is the details of completed works.

-

* Hour spent is time taken for completed work(Work Done).

-

* Remaining Hour is total time left(Difference between Total Time and Hour Spent).

-

-
-
- - - -
-
- -
-
-
-

Report

-

Tabular Details of Vehicles

-
-
- -
-
-
-
-
-
-

Settings

-

Configure Preferred journal for Invoicing

-
-
-

-

Goto Car Workshop >Confiouration >Settings

-

-
-
- -
-
-
-
-
-
-
-

Separate Journal

-

Invoices from the car workshop will be saved to separate journal.

-
-
-

-

Goto Car Workshop >Search >Worksheet >Create Invoices

-

-
-
- -
-
-
-
- -
-

Need Any Help?

- - -