diff --git a/gender_contact/README.rst b/gender_contact/README.rst new file mode 100755 index 000000000..2cafc6bfc --- /dev/null +++ b/gender_contact/README.rst @@ -0,0 +1,32 @@ +Gender in Contacts v11 +=========================== +This module will helps you to give the gender details for your contact + +Features +======== + +* Gender for Contacts. + +Tech +==== +* [Python] - Models +* [XML] - Odoo views + +Installation +============ +- www.odoo.com/documentation/11.0/setup/install.html +- Install our custom addon + +Bug Tracker +=========== +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + + +Developer: Tintuk Tomin @ cybrosys, odoo@cybrosys.com + +Maintainer +---------- + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com. diff --git a/gender_contact/__init__.py b/gender_contact/__init__.py new file mode 100644 index 000000000..5305644df --- /dev/null +++ b/gender_contact/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import models \ No newline at end of file diff --git a/gender_contact/__manifest__.py b/gender_contact/__manifest__.py new file mode 100755 index 000000000..66e76af3a --- /dev/null +++ b/gender_contact/__manifest__.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2018-TODAY Cybrosys Technologies(). +# Author: Tintuk Tomin() +# you can modify it under the terms of the GNU AGPL (v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AGPL (AGPL v3) for more details. +# +############################################################################## + +{ + 'name': 'Gender in Contacts', + 'version': '12.0.1.0.0', + 'summary': """This module will helps you to give gender details for your contact.""", + 'description': "Module helps you to manage the gender information of your partner as well as in the contacts.", + 'category': "Human Resource", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base','contacts'], + 'data': ['security/ir.model.access.csv', + 'views/gender_view.xml' + ], + 'demo': [], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'application': True, +} diff --git a/gender_contact/doc/RELEASE_NOTES.md b/gender_contact/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..5f23f059d --- /dev/null +++ b/gender_contact/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 09.04.2019 +#### Version 12.0.1.0.0 +##### ADD +- Initial commit diff --git a/gender_contact/models/__init__.py b/gender_contact/models/__init__.py new file mode 100644 index 000000000..10c516040 --- /dev/null +++ b/gender_contact/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import gender diff --git a/gender_contact/models/gender.py b/gender_contact/models/gender.py new file mode 100644 index 000000000..052948d89 --- /dev/null +++ b/gender_contact/models/gender.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- + +from odoo import api, models, fields + +class FirstNameLastName(models.Model): + _inherit = 'res.partner' + + gender = fields.Selection([ ('male', 'Male'), + ('female', 'female'), + ('other', 'Others')], + string='Gender') diff --git a/gender_contact/security/ir.model.access.csv b/gender_contact/security/ir.model.access.csv new file mode 100644 index 000000000..5446e734d --- /dev/null +++ b/gender_contact/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink +res_partner_user_id,res.partner.user.gender,model_res_partner,base.group_user,1,1,1,1 +res_partner_manager_id,res.partner.manager.gender,model_res_partner,hr.group_hr_manager,1,1,1,1 diff --git a/gender_contact/static/description/banner.png b/gender_contact/static/description/banner.png new file mode 100644 index 000000000..340dc92c0 Binary files /dev/null and b/gender_contact/static/description/banner.png differ diff --git a/gender_contact/static/description/gender-partner-cybrosys.png b/gender_contact/static/description/gender-partner-cybrosys.png new file mode 100644 index 000000000..df8c759ea Binary files /dev/null and b/gender_contact/static/description/gender-partner-cybrosys.png differ diff --git a/gender_contact/static/description/icon.png b/gender_contact/static/description/icon.png new file mode 100644 index 000000000..0c257bdd3 Binary files /dev/null and b/gender_contact/static/description/icon.png differ diff --git a/gender_contact/static/description/index.html b/gender_contact/static/description/index.html new file mode 100644 index 000000000..15bdf9dc9 --- /dev/null +++ b/gender_contact/static/description/index.html @@ -0,0 +1,329 @@ +
+
+

+ Gender for Contacts +

+

+ Provides option for gender in Contacts +

+
+ Cybrosys Technologies +
+ +
+ cybrosys technologies
+
+
+
+
+
+

+ Overview +

+

+ Provides option to add gender for all contacts including partners. +

+
+
+

+ Configuration +

+

+ No additional configuration is required. +

+
+
+ +
+
+

+ Features +

+

+ + Gender details +

+
+
+ +
+
+

+ Screenshots +

+

+ + Provision for gender in all contacts +

+
+ +
+
+
+ +
+
+ cybrosys technologies +
+
+ +
+
+

+ Our Services +

+
+ + + +
+ +
+ + + +
+

+ + Odoo Support +

+ +
+ +
+
+
+
+
+

+ Our Industries +

+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Trading + +

+

+ Easily procure and sell your products. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Manufacturing +

+

+ Plan, track and schedule your operations. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Restaurant +

+

+ Run your bar or restaurant methodical. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + POS +

+

+ Easy configuring and convivial selling. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + E-commerce & Website +

+

+ Mobile friendly, awe-inspiring product pages. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Hotel Management +

+

+ An all-inclusive hotel management application. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Education +

+

+ A Collaborative platform for educational management. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Service Management +

+

+ Keep track of services and invoice accordingly. +

+
+
+
+
+
+
+ +
diff --git a/gender_contact/views/gender_view.xml b/gender_contact/views/gender_view.xml new file mode 100644 index 000000000..8a1dff0b2 --- /dev/null +++ b/gender_contact/views/gender_view.xml @@ -0,0 +1,18 @@ + + + + + res.partner.simplified.form.gender + res.partner + + + + + + + + + \ No newline at end of file diff --git a/mobile_service_shop/README.rst b/mobile_service_shop/README.rst new file mode 100644 index 000000000..a92d32547 --- /dev/null +++ b/mobile_service_shop/README.rst @@ -0,0 +1,42 @@ +Mobile Service Manager v12 +=================== +Module for mobile service shop daily activities + +Features +======== +* Service request creation. +* Assigning service request to technicians. +* Mobile service ticket generation. +* Service status tracking. +* Integrated with accounting and sales module. +* Access Rights From Multiple Level. +* Mobile complaint templates. +* Invoice for parts usage and service charges. +* Email notifications to customer. +* Parts inventory. + +Installation +============ + - www.odoo.com/documentation/12.0/setup/install.html + - Install our custom addon + - You need 'report_xlsx' module in order to get XLSX report. + - Install 'report_xlsx' from https://apps.odoo.com/apps/modules/11.0/report_xlsx/ + +Configuration +============= + + No additional configurations needed + +Bug Tracker +=========== +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Developer: (v11 $ v12) Milind Mohan @ cybrosys, Contact: odoo@cybrosys.com + +Maintainer +---------- + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com. + diff --git a/mobile_service_shop/__init__.py b/mobile_service_shop/__init__.py new file mode 100644 index 000000000..35e7c9600 --- /dev/null +++ b/mobile_service_shop/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- + +from . import models +from . import wizard diff --git a/mobile_service_shop/__manifest__.py b/mobile_service_shop/__manifest__.py new file mode 100644 index 000000000..3c2c41132 --- /dev/null +++ b/mobile_service_shop/__manifest__.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2018-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# you can modify it under the terms of the GNU AGPL (v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AGPL (AGPL v3) for more details. +# +############################################################################## +{ + 'name': 'Mobile Service Manager', + 'version': '12.0.1.0.0', + 'summary': 'Module for managing mobile service shop daily activities.', + 'category': 'Industries', + 'author': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['stock_account', 'mail', 'product', 'account'], + 'data': ['security/security.xml', + 'security/ir.model.access.csv', + 'views/mobile_service_views.xml', + 'wizard/mobile_create_invoice_views.xml', + 'reports/mobile_service_ticket.xml', + 'reports/service_ticket_template.xml', + 'data/mobile_service_data.xml', + 'data/mobile_service_email_template.xml'], + 'image': ['static/description/banner.jpg'], + 'installable': True, + 'application': True, + 'auto_install': False, + 'license': 'AGPL-3', +} \ No newline at end of file diff --git a/mobile_service_shop/data/mobile_service_data.xml b/mobile_service_shop/data/mobile_service_data.xml new file mode 100644 index 000000000..27e3edf1f --- /dev/null +++ b/mobile_service_shop/data/mobile_service_data.xml @@ -0,0 +1,24 @@ + + + + + + Mobile Service + sale + SERV + TRUE + + + Mobile Service Charge + service + order + + + Mobile Service Advance + service + order + + + + + \ No newline at end of file diff --git a/mobile_service_shop/data/mobile_service_email_template.xml b/mobile_service_shop/data/mobile_service_email_template.xml new file mode 100644 index 000000000..99e7894a4 --- /dev/null +++ b/mobile_service_shop/data/mobile_service_email_template.xml @@ -0,0 +1,24 @@ + + + + + + + Service Status Email + + ${(object.user_id.email |safe} + ${object.person_name.email |safe} + Ref ${object.name or 'n/a' } + + ${object.person_name.lang} + Dear ${object.person_name.name},

+

Your service request for ${object.brand_name.brand_name or 'n/a' } (${object.model_name.mobile_brand_models or 'n/a' }) with reference no ${object.name or 'n/a' } has been processed to ${object.service_state or 'n/a' } stage.

+

If you have any questions, please let us know.

+

Best regards,

]]> +
+
+ +
+ +
\ No newline at end of file diff --git a/mobile_service_shop/doc/RELEASE_NOTES.md b/mobile_service_shop/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..c4fb2164f --- /dev/null +++ b/mobile_service_shop/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 09.04.2019 +#### Version 12.0.1.0.0 +##### ADD +- Initial commit diff --git a/mobile_service_shop/models/__init__.py b/mobile_service_shop/models/__init__.py new file mode 100644 index 000000000..1a966dda6 --- /dev/null +++ b/mobile_service_shop/models/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- + +from . import mobile_service +from . import service_ticket diff --git a/mobile_service_shop/models/mobile_service.py b/mobile_service_shop/models/mobile_service.py new file mode 100644 index 000000000..3f812d288 --- /dev/null +++ b/mobile_service_shop/models/mobile_service.py @@ -0,0 +1,446 @@ +from datetime import datetime, date, timedelta +from odoo import models, fields, api, _ +from odoo.exceptions import Warning, UserError +import pytz + + +class MobileServiceShop(models.Model): + + _name = 'mobile.service' + _rec_name = 'name' + _inherit = ['mail.thread', 'mail.activity.mixin'] + + name = fields.Char(string='Code', copy=False, default="New") + person_name = fields.Many2one('res.partner', string="Customer Name", required=True, + domain="[('customer','=','True')]") + contact_no = fields.Char(related='person_name.mobile', string="Contact Number") + email_id = fields.Char(related='person_name.email', string="Email") + + street = fields.Char(related='person_name.street', string="Address") + street2 = fields.Char(related='person_name.street2', string="Address") + city = fields.Char(related='person_name.city', string="Address") + state_id = fields.Many2one(related='person_name.state_id', string="Address") + zip = fields.Char(related='person_name.zip', string="Address") + country_id = fields.Many2one(related='person_name.country_id', string="Address") + + brand_name = fields.Many2one('mobile.brand', string="Mobile Brand", required=True) + is_in_warranty = fields.Boolean( + 'In Warranty', default=False, + help="Specify if the product is in warranty.") + + warranty_number = fields.Char(string="Warranty No ", help="warranty details") + + re_repair = fields.Boolean( + 'Re-repair', default=False, + help="Re-repairing.") + + imei_no = fields.Char(string="IMEI Number") + + model_name = fields.Many2one('brand.model', string="Model",required=True, domain="[('mobile_brand_name','=',brand_name)]") + image_medium = fields.Binary(related='model_name.image_medium', store=True, attachment=True) + date_request = fields.Date(string="Requested date", default=fields.Date.context_today) + return_date = fields.Date(string="Return date", required=True) + technicion_name = fields.Many2one('res.users', string="Technician Name", + default=lambda self: self.env.user, required=True) + service_state = fields.Selection([('draft', 'Draft'), ('assigned', 'Assigned'), + ('completed', 'Completed'), ('returned', 'Returned'), + ('not_solved', 'Not solved')], + string='Service Status', default='draft', track_visibility='always') + + complaints_tree = fields.One2many('mobile.complaint.tree', 'complaint_id', string='Complaints Tree') + + product_order_line = fields.One2many('product.order.line', 'product_order_id', string='Parts Order Lines') + + internal_notes = fields.Text(string="Internal notes") + invoice_count = fields.Integer(compute='_invoice_count', string='# Invoice', copy=False) + invoice_ids = fields.Many2many("account.invoice", string='Invoices', compute="_get_invoiced", readonly=True, copy=False) + + first_payment_inv = fields.Many2one('account.invoice', copy=False) + + first_invoice_created = fields.Boolean(string="First Invoice Created", invisible=True, copy=False) + + journal_type = fields.Many2one('account.journal', 'Journal', invisible=True, + default=lambda self: self.env['account.journal'].search([('code', '=', 'SERV')])) + account_type = fields.Many2one('account.account', 'Account', invisible=True, + default=lambda self: self.env['account.account'].search([('code', '=', 200110)])) + + @api.model + def _default_picking_transfer(self): + type_obj = self.env['stock.picking.type'] + company_id = self.env.context.get('company_id') or self.env.user.company_id.id + types = type_obj.search([('code', '=', 'outgoing'), ('warehouse_id.company_id', '=', company_id)], limit=1) + if not types: + types = type_obj.search([('code', '=', 'outgoing'), ('warehouse_id', '=', False)]) + return types[:4] + + stock_picking_id = fields.Many2one('stock.picking', string="Picking Id") + + picking_transfer_id = fields.Many2one('stock.picking.type', 'Deliver To', required=True, + default=_default_picking_transfer, + help="This will determine picking type of outgoing shipment") + + @api.onchange('return_date') + def check_date(self): + if self.return_date != False: + return_date_string = datetime.strptime(str(self.return_date), "%Y-%m-%d") + request_date_string = datetime.strptime(str(self.date_request), "%Y-%m-%d") + if return_date_string < request_date_string: + raise UserError("Return date should be greater than requested date") + + @api.multi + def approve(self): + self.service_state = 'assigned' + + @api.multi + def complete(self): + self.service_state = 'completed' + + @api.multi + def return_to(self): + self.service_state = 'returned' + + @api.multi + def not_solved(self): + self.service_state = 'not_solved' + + @api.multi + def action_send_mail(self): + ''' + This function opens a window to compose an email, with the edi sale template message loaded by default + ''' + self.ensure_one() + ir_model_data = self.env['ir.model.data'] + try: + template_id = ir_model_data.get_object_reference('mobile_service_shop', 'email_template_mobile_service')[1] + except ValueError: + template_id = False + try: + compose_form_id = ir_model_data.get_object_reference('mail', 'email_compose_message_wizard_form')[1] + except ValueError: + compose_form_id = False + ctx = { + 'default_model': 'mobile.service', + 'default_res_id': self.ids[0], + 'default_use_template': bool(template_id), + 'default_template_id': template_id, + 'default_composition_mode': 'comment', + } + return { + 'name': _('Compose Email'), + 'type': 'ir.actions.act_window', + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'mail.compose.message', + 'views': [(compose_form_id, 'form')], + 'view_id': compose_form_id, + 'target': 'new', + 'context': ctx, + } + + @api.multi + def return_advance(self): + inv_obj = self.env['account.invoice'].search([('origin', '=', self.name)]) + inv_ids = [] + for each in inv_obj: + inv_ids.append(each.id) + view_id = self.env.ref('account.invoice_form').id + if inv_ids: + if len(inv_ids) <= 1: + value = { + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'account.invoice', + 'view_id': view_id, + 'type': 'ir.actions.act_window', + 'name': 'Invoice', + 'res_id': inv_ids and inv_ids[0] + } + else: + value = { + 'domain': str([('id', 'in', inv_ids)]), + 'view_type': 'form', + 'view_mode': 'tree,form', + 'res_model': 'account.invoice', + 'view_id': False, + 'type': 'ir.actions.act_window', + 'name': 'Invoice', + 'res_id': inv_ids + } + + return value + else: + raise UserError("No invoice created") + + @api.multi + def _invoice_count(self): + invoice_ids = self.env['account.invoice'].search([('origin', '=', self.name)]) + self.invoice_count = len(invoice_ids) + + @api.model + def create(self, vals): + vals['name'] = self.env['ir.sequence'].next_by_code('mobile.service') + vals['service_state'] = 'draft' + return super(MobileServiceShop, self).create(vals) + + @api.multi + def unlink(self): + for i in self: + if i.service_state != 'draft': + raise UserError(_('You cannot delete an assigned service request')) + return super(MobileServiceShop, i).unlink() + + @api.multi + def action_invoice_create_wizard(self): + + return { + 'name': _('Create Invoice'), + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'mobile.invoice', + 'type': 'ir.actions.act_window', + 'target': 'new' + } + + @api.multi + def action_post_stock(self): + flag = 0 + for order in self.product_order_line: + if order.product_uom_qty > order.qty_stock_move: + flag = 1 + pick = { + 'picking_type_id': self.picking_transfer_id.id, + 'partner_id': self.person_name.id, + 'origin': self.name, + 'location_dest_id': self.person_name.property_stock_customer.id, + 'location_id': self.picking_transfer_id.default_location_src_id.id, + } + + picking = self.env['stock.picking'].create(pick) + self.stock_picking_id = picking.id + self.picking_count = len(picking) + moves = order.filtered( + lambda r: r.product_id.type in ['product', 'consu'])._create_stock_moves_transfer(picking) + move_ids = moves._action_confirm() + move_ids._action_assign() + if order.product_uom_qty < order.qty_stock_move: + raise UserError(_('Used quantity is less than quantity stock move posted. ')) + if flag != 1: + raise UserError(_('Nothing to post stock move')) + + @api.multi + def action_view_invoice(self): + inv_obj = self.env['account.invoice'].search([('origin', '=', self.name)]) + inv_ids = [] + for each in inv_obj: + inv_ids.append(each.id) + view_id = self.env.ref('account.invoice_form').id + + if inv_ids: + if len(inv_ids) <= 1: + value = { + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'account.invoice', + 'view_id': view_id, + 'type': 'ir.actions.act_window', + 'name': 'Invoice', + 'res_id': inv_ids and inv_ids[0] + } + else: + value = { + 'domain': str([('id', 'in', inv_ids)]), + 'view_type': 'form', + 'view_mode': 'tree,form', + 'res_model': 'account.invoice', + 'view_id': False, + 'type': 'ir.actions.act_window', + 'name': 'Invoice', + 'res_id': inv_ids + } + + return value + + @api.multi + def get_ticket(self): + self.ensure_one() + user = self.env['res.users'].browse(self.env.uid) + if user.tz: + tz = pytz.timezone(user.tz) + time = pytz.utc.localize(datetime.now()).astimezone(tz) + date_today = time.strftime("%Y-%m-%d %H:%M %p") + else: + date_today = datetime.strftime(datetime.now(), "%Y-%m-%d %I:%M:%S %p") + complaint_text = "" + description_text = "" + complaint_id = self.env['mobile.complaint.tree'].search([('complaint_id', '=', self.id)]) + if complaint_id: + for obj in complaint_id: + complaint = obj.complaint_type_tree + description = obj.description_tree + complaint_text = complaint.complaint_type + ", " + complaint_text + if description.description: + description_text = description.description + ", " + description_text + else: + for obj in complaint_id: + complaint = obj.complaint_type_tree + complaint_text = complaint.complaint_type + ", " + complaint_text + data = { + 'ids': self.ids, + 'model': self._name, + 'date_today': date_today, + 'date_request': self.date_request, + 'date_return': self.return_date, + 'sev_id': self.name, + 'warranty': self.is_in_warranty, + 'customer_name': self.person_name.name, + 'imei_no': self.imei_no, + 'technician': self.technicion_name.name, + 'complaint_types': complaint_text, + 'complaint_description': description_text, + 'mobile_brand': self.brand_name.brand_name, + 'model_name': self.model_name.mobile_brand_models, + + + } + return self.env.ref('mobile_service_shop.mobile_service_ticket').report_action(self, data=data) + + +class MobileBrand(models.Model): + + _name = 'mobile.brand' + _rec_name = 'brand_name' + + brand_name = fields.Char(string="Mobile Brand", required=True) + + +class MobileComplaintType(models.Model): + + _name = 'mobile.complaint' + _rec_name = 'complaint_type' + + complaint_type = fields.Char(string="Complaint Type", required=True) + + +class MobileComplaintTypeTemplate(models.Model): + + _name = 'mobile.complaint.description' + _rec_name = 'description' + + complaint_type_template = fields.Many2one('mobile.complaint', string="Complaint Type Template", required=True) + description = fields.Text(string="Complaint Description") + + +class MobileComplaintTree(models.Model): + + _name = 'mobile.complaint.tree' + _rec_name = 'complaint_type_tree' + + complaint_id = fields.Many2one('mobile.service') + + complaint_type_tree = fields.Many2one('mobile.complaint', string="Category", required=True) + description_tree = fields.Many2one('mobile.complaint.description', string="Description", + domain="[('complaint_type_template','=',complaint_type_tree)]") + + +class MobileBrandModels(models.Model): + + _name = 'brand.model' + _rec_name = 'mobile_brand_models' + + mobile_brand_name = fields.Many2one('mobile.brand', string="Mobile Brand", required=True) + mobile_brand_models = fields.Char(string="Model Name", required=True) + image_medium = fields.Binary(string='image', store=True, attachment=True) + + +class MobileServiceTermsAndConditions(models.Model): + + _name = 'terms.conditions' + _rec_name = 'terms_id' + + terms_id = fields.Char(String="Terms and condition", compute="_find_id") + terms_conditions = fields.Text(string="Terms and Conditions") + + def _find_id(self): + self.terms_id = self.id or '' + + +class ProductProduct(models.Model): + _inherit = 'product.template' + + is_a_parts = fields.Boolean( + 'Is a Mobile Part', default=False, + help="Specify if the product is a mobile part or not.") + + brand_name = fields.Many2one('mobile.brand', String="Brand", help="Select a mobile brand for the part") + model_name = fields.Many2one('brand.model', String="Model Name", domain="[('mobile_brand_name','=',brand_name)]", + help="Select a model for the part") + model_colour = fields.Char(string="Colour", help="colour for the part") + extra_descriptions = fields.Text(string="Note") + + +class ProductOrderLine(models.Model): + _name = 'product.order.line' + + product_order_id = fields.Many2one('mobile.service') + + product_id = fields.Many2one('product.product', string='Product', + domain="[('is_a_parts','=', True)]") + product_uom_qty = fields.Float(string='Used Quantity', default=1.0) + price_unit = fields.Float(string='Unit Price', default=0.0) + qty_invoiced = fields.Float(string='Invoiced qty', readonly=True) + qty_stock_move = fields.Float(string='Stock Move Posted Qty', readonly=True) + part_price = fields.Char(compute='_compute_amount', string='Price', readonly=True, store=True) + product_uom = fields.Char(string='Unit of Measure') + + @api.onchange('product_id') + def change_prod(self): + self.ensure_one() + if self.product_id: + product_template_obj = self.product_id.product_tmpl_id + self.price_unit = product_template_obj.list_price + self.product_uom = product_template_obj.uom_id.name + + @api.depends('product_uom_qty', 'product_id') + def _compute_amount(self): + """ + Compute the amount + """ + for line in self: + price = line.price_unit * line.product_uom_qty + + line.update({ + 'part_price': price, + }) + + def _create_stock_moves_transfer(self, picking): + moves = self.env['stock.move'] + done = self.env['stock.move'].browse() + if self.product_id.product_tmpl_id.type != 'service': + price_unit = self.price_unit + template = { + 'name': self.product_id.product_tmpl_id.name or '', + 'product_id': self.product_id.id, + 'product_uom': self.product_id.product_tmpl_id.uom_id.id, + 'location_id': picking.picking_type_id.default_location_src_id.id, + 'location_dest_id': self.product_order_id.person_name.property_stock_customer.id, + 'picking_id': picking.id, + 'move_dest_id': False, + 'state': 'draft', + 'company_id': self.product_order_id.account_type.company_id.id, + 'price_unit': price_unit, + 'picking_type_id': picking.picking_type_id.id, + 'procurement_id': False, + 'route_ids': 1 and [ + (6, 0, [x.id for x in self.env['stock.location.route'].search([('id', 'in', (2, 3))])])] or [], + 'warehouse_id': picking.picking_type_id.warehouse_id.id, + } + qty = self.product_uom_qty - self.qty_stock_move + diff_quantity = qty + tmp = template.copy() + tmp.update({ + 'product_uom_qty': diff_quantity, + }) + template['product_uom_qty'] = diff_quantity + done += moves.create(template) + self.qty_stock_move = self.qty_stock_move + qty + return done diff --git a/mobile_service_shop/models/service_ticket.py b/mobile_service_shop/models/service_ticket.py new file mode 100755 index 000000000..fa7d8dbc2 --- /dev/null +++ b/mobile_service_shop/models/service_ticket.py @@ -0,0 +1,26 @@ +from odoo import models, api + + +class StockMoveReport(models.AbstractModel): + + _name = 'report.mobile_service_shop.mobile_service_ticket_template' + + @api.model + def _get_report_values(self, docids, data): + terms = self.env['terms.conditions'].search([]) + return { + 'date_today': data['date_today'], + 'date_request': data['date_request'], + 'date_return': data['date_return'], + 'sev_id': data['sev_id'], + 'imei_no': data['imei_no'], + 'technician': data['technician'], + 'complaint_types': data['complaint_types'], + 'complaint_description': data['complaint_description'], + 'mobile_brand': data['mobile_brand'], + 'model_name': data['model_name'], + 'customer_name': data['customer_name'], + 'warranty': data['warranty'], + 'terms': terms, + } + diff --git a/mobile_service_shop/reports/mobile_service_ticket.xml b/mobile_service_shop/reports/mobile_service_ticket.xml new file mode 100644 index 000000000..e249cddd9 --- /dev/null +++ b/mobile_service_shop/reports/mobile_service_ticket.xml @@ -0,0 +1,12 @@ + + + + \ No newline at end of file diff --git a/mobile_service_shop/reports/service_ticket_template.xml b/mobile_service_shop/reports/service_ticket_template.xml new file mode 100644 index 000000000..455afbaf7 --- /dev/null +++ b/mobile_service_shop/reports/service_ticket_template.xml @@ -0,0 +1,83 @@ + + + + + \ No newline at end of file diff --git a/mobile_service_shop/security/ir.model.access.csv b/mobile_service_shop/security/ir.model.access.csv new file mode 100644 index 000000000..ca693432e --- /dev/null +++ b/mobile_service_shop/security/ir.model.access.csv @@ -0,0 +1,15 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_mobile_service_shop_mobile_service_shop,access.mobile_service_shop.mobile_service_shop,model_mobile_service,mobile_service_group_executer,1,1,0,0 +access_mobile_service_shop_mobile_service_shop11,access.mobile_service_shop.mobile_service_shop11,model_mobile_complaint,mobile_service_group_executer,1,0,0,0 +access_mobile_service_shop_mobile_service_shop22,access.mobile_service_shop.mobile_service_shop22,model_mobile_service,mobile_service_group_manager,1,1,1,1 +access_mobile_service_shop_mobile_service_shop33,access.mobile_service_shop.mobile_service_shop33,model_mobile_brand,mobile_service_group_manager,1,1,1,1 +access_mobile_service_shop_mobile_service_shop44,access.mobile_service_shop.mobile_service_shop44,model_brand_model,mobile_service_group_manager,1,1,1,1 +access_mobile_service_shop_mobile_service_shop66,access.mobile_service_shop.mobile_service_shop66,model_mobile_complaint,mobile_service_group_manager,1,1,1,1 +access_mobile_service_shop_mobile_service_shop88,access.mobile_service_shop.mobile_service_shop88,model_product_template,mobile_service_group_manager,1,1,1,1 +access_mobile_service_shop_mobile_service_shop99,access.mobile_service_shop.mobile_service_shop99,model_mobile_complaint_tree,mobile_service_group_executer,1,1,1,0 +access_mobile_service_shop_mobile_service_shop111,access.mobile_service_shop.mobile_service_shop111,model_mobile_complaint_description,mobile_service_group_manager,1,1,1,1 +access_mobile_service_shop_mobile_service_shop112,access.mobile_service_shop.mobile_service_shop112,model_terms_conditions,mobile_service_group_manager,1,1,1,1 +access_mobile_service_shop_mobile_service_shop113,access.mobile_service_shop.mobile_service_shop113,model_mobile_complaint_tree,mobile_service_group_manager,1,1,1,1 +access_mobile_service_shop_mobile_service_shop114,access.mobile_service_shop.mobile_service_shop114,model_mobile_complaint_description,mobile_service_group_executer,1,1,0,0 +access_mobile_service_shop_mobile_service_shop115,access.mobile_service_shop.mobile_service_shop115,model_product_order_line,mobile_service_group_executer,1,1,1,1 +access_mobile_service_shop_mobile_service_shop116,access.mobile_service_shop.mobile_service_shop116,model_mobile_invoice,mobile_service_group_manager,1,1,1,1 diff --git a/mobile_service_shop/security/security.xml b/mobile_service_shop/security/security.xml new file mode 100755 index 000000000..095b78a84 --- /dev/null +++ b/mobile_service_shop/security/security.xml @@ -0,0 +1,36 @@ + + + + + Mobile Service + 5 + + + + Mobile Technician + + + + + + Manager + + + + + + + Mobile Service rule + + [('technicion_name','=',user.id),('service_state','!=','draft')] + + + + + Mobile Service Manager rule + + [] + + + + \ No newline at end of file diff --git a/mobile_service_shop/static/description/banner.jpg b/mobile_service_shop/static/description/banner.jpg new file mode 100644 index 000000000..ec9544838 Binary files /dev/null and b/mobile_service_shop/static/description/banner.jpg differ diff --git a/mobile_service_shop/static/description/icon.png b/mobile_service_shop/static/description/icon.png new file mode 100644 index 000000000..2725a213f Binary files /dev/null and b/mobile_service_shop/static/description/icon.png differ diff --git a/mobile_service_shop/static/description/index.html b/mobile_service_shop/static/description/index.html new file mode 100755 index 000000000..1ba8dac72 --- /dev/null +++ b/mobile_service_shop/static/description/index.html @@ -0,0 +1,542 @@ + +
+
+

+ Mobile Service Manager +

+

+ This module helps in managing mobile service shop daily activities. +

+
+ Cybrosys Technologies +
+ +
+ cybrosys technologies
+
+
+
+ +
+
+

+ Overview +

+

+ This module is an application for Mobile Service shop which helps in managing the daily activities inside a service center. + This module is integrated with accounting and inventory modules.This module has a feature for adding complaint templates + which makes it user-friendly application. It helps in generating service tickets also. +

+
+
+

+ Access Rights +

+

+ + Manager :- Manager has the complete access across mobile shop management
+ + Mobile Technician :- Mobile Technician can read and write service requests and also update the parts usage. +

+
+
+ +
+
+

+ Features +

+

+ + Service request creation. +

+

+ + Assigning service request to technicians.

+ + Mobile service ticket generation. +

+

+ + Service status tracking..

+

+ + Integrated with accounting and sales module.

+

+ + Access Rights From Multiple Level.

+

+ + Mobile complaint templates.

+

+ + Invoice for parts usage and service charges.

+

+ + Email notifications to customer.

+

+ + Parts inventory.

+

+ + Flexible for further customization.

+
+
+
+
+

+ Mobile Service Shop +

+
+

+ + When you install the module, an extra menu named Mobile Service is created. + Here you can see service requests and configure your mobile service shop. +

+
+
+ +
+
+

Mobile Service -> Service Request -> Create

+

+ + This is the service request creation form. Service request can be create according to the device brand and model. + Also we can assign the service request a technician and provide warranty details, customer details, IMEI no, + request and return dates etc.... +

+
+
+ +
+

+ Service Tickets +

+
+

Generating tickets for service request.

+

+ + Here you can create tickets for service requests by using the 'Print Ticket' button. +

+
+
+ +
+

+ + Service ticket will be generated as follows, +

+
+
+ +
+

+ Parts Inventory +

+
+

Mobile parts inventory

+

+ + Here you see the mobile parts used for service processing. +

+
+
+ +
+

+ + Product will be only visible in the parts inventory if 'is a mobile part' is checked. +
You can provide a brand, model and colour details from here. +

+ +
+ +
+

+ Service Invoice +

+
+

Invoice for service requests

+

+ + Here you can create invoices for service requests. +

+
+
+ +
+

+ + Invoice can be created based on advance or full amount. +

+ +
+ +
+

+ + The parts used during the service process will be automatically added to invoice line. +

+
+ +
+

+ Post Stock moves +

+
+

+ + No need to create stock moves for parts usage manually. 'Post Stock Moves' will generate stock for the parts usage. +

+
+ +
+

+ Email Notification +

+
+

+ + The system will send email notification to the customer for each stage in the service request.
+
Note:- You should configure outgoing and incoming e-mail settings from your odoo for email service. +

+
+
+ +
+ +
+

+ Brands Configuration +

+

+ + Create mobile brands which is used in service request creation. +
Mobile Service -> Configuration -> Brands +

+
+ +
+
+

+ Models Configuration +

+

+ + You can also create models for different mobile brands from +
Mobile Service -> Configuration -> Models +

+
+ +
+

+ Complaint Types +

+

+ + You can create different complaint types from +
Mobile Service -> Configuration -> Complaint Types +

+
+ +
+

+ Complaint Templates +

+

+ + Complaint Templates can be created from +
Mobile Service -> Configuration -> Complaint Types +

+
+ +
+

+ + You can select different complaint templates from the 'Complaints' page while creating service requests. +

+
+ +
+

+ Terms and conditions +

+

+ + Terms and conditions for service request can be added from, +
Mobile Service -> Configuration -> Terms and Conditions + which will be added to the service tickets. +

+
+ +
+ +
+
+ +
+
+ cybrosys technologies +
+
+
+
+

+ Our Services +

+
+ + + +
+ +
+ + + +
+

+ + Odoo Support +

+ +
+ +
+
+
+
+
+

+ Our Industries +

+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Trading + +

+

+ Easily procure and sell your products. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Manufacturing +

+

+ Plan, track and schedule your operations. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Restaurant +

+

+ Run your bar or restaurant methodical. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + POS +

+

+ Easy configuring and convivial selling. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + E-commerce & Website +

+

+ Mobile friendly, awe-inspiring product pages. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Hotel Management +

+

+ An all-inclusive hotel management application. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Education +

+

+ A Collaborative platform for educational management. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Service Management +

+

+ Keep track of services and invoice accordingly. +

+
+
+
+
+
+
+ +
+ diff --git a/mobile_service_shop/static/description/mobile-service-shop1.png b/mobile_service_shop/static/description/mobile-service-shop1.png new file mode 100644 index 000000000..9e0437c55 Binary files /dev/null and b/mobile_service_shop/static/description/mobile-service-shop1.png differ diff --git a/mobile_service_shop/static/description/mobile-service-shop10.png b/mobile_service_shop/static/description/mobile-service-shop10.png new file mode 100644 index 000000000..e0931e968 Binary files /dev/null and b/mobile_service_shop/static/description/mobile-service-shop10.png differ diff --git a/mobile_service_shop/static/description/mobile-service-shop11.png b/mobile_service_shop/static/description/mobile-service-shop11.png new file mode 100644 index 000000000..c8fc40025 Binary files /dev/null and b/mobile_service_shop/static/description/mobile-service-shop11.png differ diff --git a/mobile_service_shop/static/description/mobile-service-shop12.png b/mobile_service_shop/static/description/mobile-service-shop12.png new file mode 100644 index 000000000..db42078d9 Binary files /dev/null and b/mobile_service_shop/static/description/mobile-service-shop12.png differ diff --git a/mobile_service_shop/static/description/mobile-service-shop13.png b/mobile_service_shop/static/description/mobile-service-shop13.png new file mode 100644 index 000000000..f608a88ae Binary files /dev/null and b/mobile_service_shop/static/description/mobile-service-shop13.png differ diff --git a/mobile_service_shop/static/description/mobile-service-shop14.png b/mobile_service_shop/static/description/mobile-service-shop14.png new file mode 100644 index 000000000..7f625f9ff Binary files /dev/null and b/mobile_service_shop/static/description/mobile-service-shop14.png differ diff --git a/mobile_service_shop/static/description/mobile-service-shop15.png b/mobile_service_shop/static/description/mobile-service-shop15.png new file mode 100644 index 000000000..5b7925f2b Binary files /dev/null and b/mobile_service_shop/static/description/mobile-service-shop15.png differ diff --git a/mobile_service_shop/static/description/mobile-service-shop16.png b/mobile_service_shop/static/description/mobile-service-shop16.png new file mode 100644 index 000000000..3319c237f Binary files /dev/null and b/mobile_service_shop/static/description/mobile-service-shop16.png differ diff --git a/mobile_service_shop/static/description/mobile-service-shop17.png b/mobile_service_shop/static/description/mobile-service-shop17.png new file mode 100644 index 000000000..17b3f75f5 Binary files /dev/null and b/mobile_service_shop/static/description/mobile-service-shop17.png differ diff --git a/mobile_service_shop/static/description/mobile-service-shop18.png b/mobile_service_shop/static/description/mobile-service-shop18.png new file mode 100644 index 000000000..6a36f7272 Binary files /dev/null and b/mobile_service_shop/static/description/mobile-service-shop18.png differ diff --git a/mobile_service_shop/static/description/mobile-service-shop2.png b/mobile_service_shop/static/description/mobile-service-shop2.png new file mode 100644 index 000000000..ceb39681e Binary files /dev/null and b/mobile_service_shop/static/description/mobile-service-shop2.png differ diff --git a/mobile_service_shop/static/description/mobile-service-shop3.png b/mobile_service_shop/static/description/mobile-service-shop3.png new file mode 100644 index 000000000..db12f7dea Binary files /dev/null and b/mobile_service_shop/static/description/mobile-service-shop3.png differ diff --git a/mobile_service_shop/static/description/mobile-service-shop4.png b/mobile_service_shop/static/description/mobile-service-shop4.png new file mode 100644 index 000000000..affa01676 Binary files /dev/null and b/mobile_service_shop/static/description/mobile-service-shop4.png differ diff --git a/mobile_service_shop/static/description/mobile-service-shop5.png b/mobile_service_shop/static/description/mobile-service-shop5.png new file mode 100644 index 000000000..1457b276b Binary files /dev/null and b/mobile_service_shop/static/description/mobile-service-shop5.png differ diff --git a/mobile_service_shop/static/description/mobile-service-shop6.png b/mobile_service_shop/static/description/mobile-service-shop6.png new file mode 100644 index 000000000..b85ce82fe Binary files /dev/null and b/mobile_service_shop/static/description/mobile-service-shop6.png differ diff --git a/mobile_service_shop/static/description/mobile-service-shop7.png b/mobile_service_shop/static/description/mobile-service-shop7.png new file mode 100644 index 000000000..7b745c855 Binary files /dev/null and b/mobile_service_shop/static/description/mobile-service-shop7.png differ diff --git a/mobile_service_shop/static/description/mobile-service-shop8.png b/mobile_service_shop/static/description/mobile-service-shop8.png new file mode 100644 index 000000000..dc66b979c Binary files /dev/null and b/mobile_service_shop/static/description/mobile-service-shop8.png differ diff --git a/mobile_service_shop/static/description/mobile-service-shop9.png b/mobile_service_shop/static/description/mobile-service-shop9.png new file mode 100644 index 000000000..8c3ed17ca Binary files /dev/null and b/mobile_service_shop/static/description/mobile-service-shop9.png differ diff --git a/mobile_service_shop/static/description/web-icon.png b/mobile_service_shop/static/description/web-icon.png new file mode 100644 index 000000000..e56b3cbc1 Binary files /dev/null and b/mobile_service_shop/static/description/web-icon.png differ diff --git a/mobile_service_shop/views/mobile_service_views.xml b/mobile_service_shop/views/mobile_service_views.xml new file mode 100644 index 000000000..3611b20c8 --- /dev/null +++ b/mobile_service_shop/views/mobile_service_views.xml @@ -0,0 +1,594 @@ + + + + + + Service Code + mobile.service + SERV/ + + + + + + service.request.search1 + mobile.service + + + + + + + + + + + + + + + + + + + + + + + + mobile.service.request.form + mobile.service + +
+
+
+ +
+ + +
+
+

+ +

+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+
+
+ + +
+ + +
+
+ + + mobile.service.kanban.view + mobile.service + + + + + + +
+
+ +
+
+
+ +
+
+
+ + +
+ +
+
+
+
+
+
+
+
+ + + mobile.brand.form + mobile.brand + +
+ + + + + + + +
+
+
+ + + mobile.brand.model.form + brand.model + +
+ + + + + + + + + +
+
+
+ + + + mobile.service.kanban.view + brand.model + + + + + + +
+
+ +
+
+
+

+
+
+

+
+ +
+
+
+
+
+
+
+
+ + + mobile.complaint.type.form + mobile.complaint + +
+ + + + + + + +
+
+
+ + + mobile.complaint.template.form + mobile.complaint.description + +
+ + + + + + +
+
+
+ + + mobile.terms.and.conditions.form + terms.conditions + +
+ + + + + +
+
+
+ + + + mobile.brand.tree + mobile.brand + + + + + + + + + mobile.brand.model.tree + brand.model + + + + + + + + + + + mobile.complaint.type.tree + mobile.complaint + + + + + + + + + mobile.complaint.type.tree + mobile.complaint.description + + + + + + + + + + mobile.terms.and.conditions.tree + terms.conditions + + + + + + + + + mobile.service.graph + mobile.service + + + + + + + + + + + mobile.service.request.tree + mobile.service + [] + + + + + + + + + + + + + + + + + + Brand + mobile.brand + form + tree,form + + +

+ Click to Create a New Record. +

+
+
+ + + Service Request + mobile.service + form + tree,form,kanban,pivot,graph + + + +

+ Click to Create a New Record. +

+
+
+ + + Complaint Types + mobile.complaint + form + tree,form + + +

+ Click to Create a New Record. +

+
+ +
+ + + Complaint Types + mobile.complaint.description + form + tree,form + + +

+ Click to Create a New Record. +

+
+
+ + + Terms and Conditions + terms.conditions + form + tree,form + + +

+ Click to Create a New Record. +

+
+ +
+ + + Models + brand.model + form + kanban,tree,form + + +

+ Click to Create a New Record. +

+
+ +
+ + + product.template.product.kanban + product.template + + + + + + + + + + + + + product.parts.form.view + product.template + + + + + + + + + + + + + + + + + + + + + + + + + + + Products + ir.actions.act_window + product.template + kanban,tree,form + form + {"search_default_consumable":1, 'default_type': 'product'} + [('is_a_parts', '=', True)] + +

+ Click to define a new product. +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+
\ No newline at end of file diff --git a/mobile_service_shop/wizard/__init__.py b/mobile_service_shop/wizard/__init__.py new file mode 100644 index 000000000..31955eafc --- /dev/null +++ b/mobile_service_shop/wizard/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from . import mobile_create_invoice + diff --git a/mobile_service_shop/wizard/mobile_create_invoice.py b/mobile_service_shop/wizard/mobile_create_invoice.py new file mode 100644 index 000000000..8e8b83102 --- /dev/null +++ b/mobile_service_shop/wizard/mobile_create_invoice.py @@ -0,0 +1,138 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +import time + +from odoo import api, fields, models, _ +from odoo.exceptions import Warning, UserError + + +class MobileServiceInvoice(models.Model): + + _name = 'mobile.invoice' + + + advance_payment_method = fields.Selection([('advance', 'Advance'), ('full_amount', 'Full amount')], + string='Invoice method', default='advance') + amount = fields.Integer(string='Amount') + number = fields.Char(string='Service Id') + + @api.multi + def action_invoice_create(self): + active_id = self._context.get('active_id') + service_id = self.env['mobile.service'].search([('id', '=', active_id)]) + + if not service_id.env['product.product'].search([("name", "=", "Mobile Service Advance")]): + vals = self._prepare_advance_product() + self.env['product.product'].create(vals) + + if not service_id.env['product.product'].search([("name", "=", "Mobile Service Charge")]): + vals1 = self._prepare_service_product() + self.env['product.product'].create(vals1) + + service_id.first_invoice_created = True + inv_obj = self.env['account.invoice'] + inv_line_obj = self.env['account.invoice.line'] + supplier = service_id.person_name + inv_data = { + 'name': supplier.name, + 'type': 'out_invoice', + 'reference': supplier.name, + 'account_id': supplier.property_account_receivable_id.id, + 'partner_id': supplier.id, + 'currency_id': service_id.account_type.company_id.currency_id.id, + 'journal_id': service_id.journal_type.id, + 'origin': service_id.name, + 'company_id': service_id.account_type.company_id.id, + 'date_due': service_id.return_date, + } + inv_id = inv_obj.create(inv_data) + service_id.first_payment_inv = inv_id.id + self.number = service_id.name + if self.advance_payment_method != 'advance': + product_id = service_id.env['product.product'].search([("name", "=", "Mobile Service Charge")]) + else: + product_id = service_id.env['product.product'].search([("name", "=", "Mobile Service Advance")]) + + if product_id.property_account_income_id.id: + income_account = product_id.property_account_income_id.id + elif product_id.categ_id.property_account_income_categ_id.id: + income_account = product_id.categ_id.property_account_income_categ_id.id + else: + raise UserError('Please define income account for this product: "%s" (id:%d).' % + (product_id.name, product_id.id)) + flag = 0 + if self.amount: + flag = 1 + inv_line_data = { + 'name': product_id.name, + 'account_id': income_account, + 'price_unit': self.amount, + 'quantity': 1, + 'product_id': product_id.id, + 'invoice_id': inv_id.id, + } + inv_line_obj.create(inv_line_data) + + sale_order_product = self.env['product.order.line'].search([('product_order_id', '=', service_id.name)]) + for line_data in sale_order_product: + qty = line_data.product_uom_qty - line_data.qty_invoiced + if line_data.product_uom_qty < line_data.qty_invoiced: + raise UserError(_('Used quantity is less than invoiced quantity')) + uom_id = line_data.product_id.product_tmpl_id.uom_id + if qty > 0: + flag = 1 + price = line_data.product_id.list_price + inv_line_data = { + 'name': line_data.product_id.name, + 'account_id': income_account, + 'price_unit': price, + 'quantity': qty, + 'uom_id': uom_id.id, + 'product_id': line_data.product_id.id, + 'invoice_id': inv_id.id, + } + inv_line_obj.create(inv_line_data) + line_data.qty_invoiced = line_data.qty_invoiced + qty + + # inv_id.action_invoice_open() + if flag != 1: + raise UserError(_('Nothing to create invoice')) + imd = service_id.env['ir.model.data'] + action = imd.xmlid_to_object('account.action_invoice_tree1') + list_view_id = imd.xmlid_to_res_id('account.invoice_tree') + form_view_id = imd.xmlid_to_res_id('account.invoice_form') + result = { + 'name': action.name, + 'help': action.help, + 'type': 'ir.actions.act_window', + 'views': [[list_view_id, 'tree'], [form_view_id, 'form'], [False, 'graph'], [False, 'kanban'], + [False, 'calendar'], [False, 'pivot']], + 'target': action.target, + 'context': action.context, + 'res_model': 'account.invoice', + } + if len(inv_id) > 1: + result['domain'] = "[('id','in',%s)]" % inv_id.ids + elif len(inv_id) == 1: + result['views'] = [(form_view_id, 'form')] + result['res_id'] = inv_id.ids[0] + else: + result = {'type': 'ir.actions.act_window_close'} + return result + + def _prepare_advance_product(self): + return { + 'name': 'Mobile Service Advance', + 'type': 'service', + 'invoice_policy': 'order', + 'company_id': False, + } + + def _prepare_service_product(self): + return { + 'name': 'Mobile Service Charge', + 'type': 'service', + 'invoice_policy': 'order', + 'company_id': False, + } diff --git a/mobile_service_shop/wizard/mobile_create_invoice_views.xml b/mobile_service_shop/wizard/mobile_create_invoice_views.xml new file mode 100644 index 000000000..f2ee37945 --- /dev/null +++ b/mobile_service_shop/wizard/mobile_create_invoice_views.xml @@ -0,0 +1,39 @@ + + + Create Invoice + mobile.invoice + +
+

+ Invoices will be created in draft so that you can review + them before validation. +

+ + + +
+
+
+
+
+ + + + Create Invoice + ir.actions.act_window + mobile.invoice + form + form + new + + + +
diff --git a/personal_info/README.rst b/personal_info/README.rst new file mode 100755 index 000000000..d22faa65d --- /dev/null +++ b/personal_info/README.rst @@ -0,0 +1,32 @@ +Contact First And Last Name v11 +=========================== +This module will helps you to give the personal details for your contact + +Features +======== + +* Personal details like nationality,personal mobile , email, id proof details etc for Contacts. + +Tech +==== +* [Python] - Models +* [XML] - Odoo views + +Installation +============ +- www.odoo.com/documentation/11.0/setup/install.html +- Install our custom addon + +Bug Tracker +=========== +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + + +Developer: Tintuk Tomin @ cybrosys, odoo@cybrosys.com + +Maintainer +---------- + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com. diff --git a/personal_info/__init__.py b/personal_info/__init__.py new file mode 100644 index 000000000..5305644df --- /dev/null +++ b/personal_info/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import models \ No newline at end of file diff --git a/personal_info/__manifest__.py b/personal_info/__manifest__.py new file mode 100755 index 000000000..a4ce63537 --- /dev/null +++ b/personal_info/__manifest__.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2018-TODAY Cybrosys Technologies(). +# Author: Tintuk Tomin() +# you can modify it under the terms of the GNU AGPL (v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AGPL (AGPL v3) for more details. +# +############################################################################## + +{ + 'name': 'Personal Information in Contacts', + 'version': '12.0.1.0.0', + 'summary': """This module will helps you to give personal details in your contact.""", + 'description': "Module helps you to manage the personal information of your partner as well as in the contacts.", + 'category': "Human Resource", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base','contacts','first_last_name','gender_contact'], + 'data': ['security/ir.model.access.csv', + 'views/info_view.xml' + ], + 'demo': [], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'application': True, +} diff --git a/personal_info/doc/RELEASE_NOTES.md b/personal_info/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..818aa29bf --- /dev/null +++ b/personal_info/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 09.04.2019 +#### Version 11.0.1.0.0 +##### ADD +- Initial commit diff --git a/personal_info/models/__init__.py b/personal_info/models/__init__.py new file mode 100644 index 000000000..9ee49cc8d --- /dev/null +++ b/personal_info/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import personal diff --git a/personal_info/models/personal.py b/personal_info/models/personal.py new file mode 100644 index 000000000..1d4825fd7 --- /dev/null +++ b/personal_info/models/personal.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- + +from odoo import api, models, fields + +class FirstNameLastName(models.Model): + _inherit = 'res.partner' + + dob = fields.Date(string="Date of Birth") + nationality = fields.Char(string="Nationality") + personal_number = fields.Char(string="Personal Number") + personal_email = fields.Char(string="Email") + marital = fields.Selection([ + ('single', 'Single'), + ('married', 'Married'), + ('cohabitant', 'Legal Cohabitant'), + ('widower', 'Widower'), + ('divorced', 'Divorced')], string='Marital Status') + social_twitter = fields.Char('Twitter Account') + social_facebook = fields.Char('Facebook Account') + social_github = fields.Char('GitHub Account') + social_linkedin = fields.Char('LinkedIn Account') + social_youtube = fields.Char('Youtube Account') \ No newline at end of file diff --git a/personal_info/security/ir.model.access.csv b/personal_info/security/ir.model.access.csv new file mode 100644 index 000000000..d9ab32c29 --- /dev/null +++ b/personal_info/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink +res_partner_id,res.partner.name,model_res_partner,hr.group_hr_manager,1,1,1,1 diff --git a/personal_info/static/description/banner.png b/personal_info/static/description/banner.png new file mode 100644 index 000000000..bfc21ba80 Binary files /dev/null and b/personal_info/static/description/banner.png differ diff --git a/personal_info/static/description/icon.png b/personal_info/static/description/icon.png new file mode 100644 index 000000000..e94771b22 Binary files /dev/null and b/personal_info/static/description/icon.png differ diff --git a/personal_info/static/description/index.html b/personal_info/static/description/index.html new file mode 100644 index 000000000..b9befa486 --- /dev/null +++ b/personal_info/static/description/index.html @@ -0,0 +1,340 @@ +
+
+

+ Personal Information in Contacts +

+

+ Provision for enter the personal informations +

+
+ Cybrosys Technologies +
+ +
+ cybrosys technologies
+
+
+
+
+
+

+ Overview +

+

+ Provides option add more personal details for all contacts including partners. +

+
+
+

+ Configuration +

+

+ No additional configuration is required. +

+
+
+ +
+
+

+ Features +

+

+ + First name, Last name, Nick name and gender for partners. +

+

+ + New tab for personal informaions. +

+
+
+ +
+
+

+ Screenshots +

+

+ + Names and gender +

+
+ +
+

+ + New tab for personal info +

+
+ +
+
+
+ +
+
+ cybrosys technologies +
+
+ +
+
+

+ Our Services +

+
+ + + +
+ +
+ + + +
+

+ + Odoo Support +

+ +
+ +
+
+
+
+
+

+ Our Industries +

+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Trading + +

+

+ Easily procure and sell your products. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Manufacturing +

+

+ Plan, track and schedule your operations. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Restaurant +

+

+ Run your bar or restaurant methodical. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + POS +

+

+ Easy configuring and convivial selling. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + E-commerce & Website +

+

+ Mobile friendly, awe-inspiring product pages. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Hotel Management +

+

+ An all-inclusive hotel management application. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Education +

+

+ A Collaborative platform for educational management. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Service Management +

+

+ Keep track of services and invoice accordingly. +

+
+
+
+
+
+
+ +
diff --git a/personal_info/static/description/personal-details-cybrosys-1.png b/personal_info/static/description/personal-details-cybrosys-1.png new file mode 100644 index 000000000..3cc4c2246 Binary files /dev/null and b/personal_info/static/description/personal-details-cybrosys-1.png differ diff --git a/personal_info/static/description/personal-details-cybrosys.png b/personal_info/static/description/personal-details-cybrosys.png new file mode 100644 index 000000000..d7aa26ab4 Binary files /dev/null and b/personal_info/static/description/personal-details-cybrosys.png differ diff --git a/personal_info/views/info_view.xml b/personal_info/views/info_view.xml new file mode 100644 index 000000000..a315e0f32 --- /dev/null +++ b/personal_info/views/info_view.xml @@ -0,0 +1,33 @@ + + + + + res.partner.simplified.form.personal.info + res.partner + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pos_restaurant_floor_facility/README.rst b/pos_restaurant_floor_facility/README.rst new file mode 100644 index 000000000..4a82ae3be --- /dev/null +++ b/pos_restaurant_floor_facility/README.rst @@ -0,0 +1,28 @@ +==================================== +Floor Wise Charges in Restaurant v12 +==================================== +This module adds floor wise charging facility in POS Restaurant. + +Installation +============ +Just select it from available modules to install it, there is no need to extra installations. + +Configuration +============= +Nothing to configure. + +Usage +===== +* Create some Facility and its charging percentage. +* POS-> Configuration-> Floor Facility. + +* Add created facility to floors. +* POS-> Configuration-> Floor Plans-> Add Facility Lines + +* On clicking a product in pos screen, Amount will add automatically. + +Credits +======= +Developer: Nilmar Shereef(v10) @ cybrosys, odoo@cybrosys.com + Akshay Babu(v12) + diff --git a/pos_restaurant_floor_facility/__init__.py b/pos_restaurant_floor_facility/__init__.py new file mode 100644 index 000000000..f4919f8f5 --- /dev/null +++ b/pos_restaurant_floor_facility/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +from . import models diff --git a/pos_restaurant_floor_facility/__manifest__.py b/pos_restaurant_floor_facility/__manifest__.py new file mode 100644 index 000000000..0b92887d4 --- /dev/null +++ b/pos_restaurant_floor_facility/__manifest__.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Author: Nilmar Shereef() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +{ + 'name': 'Floor Wise Charge in Restaurant', + 'version': '12.0.1.0.0', + 'summary': """Product Price Change Based on Floor of POS Restaurant.""", + 'description': """Module adds the facility charge of floor with each products in POS restaurant""", + 'author': 'Cybrosys Techno Solutions', + 'website': "http://www.cybrosys.com", + 'company': 'Cybrosys Techno Solutions', + 'category': 'Point Of Sale', + 'depends': ['point_of_sale', + 'pos_restaurant'], + 'data': [ + 'security/ir.model.access.csv', + 'views/pos_restaurant_extra_facility.xml', + 'views/templates.xml', + ], + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, +} diff --git a/pos_restaurant_floor_facility/models/__init__.py b/pos_restaurant_floor_facility/models/__init__.py new file mode 100644 index 000000000..ab9875550 --- /dev/null +++ b/pos_restaurant_floor_facility/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Author: Nilmar Shereef() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +from . import pos_restaurant_extra_facility diff --git a/pos_restaurant_floor_facility/models/pos_restaurant_extra_facility.py b/pos_restaurant_floor_facility/models/pos_restaurant_extra_facility.py new file mode 100644 index 000000000..f1e764f62 --- /dev/null +++ b/pos_restaurant_floor_facility/models/pos_restaurant_extra_facility.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Author: Nilmar Shereef() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +from odoo import models, fields, api + + +class FacilityRestaurant(models.Model): + + _inherit = "restaurant.floor" + + rest_floor_facility = fields.One2many('restaurant.floor.line', 'ref_field', string='Floor Facility') + facility_service_percentage = fields.Float(compute='onchange_rest_facility', string="Active Facility Charge %") + + @api.multi + @api.depends('rest_floor_facility') + def onchange_rest_facility(self): + for rec in self: + sum_of_percentage = 0.0 + if rec.rest_floor_facility: + for records in rec.rest_floor_facility: + sum_of_percentage += records.line_percentage + rec.facility_service_percentage = sum_of_percentage + + +class FacilityRestaurantLines(models.Model): + _name = "restaurant.floor.line" + + name = fields.Many2one('restaurant.floor.facility') + line_percentage = fields.Float(string="Extra Charging Percentage") + ref_field = fields.Many2one('restaurant.floor', invisible=True, ondelete='cascade') + + @api.onchange('name') + def onchange_facility(self): + if self.name: + self.line_percentage = self.name.percentage + + +class FloorFacility(models.Model): + + _name = "restaurant.floor.facility" + + name = fields.Char(string="Name", required=True,) + percentage = fields.Float(string="Extra Charging Percentage(%)", required=True, + help="Increment percentage of the each Product Price ") + description = fields.Html(string="Description") diff --git a/pos_restaurant_floor_facility/security/ir.model.access.csv b/pos_restaurant_floor_facility/security/ir.model.access.csv new file mode 100644 index 000000000..59147359b --- /dev/null +++ b/pos_restaurant_floor_facility/security/ir.model.access.csv @@ -0,0 +1,5 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_restaurant.floor.line1,restaurant.floor.line11,model_restaurant_floor_line,point_of_sale.group_pos_user,1,0,0,0 +access_restaurant.floor.facility1,restaurant.floor.facility11,model_restaurant_floor_facility,point_of_sale.group_pos_user,1,0,0,0 +access_restaurant.floor.line,restaurant.floor.line,model_restaurant_floor_line,point_of_sale.group_pos_manager,1,1,1,1 +access_restaurant.floor.facility,restaurant.floor.facility,model_restaurant_floor_facility,point_of_sale.group_pos_manager,1,1,1,1 diff --git a/pos_restaurant_floor_facility/static/description/banner.jpg b/pos_restaurant_floor_facility/static/description/banner.jpg new file mode 100644 index 000000000..a501ca611 Binary files /dev/null and b/pos_restaurant_floor_facility/static/description/banner.jpg differ diff --git a/pos_restaurant_floor_facility/static/description/cybro_logo.png b/pos_restaurant_floor_facility/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/pos_restaurant_floor_facility/static/description/cybro_logo.png differ diff --git a/pos_restaurant_floor_facility/static/description/icon.png b/pos_restaurant_floor_facility/static/description/icon.png new file mode 100644 index 000000000..deb6b46c5 Binary files /dev/null and b/pos_restaurant_floor_facility/static/description/icon.png differ diff --git a/pos_restaurant_floor_facility/static/description/index.html b/pos_restaurant_floor_facility/static/description/index.html new file mode 100644 index 000000000..9b5029527 --- /dev/null +++ b/pos_restaurant_floor_facility/static/description/index.html @@ -0,0 +1,369 @@ +
+
+

+ Floor Wise Charges in Restaurant +

+

+ User can set floor facility charges on Products +

+
+ Cybrosys Technologies +
+ +
+ cybrosys technologies +
+
+
+
+ +
+
+

+ Overview +

+

+ This module allows users to set floor facility charges on Products,i.e + extra charges are set for products according to the floor used by customers. +

+
+
+ +
+
+

+ Features +

+

+ + Facilities With Charging Percentage. +

+

+ + Facility Lines in Floor Master. +

+

+ + Enables Separate Price in Floors Wise. +

+

+ + Simple Configuration. +

+
+
+
+
+

+ Screenshots +

+

+ + Facility Master - Tree View +

+
+ +
+

+ + Facility Master - Form View +
    +
  • Facilities with its charging percentage.
  • +
  • Images and bullet points of facility.
  • +
+

+
+ +
+

+ + Floor Master With Facility Lines - Form View +
    +
  • Facility lines with its charging percentage.
  • +
  • User can alter its charges from this lines.
  • +
  • Automated total affecting facility percentage of floor.
  • +
+

+
+ +
+

+ + Floor Wise Price Change - POS Screen +
    +
  • Floor facility charge will added with actual price of product.
  • +
+

+
+ +
+ +
+
+
+
+ cybrosys technologies +
+
+
+
+

+ Our Services +

+
+ + + +
+ +
+ + + +
+

+ + Odoo Support +

+ +
+ +
+
+
+
+
+

+ Our Industries +

+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Trading + +

+

+ Easily procure and sell your products. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Manufacturing +

+

+ Plan, track and schedule your operations. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Restaurant +

+

+ Run your bar or restaurant methodical. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + POS +

+

+ Easy configuring and convivial selling. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + E-commerce & Website +

+

+ Mobile friendly, awe-inspiring product pages. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Hotel Management +

+

+ An all-inclusive hotel management application. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Education +

+

+ A Collaborative platform for educational management. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Service Management +

+

+ Keep track of services and invoice accordingly. +

+
+
+
+
+
+
+ +
+ + diff --git a/pos_restaurant_floor_facility/static/description/pos-restaurant-cybrosys-1.png b/pos_restaurant_floor_facility/static/description/pos-restaurant-cybrosys-1.png new file mode 100644 index 000000000..a1aec214d Binary files /dev/null and b/pos_restaurant_floor_facility/static/description/pos-restaurant-cybrosys-1.png differ diff --git a/pos_restaurant_floor_facility/static/description/pos-restaurant-cybrosys-2.png b/pos_restaurant_floor_facility/static/description/pos-restaurant-cybrosys-2.png new file mode 100644 index 000000000..a65011f16 Binary files /dev/null and b/pos_restaurant_floor_facility/static/description/pos-restaurant-cybrosys-2.png differ diff --git a/pos_restaurant_floor_facility/static/description/pos-restaurant-cybrosys-3.png b/pos_restaurant_floor_facility/static/description/pos-restaurant-cybrosys-3.png new file mode 100644 index 000000000..b8940a556 Binary files /dev/null and b/pos_restaurant_floor_facility/static/description/pos-restaurant-cybrosys-3.png differ diff --git a/pos_restaurant_floor_facility/static/description/pos-restaurant-cybrosys-4.png b/pos_restaurant_floor_facility/static/description/pos-restaurant-cybrosys-4.png new file mode 100644 index 000000000..ad152b593 Binary files /dev/null and b/pos_restaurant_floor_facility/static/description/pos-restaurant-cybrosys-4.png differ diff --git a/pos_restaurant_floor_facility/static/src/js/facility_floor.js b/pos_restaurant_floor_facility/static/src/js/facility_floor.js new file mode 100644 index 000000000..a9d658b40 --- /dev/null +++ b/pos_restaurant_floor_facility/static/src/js/facility_floor.js @@ -0,0 +1,22 @@ +odoo.define('pos_restaurant_floor_facility.floor_facility_rate_addition', function (require) { +'use strict'; + +var models = require('point_of_sale.models'); +var screens = require('point_of_sale.screens'); +var restaurant = require('pos_restaurant.floors'); + + +models.load_fields("restaurant.floor",['facility_service_percentage']); + +screens.ProductScreenWidget.include({ + click_product: function(product) { + console.log(screens); + if(product.to_weight && this.pos.config.iface_electronic_scale){ + this.gui.show_screen('scale',{product: product}); + }else{ + this.pos.get_order().add_product(product,{ price: product.list_price + + (product.list_price * this.pos.table.floor.facility_service_percentage)/100}); + } + }, +}); +}); diff --git a/pos_restaurant_floor_facility/static/src/js/facility_floor.js~ b/pos_restaurant_floor_facility/static/src/js/facility_floor.js~ new file mode 100644 index 000000000..a8d75d907 --- /dev/null +++ b/pos_restaurant_floor_facility/static/src/js/facility_floor.js~ @@ -0,0 +1,20 @@ +odoo.define('pos_restaurant_floor_facility.floor_facility_rate_addition', function (require) { +'use strict'; +alert("aaaaaaaa"); +var models = require('point_of_sale.models'); +var screens = require('point_of_sale.screens'); +var restaurant = require('pos_restaurant.floors'); + +models.load_fields("restaurant.floor",['facility_service_percentage']); + +screens.ProductScreenWidget.include({ + click_product: function(product) { + if(product.to_weight && this.pos.config.iface_electronic_scale){ + this.gui.show_screen('scale',{product: product}); + }else{ + this.pos.get_order().add_product(product,{ price: product.price + + (product.price * this.pos.table.floor.facility_service_percentage)/100}); + } + } +}); +}); \ No newline at end of file diff --git a/pos_restaurant_floor_facility/views/pos_restaurant_extra_facility.xml b/pos_restaurant_floor_facility/views/pos_restaurant_extra_facility.xml new file mode 100644 index 000000000..78f6b46ad --- /dev/null +++ b/pos_restaurant_floor_facility/views/pos_restaurant_extra_facility.xml @@ -0,0 +1,69 @@ + + + + + Floor View Extra + restaurant.floor + + + + + + + + + + + + + + + + + + + + Floor Facility Form + restaurant.floor.facility + +
+ + + + + + + + + + + +
+
+
+ + + Floor Facility Tree + restaurant.floor.facility + + + + + + + + + + Floor Facility + restaurant.floor.facility + form + tree,form + +

+ Click to add a new facility. +

+
+
+ +
+
\ No newline at end of file diff --git a/pos_restaurant_floor_facility/views/templates.xml b/pos_restaurant_floor_facility/views/templates.xml new file mode 100644 index 000000000..be7cdeb99 --- /dev/null +++ b/pos_restaurant_floor_facility/views/templates.xml @@ -0,0 +1,10 @@ + + + + + +