Browse Source

July 12: [ADD] Initial commit 'water_supply_with_mo'

pull/254/merge
RisvanaCybro 10 months ago
parent
commit
45f6ea033a
  1. 48
      water_supply_with_mo/README.rst
  2. 22
      water_supply_with_mo/__init__.py
  3. 51
      water_supply_with_mo/__manifest__.py
  4. 13
      water_supply_with_mo/data/ir_sequence_data.xml
  5. 6
      water_supply_with_mo/doc/RELEASE_NOTES.md
  6. 28
      water_supply_with_mo/models/__init__.py
  7. 76
      water_supply_with_mo/models/manufacturing_order_creation.py
  8. 50
      water_supply_with_mo/models/mrp_production.py
  9. 31
      water_supply_with_mo/models/stock_move.py
  10. 52
      water_supply_with_mo/models/water_supply_methods.py
  11. 249
      water_supply_with_mo/models/water_supply_request.py
  12. 35
      water_supply_with_mo/models/water_usage_categories.py
  13. 34
      water_supply_with_mo/models/water_usage_places.py
  14. 6
      water_supply_with_mo/security/ir.model.access.csv
  15. 14
      water_supply_with_mo/security/water_supply_with_mo_groups.xml
  16. BIN
      water_supply_with_mo/static/description/assets/icons/check.png
  17. BIN
      water_supply_with_mo/static/description/assets/icons/chevron.png
  18. BIN
      water_supply_with_mo/static/description/assets/icons/cogs.png
  19. BIN
      water_supply_with_mo/static/description/assets/icons/consultation.png
  20. BIN
      water_supply_with_mo/static/description/assets/icons/ecom-black.png
  21. BIN
      water_supply_with_mo/static/description/assets/icons/education-black.png
  22. BIN
      water_supply_with_mo/static/description/assets/icons/hotel-black.png
  23. BIN
      water_supply_with_mo/static/description/assets/icons/license.png
  24. BIN
      water_supply_with_mo/static/description/assets/icons/lifebuoy.png
  25. BIN
      water_supply_with_mo/static/description/assets/icons/manufacturing-black.png
  26. BIN
      water_supply_with_mo/static/description/assets/icons/pos-black.png
  27. BIN
      water_supply_with_mo/static/description/assets/icons/puzzle.png
  28. BIN
      water_supply_with_mo/static/description/assets/icons/restaurant-black.png
  29. BIN
      water_supply_with_mo/static/description/assets/icons/service-black.png
  30. BIN
      water_supply_with_mo/static/description/assets/icons/trading-black.png
  31. BIN
      water_supply_with_mo/static/description/assets/icons/training.png
  32. BIN
      water_supply_with_mo/static/description/assets/icons/update.png
  33. BIN
      water_supply_with_mo/static/description/assets/icons/user.png
  34. BIN
      water_supply_with_mo/static/description/assets/icons/wrench.png
  35. BIN
      water_supply_with_mo/static/description/assets/misc/categories.png
  36. BIN
      water_supply_with_mo/static/description/assets/misc/check-box.png
  37. BIN
      water_supply_with_mo/static/description/assets/misc/compass.png
  38. BIN
      water_supply_with_mo/static/description/assets/misc/corporate.png
  39. BIN
      water_supply_with_mo/static/description/assets/misc/customer-support.png
  40. BIN
      water_supply_with_mo/static/description/assets/misc/cybrosys-logo.png
  41. BIN
      water_supply_with_mo/static/description/assets/misc/features.png
  42. BIN
      water_supply_with_mo/static/description/assets/misc/logo.png
  43. BIN
      water_supply_with_mo/static/description/assets/misc/pictures.png
  44. BIN
      water_supply_with_mo/static/description/assets/misc/pie-chart.png
  45. BIN
      water_supply_with_mo/static/description/assets/misc/right-arrow.png
  46. BIN
      water_supply_with_mo/static/description/assets/misc/star.png
  47. BIN
      water_supply_with_mo/static/description/assets/misc/support.png
  48. BIN
      water_supply_with_mo/static/description/assets/misc/whatsapp.png
  49. BIN
      water_supply_with_mo/static/description/assets/modules/barcode_scanning_sale_purchase.png
  50. BIN
      water_supply_with_mo/static/description/assets/modules/sale_customer_product_history.png
  51. BIN
      water_supply_with_mo/static/description/assets/modules/sale_discount_total.png
  52. BIN
      water_supply_with_mo/static/description/assets/modules/sale_order_line_multi_warehouse.png
  53. BIN
      water_supply_with_mo/static/description/assets/modules/sale_product_image.png
  54. BIN
      water_supply_with_mo/static/description/assets/modules/sale_report_advanced.png
  55. BIN
      water_supply_with_mo/static/description/assets/screenshots/1.png
  56. BIN
      water_supply_with_mo/static/description/assets/screenshots/10.png
  57. BIN
      water_supply_with_mo/static/description/assets/screenshots/11.png
  58. BIN
      water_supply_with_mo/static/description/assets/screenshots/13.png
  59. BIN
      water_supply_with_mo/static/description/assets/screenshots/14.png
  60. BIN
      water_supply_with_mo/static/description/assets/screenshots/15.png
  61. BIN
      water_supply_with_mo/static/description/assets/screenshots/16.png
  62. BIN
      water_supply_with_mo/static/description/assets/screenshots/17.png
  63. BIN
      water_supply_with_mo/static/description/assets/screenshots/2.png
  64. BIN
      water_supply_with_mo/static/description/assets/screenshots/3.png
  65. BIN
      water_supply_with_mo/static/description/assets/screenshots/4.png
  66. BIN
      water_supply_with_mo/static/description/assets/screenshots/5.png
  67. BIN
      water_supply_with_mo/static/description/assets/screenshots/6.png
  68. BIN
      water_supply_with_mo/static/description/assets/screenshots/7.png
  69. BIN
      water_supply_with_mo/static/description/assets/screenshots/8.png
  70. BIN
      water_supply_with_mo/static/description/assets/screenshots/9.png
  71. BIN
      water_supply_with_mo/static/description/assets/screenshots/hero.gif
  72. BIN
      water_supply_with_mo/static/description/banner.png
  73. BIN
      water_supply_with_mo/static/description/icon.png
  74. 690
      water_supply_with_mo/static/description/index.html
  75. 33
      water_supply_with_mo/views/manufacturing_order_creation_views.xml
  76. 16
      water_supply_with_mo/views/mrp_production_views.xml
  77. 44
      water_supply_with_mo/views/water_supply_method_views.xml
  78. 114
      water_supply_with_mo/views/water_supply_request_views.xml
  79. 21
      water_supply_with_mo/views/water_supply_with_mo_menus.xml
  80. 45
      water_supply_with_mo/views/water_usage_categories_views.xml
  81. 44
      water_supply_with_mo/views/water_usage_places_views.xml

48
water_supply_with_mo/README.rst

@ -0,0 +1,48 @@
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
Water Supply With Manufacturing Order
=====================================
This module helps you to manufacturing the products from the water supply
request form.
Configuration
=============
* Added Water Supply user in user settings.
Company
-------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
License
-------
General Public License, Version 3 (AGPL v3).
(https://www.gnu.org/licenses/agpl-3.0-standalone.html)
Credits
-------
* Developer: (V15) Mohammed Irfan T, Contact : odoo@cybrosys.com
* Developer: (V16) Dhanya Babu, Contact : odoo@cybrosys.com
Contacts
--------
* Mail Contact : odoo@cybrosys.com
* Website : https://cybrosys.com
Bug Tracker
-----------
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
Maintainer
==========
.. image:: https://cybrosys.com/images/logo.png
:target: https://cybrosys.com
This module is maintained by Cybrosys Technologies.
For support and more information, please visit `Our Website <https://cybrosys.com/>`__
Further information
===================
HTML Description: `<static/description/index.html>`__

22
water_supply_with_mo/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Irfan T (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from . import models

51
water_supply_with_mo/__manifest__.py

@ -0,0 +1,51 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Irfan T (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': "Water Supply With Manufacturing Order",
'version': '15.0.1.0.0',
'category': 'Manufacturing',
'summary': """This app allows you to create water supplying methods""",
'description': """This app allows you to create water supplying methods
allows us to create manufacture orders from water supply requests.""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': 'https://www.cybrosys.com',
'depends': ['account', 'mail', 'mrp'],
'data': [
'security/water_supply_with_mo_groups.xml',
'security/ir.model.access.csv',
'data/ir_sequence_data.xml',
'views/water_supply_method_views.xml',
'views/water_usage_places_views.xml',
'views/water_usage_categories_views.xml',
'views/water_supply_request_views.xml',
'views/manufacturing_order_creation_views.xml',
'views/mrp_production_views.xml',
'views/water_supply_with_mo_menus.xml',
],
'images': ['static/description/banner.png'],
'license': 'AGPL-3',
'installable': True,
'auto_install': False,
'application': True,
}

13
water_supply_with_mo/data/ir_sequence_data.xml

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data noupdate="1">
<!--Sequence number generation for water supply request-->
<record id="ir_sequence_water_supply_request" model="ir.sequence">
<field name="name">Water Supply Request</field>
<field name="code">water_supply_request</field>
<field name="prefix">WS</field>
<field name="padding">4</field>
<field name="company_id" eval="False"/>
</record>
</data>
</odoo>

6
water_supply_with_mo/doc/RELEASE_NOTES.md

@ -0,0 +1,6 @@
## Module <water_supply_with_mo>
#### 05.07.2024
#### Version 15.0.1.0.0
#### ADD
- Initial Commit for Water Supply With Manufacturing Order

28
water_supply_with_mo/models/__init__.py

@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Irfan T (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from . import manufacturing_order_creation
from . import mrp_production
from . import stock_move
from . import water_supply_methods
from . import water_supply_request
from . import water_usage_categories
from . import water_usage_places

76
water_supply_with_mo/models/manufacturing_order_creation.py

@ -0,0 +1,76 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Irfan T (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from odoo import fields, models
class ManufacturingOrderCreation(models.Model):
"""The created manufacturing orders can be displayed and edited
through this model.This model set an as many2many field in another
model."""
_name = 'manufacturing.order.creation'
_description = 'Manufacturing Order Creation '
_rec_name = 'product_id'
product_id = fields.Many2one('product.product',
string='Product', help='Name of the product')
quantity = fields.Integer(string='Quantity',
help='Quantity of the product')
uom_id = fields.Many2one('uom.uom', string='UoM',
help='Unit of measure of the product')
bom_id = fields.Many2one('mrp.bom',
domain="[('product_id','=', product_id)]",
string='Bill of Material',
help='Bill of material of the product.')
mrp_id = fields.Many2one('mrp.production',
string='Manufacturing Order',
help='Manufacturing order of the product')
is_mo = fields.Boolean(string='Is Display', default=True,
help='If the value of the boolean field is'
'false,then manufacturing order button'
'will disappear')
supply_request_id = fields.Many2one('water.supply.request',
string='Supply Request',
help="Corresponding water supply "
"request")
def action_creating_mo(self):
"""Displaying manufacturing order of the product.
The form view will display default values for the specified fields
based on the attributes of the current instance.
The view will be opened in the current window."""
res = {
'name': 'mrp.production',
'type': 'ir.actions.act_window',
'res_model': 'mrp.production',
'view_mode': 'form',
'view_id': self.env.ref(
'mrp.mrp_production_form_view').id,
'view_type': 'form',
'target': 'current',
'context': {
'default_product_id': self.product_id.id,
'default_product_uom_qty': self.quantity,
'default_supply_id': self.supply_request_id.id,
'default_manufacturing_order_id': self.id
},
}
return res

50
water_supply_with_mo/models/mrp_production.py

@ -0,0 +1,50 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Irfan T (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from odoo import api, fields, models
class MrpProduction(models.Model):
""" This class adds additional fields and overrides the 'create' method
for specific functionality."""
_inherit = 'mrp.production'
manufacturing_order_id = fields.Many2one('manufacturing.order.creation',
string='MO Order',
help='Manufacturing order.')
supply_id = fields.Many2one('water.supply.request',
string='Water Supply Request',
help='Displaying water supply request')
@api.model_create_multi
def create(self, vals):
"""Create a new Manufacturing Production."""
records = super(MrpProduction, self).create(vals)
for res in records:
default_mo_context_id = res._context.get(
'default_manufacturing_order_id')
default_manufacturing_order_id = self.env[
'manufacturing.order.creation'].browse(default_mo_context_id)
default_manufacturing_order_id.mrp_id = res
default_manufacturing_order_id.bom_id = res.bom_id.id
if default_manufacturing_order_id.mrp_id:
default_manufacturing_order_id.write({'is_mo': False})
return records

31
water_supply_with_mo/models/stock_move.py

@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Irfan T (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from odoo import fields, models
class StockMove(models.Model):
"""Inheriting stock.move model to add relational field"""
_inherit = 'stock.move'
supply_id = fields.Many2one('water.supply.request',
string='Water Supply',
help='Water supply request')

52
water_supply_with_mo/models/water_supply_methods.py

@ -0,0 +1,52 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Irfan T (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from odoo import api, fields, models
class WaterSupplyMethods(models.Model):
"""Creating water supply methods. """
_name = 'water.supply.methods'
_description = 'Water Supply Methods'
_inherit = ['mail.thread', 'mail.activity.mixin']
_rec_name = 'supply_name'
code = fields.Char(string='Internal Code', help='Code of the supply'
' method')
supply_name = fields.Char(string='Supply Name', help='Supply name')
created_product_id = fields.Many2one('product.product',
string='Product Created',
help="Product created when method "
"is created")
@api.model_create_multi
def create(self, vals_list):
"""Creating corresponding product for each method."""
records = super(WaterSupplyMethods, self).create(vals_list)
for record in records:
product_records = {
'name': record.supply_name,
'detailed_type': 'product'
}
created_product = self.env['product.product'].create(
product_records).id
record.created_product_id = created_product
return records

249
water_supply_with_mo/models/water_supply_request.py

@ -0,0 +1,249 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Irfan T (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import datetime
from odoo import api, fields, models, _
from odoo.addons.stock.models.stock_move import PROCUREMENT_PRIORITIES
class WaterSupplyRequest(models.Model):
"""Model for water supply request form."""
_name = "water.supply.request"
_description = "Water Supply Request"
_inherit = ["mail.thread", "mail.activity.mixin"]
_date_name = "date_planned_start"
_order = "priority desc, date_planned_start asc,id"
_rec_name = "reference_no"
@api.model
def _get_default_date_planned_start(self):
"""Method returns the specified deadline date as a datetime object."""
if self.env.context.get("default_date_deadline"):
return fields.Datetime.to_datetime(
self.env.context.get("default_date_deadline")
)
return datetime.datetime.now()
reference_no = fields.Char(
string="Sequence", readonly=True, default="New", help="Reference number"
)
responsible_user_id = fields.Many2one(
"res.users",
string="Responsible User",
default=lambda self: self.env.user,
help="Responsible person",
)
customer_name_id = fields.Many2one(
"res.partner",
string="Customer Name",
help="Name of the customer",
required=True,
)
customer_email = fields.Char(
related="customer_name_id.email", string="Customer Email", help="Customer email"
)
customer_phone = fields.Char(
related="customer_name_id.phone",
string="Customer Phone",
help="Phone number of" " the customer.",
)
customer_address = fields.Char(
related="customer_name_id.street",
string="Customer Address",
help="Customer address",
)
pickup_date = fields.Date(
string="Pickup Date", help="Date of the pickup", required=True
)
request_date = fields.Date(
string="Request Date", help="Date of the " "product request."
)
state = fields.Selection(
[("draft", "draft"), ("created", "created"), ("supplied", "supplied")],
default="draft",
string="State",
help="State of the supply request.",
)
create_date = fields.Date(
string="Create Date",
default=fields.Date.today(),
help="Create date of water supply request",
)
is_closed = fields.Boolean(
string="Is Closed",
help="Boolean field for to check the " "current request is closed or not",
)
date_planned_start = fields.Datetime(
string="Scheduled Date",
copy=False,
default=_get_default_date_planned_start,
help="Date at which you plan to start the production.",
index=True,
required=True,
)
supply_method_ids = fields.Many2many(
"water.supply.methods",
string="Supply Methods",
help="Supply methods",
required=True,
)
usage_categories_ids = fields.Many2many(
"water.usage.categories",
string="Usage Categories",
help="Usage categories",
required=True,
)
usage_place_id = fields.Many2one(
"water.usage.places", string="Usage Place", help="Usage place", required=True
)
create_mo_ids = fields.One2many(
"manufacturing.order.creation",
"supply_request_id",
string="Creation Manufacturing Order",
help="Created manufacturing orders.",
)
mo_count = fields.Integer(
string="Manufacture Order Count",
compute="compute_mo_count",
help="For storing manufacturing order count.",
)
stock_move_count = fields.Integer(
string="Stock Move Count",
compute="compute_stock_move_count",
help="Store the stock move count.",
)
priority = fields.Selection(
PROCUREMENT_PRIORITIES,
string="Priority",
default="0",
help="Components will be reserved first for the MO "
"with the highest priorities.",
)
@api.model_create_multi
def create(self, vals):
"""Creating sequence number."""
records = super(WaterSupplyRequest, self).create(vals)
for record in records:
if record.reference_no == _("New"):
reference_no = self.env["ir.sequence"].next_by_code(
"water_supply_request"
) or _("New")
record.write({"reference_no": reference_no})
return records
@api.onchange("supply_method_ids")
def _onchange_supply_method_ids(self):
"""This method is triggered when the 'supply_method_ids' field is
changed. It fills the 'create_mo_ids' many2many field with
manufacturing order data based on the selected supply method's
information."""
self.create_mo_ids = False
for record in self.supply_method_ids:
product = self.env["product.product"].browse(record.created_product_id.id)
bom = self.env["mrp.bom"].search([("product_id", "=", product.id)], limit=1)
self.create_mo_ids = [
fields.Command.create(
{
"product_id": product.id,
"quantity": bom.product_qty,
"uom_id": product.uom_id.id,
"bom_id": bom,
}
)
]
def action_apply(self):
"""Stock move will occur when supply the product to the customer."""
self.write({"state": "created"})
src_location = self.env["stock.location"].search(
[("usage", "=", "internal"), ("name", "=", "Stock")], limit=1
)
dest_location = self.env["stock.location"].search(
[("usage", "=", "customer")], limit=1
)
for rec in self.create_mo_ids:
move = self.env["stock.move"].create(
{
"name": self.reference_no,
"origin": self.reference_no,
"location_id": src_location.id,
"location_dest_id": dest_location.id,
"product_id": rec.product_id.id,
"product_uom": rec.product_id.uom_id.id,
"product_uom_qty": rec.quantity,
"supply_id": self.id,
}
)
move.write({"state": "done"})
manufacturing_order = self.env["mrp.production"].search(
[("name", "=", self.create_mo_ids.mrp_id.mapped("name"))]
)
manufacturing_order.write({"supply_id": self})
def action_supply(self):
"""Enabling the boolean field if the request is supplied."""
self.write({"state": "supplied"})
if self.state == "supplied":
self.is_closed = True
def action_stock_move(self):
"""Opens a window displaying stock moves related to the current
record."""
self.ensure_one()
return {
"type": "ir.actions.act_window",
"name": "Stock Move",
"view_mode": "tree,form",
"res_model": "stock.move",
"domain": [("supply_id", "=", self.id)],
}
def action_mrp_production(self):
"""Display the production records associated with the current supply
order."""
self.ensure_one()
return {
"type": "ir.actions.act_window",
"name": "Manufacturing Order",
"view_mode": "tree,form",
"res_model": "mrp.production",
"domain": [("supply_id", "=", self.id)],
}
def compute_mo_count(self):
"""This method calculates the number of manufacturing orders
associated with the current record and updates the 'mo_count'
field on each record accordingly."""
for record in self:
record.mo_count = self.env["mrp.production"].search_count(
[("supply_id", "=", self.id)]
)
def compute_stock_move_count(self):
"""This method iterates through the records in `self` and calculates
the number of stock moves associated with each record. It sets the
`stock_move_count` field of each record to the corresponding count."""
for record in self:
record.stock_move_count = self.env["stock.move"].search_count(
[("supply_id", "=", self.id)]
)

35
water_supply_with_mo/models/water_usage_categories.py

@ -0,0 +1,35 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Irfan T (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from odoo import fields, models
class WaterUsageCategories(models.Model):
"""Creating water usage categories."""
_name = 'water.usage.categories'
_description = 'Water Usage Categories'
_inherit = ['mail.thread', 'mail.activity.mixin']
_rec_name = 'usage_category_name'
code = fields.Char(string='Usage Category Code',
help='Usage category code')
usage_category_name = fields.Char(string='Usage Category Name',
help='Usage category name')

34
water_supply_with_mo/models/water_usage_places.py

@ -0,0 +1,34 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Irfan T (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from odoo import fields, models
class WaterUsagePlaces(models.Model):
"""Creating water usage places."""
_name = 'water.usage.places'
_description = 'Water Usage Places'
_inherit = ['mail.thread', 'mail.activity.mixin']
_rec_name = 'usage_place_name'
code = fields.Char(string='Code', help='Code of the water usage places')
usage_place_name = fields.Char(string='Usage Places Name',
help='Usage places name')

6
water_supply_with_mo/security/ir.model.access.csv

@ -0,0 +1,6 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_water_supply_methods_user,access.water.supply.methods.water.supply.with.mo.supplier.user,model_water_supply_methods,water_supply_with_mo_supplier_user,1,1,1,1
access_water_supply_request_user,access.water.supply.request.user,model_water_supply_request,water_supply_with_mo_supplier_user,1,1,1,1
access_water_usage_categories_user,access.water.usage.categories.user,model_water_usage_categories,water_supply_with_mo_supplier_user,1,1,1,1
access_water_usage_places_user,access.water.usage.places.user,model_water_usage_places,water_supply_with_mo_supplier_user,1,1,1,1
access_manufacturing_order_creation_user,access.manufacturing.order.creation.user,model_manufacturing_order_creation,water_supply_with_mo_supplier_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_water_supply_methods_user access.water.supply.methods.water.supply.with.mo.supplier.user model_water_supply_methods water_supply_with_mo_supplier_user 1 1 1 1
3 access_water_supply_request_user access.water.supply.request.user model_water_supply_request water_supply_with_mo_supplier_user 1 1 1 1
4 access_water_usage_categories_user access.water.usage.categories.user model_water_usage_categories water_supply_with_mo_supplier_user 1 1 1 1
5 access_water_usage_places_user access.water.usage.places.user model_water_usage_places water_supply_with_mo_supplier_user 1 1 1 1
6 access_manufacturing_order_creation_user access.manufacturing.order.creation.user model_manufacturing_order_creation water_supply_with_mo_supplier_user 1 1 1 1

14
water_supply_with_mo/security/water_supply_with_mo_groups.xml

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Creating category water supply-->
<record id="module_category_water_supply_with_mo"
model="ir.module.category">
<field name="name">Water Supply</field>
</record>
<!-- Creating water supplier user group-->
<record id="water_supply_with_mo_supplier_user" model="res.groups">
<field name="name">Water Supplier User</field>
<field name="category_id"
ref="water_supply_with_mo.module_category_water_supply_with_mo"/>
</record>
</odoo>

BIN
water_supply_with_mo/static/description/assets/icons/check.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
water_supply_with_mo/static/description/assets/icons/chevron.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

BIN
water_supply_with_mo/static/description/assets/icons/cogs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
water_supply_with_mo/static/description/assets/icons/consultation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
water_supply_with_mo/static/description/assets/icons/ecom-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

BIN
water_supply_with_mo/static/description/assets/icons/education-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

BIN
water_supply_with_mo/static/description/assets/icons/hotel-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

BIN
water_supply_with_mo/static/description/assets/icons/license.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
water_supply_with_mo/static/description/assets/icons/lifebuoy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
water_supply_with_mo/static/description/assets/icons/manufacturing-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
water_supply_with_mo/static/description/assets/icons/pos-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
water_supply_with_mo/static/description/assets/icons/puzzle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
water_supply_with_mo/static/description/assets/icons/restaurant-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
water_supply_with_mo/static/description/assets/icons/service-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

BIN
water_supply_with_mo/static/description/assets/icons/trading-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
water_supply_with_mo/static/description/assets/icons/training.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

BIN
water_supply_with_mo/static/description/assets/icons/update.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
water_supply_with_mo/static/description/assets/icons/user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

BIN
water_supply_with_mo/static/description/assets/icons/wrench.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
water_supply_with_mo/static/description/assets/misc/categories.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
water_supply_with_mo/static/description/assets/misc/check-box.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
water_supply_with_mo/static/description/assets/misc/compass.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
water_supply_with_mo/static/description/assets/misc/corporate.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
water_supply_with_mo/static/description/assets/misc/customer-support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
water_supply_with_mo/static/description/assets/misc/cybrosys-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
water_supply_with_mo/static/description/assets/misc/features.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

BIN
water_supply_with_mo/static/description/assets/misc/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
water_supply_with_mo/static/description/assets/misc/pictures.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
water_supply_with_mo/static/description/assets/misc/pie-chart.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
water_supply_with_mo/static/description/assets/misc/right-arrow.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

BIN
water_supply_with_mo/static/description/assets/misc/star.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
water_supply_with_mo/static/description/assets/misc/support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
water_supply_with_mo/static/description/assets/misc/whatsapp.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
water_supply_with_mo/static/description/assets/modules/barcode_scanning_sale_purchase.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
water_supply_with_mo/static/description/assets/modules/sale_customer_product_history.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
water_supply_with_mo/static/description/assets/modules/sale_discount_total.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
water_supply_with_mo/static/description/assets/modules/sale_order_line_multi_warehouse.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

BIN
water_supply_with_mo/static/description/assets/modules/sale_product_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
water_supply_with_mo/static/description/assets/modules/sale_report_advanced.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
water_supply_with_mo/static/description/assets/screenshots/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

BIN
water_supply_with_mo/static/description/assets/screenshots/10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

BIN
water_supply_with_mo/static/description/assets/screenshots/11.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

BIN
water_supply_with_mo/static/description/assets/screenshots/13.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

BIN
water_supply_with_mo/static/description/assets/screenshots/14.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
water_supply_with_mo/static/description/assets/screenshots/15.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
water_supply_with_mo/static/description/assets/screenshots/16.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

BIN
water_supply_with_mo/static/description/assets/screenshots/17.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

BIN
water_supply_with_mo/static/description/assets/screenshots/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

BIN
water_supply_with_mo/static/description/assets/screenshots/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
water_supply_with_mo/static/description/assets/screenshots/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
water_supply_with_mo/static/description/assets/screenshots/5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
water_supply_with_mo/static/description/assets/screenshots/6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

BIN
water_supply_with_mo/static/description/assets/screenshots/7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

BIN
water_supply_with_mo/static/description/assets/screenshots/8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

BIN
water_supply_with_mo/static/description/assets/screenshots/9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

BIN
water_supply_with_mo/static/description/assets/screenshots/hero.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

BIN
water_supply_with_mo/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
water_supply_with_mo/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

690
water_supply_with_mo/static/description/index.html

@ -0,0 +1,690 @@
<div style="background-color: #714B67; height: 810px; width: 100%; padding: 15px; position: relative;">
<!-- TITLE BAR -->
<div class="d-flex align-items-center justify-content-between"
style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;">
<img src="assets/misc/cybrosys-logo.png" width="42" height="42"
style="width: 42px; height: 42px;"/>
<div>
<div
style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Community
</div>
<div
style="color: #875A7B; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Enterprise
</div>
<div
style="color: #017E84; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Odoo.sh
</div>
</div>
</div>
<!-- END OF TITLE BAR -->
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12">
<!-- APP HERO -->
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;">
Water Supply With Manufacturing Order
</h1>
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">
This App Allows Us To Quickly Create Manufacturing Orders
Directly From The Water Supply Request.
</p>
<!-- END OF APP HERO -->
<img src="assets/screenshots/hero.gif" class="img-responsive"
style="width: 100%; margin-left: auto; margin-right: auto;"/>
</div>
</div>
</div>
</div>
<!-- NAVIGATION SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/compass.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Explore This
Module</h2>
</div>
<div class="row my-4" style="font-family: 'Montserrat', sans-serif;">
<div class="col-sm-12 col-md-6 my-3">
<a href="#overview">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Overview</span>
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">Learn
more about this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36"/>
</div>
</a>
</div>
<div class="col-sm-12 col-md-6 my-3">
<a href="#features">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Features</span>
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View
features of this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36"/>
</div>
</a>
</div>
<div class="col-sm-12 col-md-6 my-3">
<a href="#screenshots">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Screenshots</span>
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View
screenshots for this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36"/>
</div>
</a>
</div>
</div>
<!-- END OF NAVIGATION SECTION -->
<!-- OVERVIEW SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"
id="overview">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/pie-chart.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Overview
</h2>
</div>
<div class="row"
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="col-sm-12 py-4">
This module helps to create manufacturing orders from water supply's
request form if supply method is unavailable at the supply time.
</div>
</div>
<!-- END OF OVERVIEW SECTION -->
<!-- FEATURES SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"
id="features">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/features.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Features
</h2>
</div>
<div class="row"
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="col-sm-12 col-md-6">
<div class="d-flex align-items-center"
style="margin-top: 40px; margin-bottom: 40px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Community &amp; Enterprise
Support.</span>
</div>
<div class="d-flex align-items-center"
style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Allow us to create manufacturing order directly from the water supply requests form.</span>
</div>
<div class="d-flex align-items-center"
style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Set the water supply request reference on manufacturing order.</span>
</div>
<div class="d-flex align-items-center"
style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">We can see the manufacturing orders list in a smart button</span>
</div>
<div class="d-flex align-items-center"
style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">We can see the stock moves list in a smart button</span>
</div>
</div>
</div>
<div class="col-sm-12 col-md-6">
</div>
<!--</div>-->
<!-- END OF FEATURES SECTION -->
<!-- SCREENSHOTS SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"
id="screenshots">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/pictures.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Screenshots
</h2>
</div>
<div class="row">
<div class="col-sm-12">
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Set a Water Supply User in users.</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
<img src="assets/screenshots/1.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
We can see the Menu's
</h3>
<img src="assets/screenshots/2.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Create Water Usage Places
</h3>
<img src="assets/screenshots/3.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Create Water Supply Methods</h3>
<img src="assets/screenshots/4.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Create Water Usage Categories</h3>
<img src="assets/screenshots/5.png"
class="img-thumbnail">
</div>
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Create BOM for products.</h3>
<img src="assets/screenshots/6.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<img src="assets/screenshots/7.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
By clicking create MO button we can create manufacturing
orders.</h3>
<img src="assets/screenshots/8.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Manufacturing
Order for Watter Bottle.</h3>
<img src="assets/screenshots/10.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Manufacturing
Order for Watter Tank.</h3>
<img src="assets/screenshots/9.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
We can see corresponding Manufacturing Order name.</h3>
<img src="assets/screenshots/11.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
By clicking APPLY button this form will create.</h3>
<img src="assets/screenshots/13.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Tree view of Manufacturing Order.</h3>
<img src="assets/screenshots/14.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Tree view of Stock Move.</h3>
<img src="assets/screenshots/15.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
By clicking SUPPLY button it will be supplied to the customer.</h3>
<img src="assets/screenshots/16.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
This supply will be closed and goes to the supplied state.</h3>
<img src="assets/screenshots/16.png"
class="img-thumbnail">
</div>
<!-- -->
</div>
<!-- END OF SCREENSHOTS SECTION -->
<!-- RELATED PRODUCTS -->
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center"
style="text-align: center; padding: 2.5rem 1rem !important;">
<h2 style="color: #212529 !important;">Suggested Products</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;"/>
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner">
<div class="carousel-item active" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/sale_discount_total/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/sale_discount_total.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/barcode_scanning_sale_purchase/#"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/barcode_scanning_sale_purchase.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/sale_report_advanced/#"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/sale_report_advanced.png">
</div>
</a>
</div>
</div>
<div class="carousel-item" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/sale_product_image/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/sale_product_image.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/sale_customer_product_history/#"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/sale_customer_product_history.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/sale_order_line_multi_warehouse/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/sale_order_line_multi_warehouse.png">
</div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev"
style="left:-25px;width: 35px;color: #000;">
<span class="carousel-control-prev-icon"><i
class="fa fa-chevron-left"
style="font-size:24px"></i></span> </a>
<a class="carousel-control-next" href="#demo1" data-slide="next"
style="right:-25px;width: 35px;color: #000;">
<span class="carousel-control-next-icon"><i
class="fa fa-chevron-right"
style="font-size:24px"></i></span>
</a>
</div>
</div>
</div>
<!-- END OF RELATED PRODUCTS -->
<!-- OUR SERVICES -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/star.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Our Services
</h2>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/cogs.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Customization</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/wrench.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/lifebuoy.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Support</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/user.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Hire
Odoo
Developer</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/puzzle.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Integration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/update.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Migration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/consultation.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Consultancy</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/training.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/license.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Licensing Consultancy</h6>
</div>
</div>
</div>
<!-- END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/corporate.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Our
Industries
</h2>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/trading-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Trading
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easily procure
and
sell your products</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/pos-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
POS
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easy
configuration
and convivial experience</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/education-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Education
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
A platform for
educational management</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/manufacturing-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Manufacturing
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Plan, track and
schedule your operations</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/ecom-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
E-commerce &amp; Website
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Mobile
friendly,
awe-inspiring product pages</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/service-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Service Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Keep track of
services and invoice</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/restaurant-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Restaurant
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Run your bar or
restaurant methodically</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/hotel-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Hotel Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
An
all-inclusive
hotel management application</p>
</div>
</div>
</div>
</div>
<!-- END OF OUR INDUSTRIES -->
<!-- SUPPORT -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/customer-support.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Support
</h2>
</div>
<div class="container mt-5">
<div class="row">
<div class="col-sm-12 col-md-6">
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;">
<div class="mr-4 d-flex justify-content-center align-items-center"
style="background-color: #714B67; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;">
<img src="assets/misc/support.png" height="48" width="48"
style="width: 42px; height: 42px;"/>
</div>
<div>
<h4>Need Help?</h4>
<p style="line-height: 100%;">Got questions or need help?
Get in touch.</p>
<a href="mailto:odoo@cybrosys.com">
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;">
odoo@cybrosys.com</p>
</a>
</div>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;">
<div class="mr-4 d-flex justify-content-center align-items-center"
style="background-color: #2AC44D; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;">
<img src="assets/misc/whatsapp.png" height="52" width="52"
style="width: 52px; height: 52px;"/>
</div>
<div>
<h4>WhatsApp</h4>
<p style="line-height: 100%;">Say hi to us on WhatsApp!</p>
<a href="https://api.whatsapp.com/send?phone=918606827707">
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;">
+91 86068
27707</p>
</a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 my-5 d-flex justify-content-center align-items-center">
<img src="assets/misc/logo.png" width="144" height="31"
style="width:144px; height: 31px; margin-top: 40px;"/>
</div>
</div>
</div>
<!-- END OF SUPPORT -->

33
water_supply_with_mo/views/manufacturing_order_creation_views.xml

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!--This record represents an action window for creating manufacturing orders.-->
<record id="manufacturing_order_creation_action"
model="ir.actions.act_window">
<field name="name">creation Manufacturing Order</field>
<field name="res_model">manufacturing.order.creation</field>
<field name="view_mode">tree,form</field>
</record>
<!-- XML View for Manufacturing Order Creation-->
<record id="manufacturing_order_creation_view_tree" model="ir.ui.view">
<field name="name">manufacturing.order.creation.view.tree</field>
<field name="model">manufacturing.order.creation</field>
<field name="arch" type="xml">
<tree string="MO" editable="bottom">
<field name="product_id"
attrs="{'readonly': [('parent.state', '!=', 'draft')]}"/>
<field name="quantity"
attrs="{'readonly': [('parent.state', '!=', 'draft')]}"/>
<field name="uom_id"
attrs="{'readonly': [('parent.state', '!=', 'draft')]}"/>
<field name="bom_id"
attrs="{'readonly': [('parent.state', '!=', 'draft')]}"/>
<field name="mrp_id" readonly="1"/>
<field name="is_mo" invisible="1"/>
<button string="Create MO" name="action_creating_mo"
type="object"
class="oe_stat_button" icon="fa-cog"
attrs="{'invisible': ['|', ('is_mo', '=', False), ('parent.state', '=', 'draft')]}"/>
</tree>
</field>
</record>
</odoo>

16
water_supply_with_mo/views/mrp_production_views.xml

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!--Adding field in manufacturing model -->
<record id="mrp_production_form_view" model="ir.ui.view">
<field name="name">
mrp.production.view.form.inherit.water.supply.with.mo
</field>
<field name="model">mrp.production</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='company_id']" position="after">
<field name="supply_id"/>
</xpath>
</field>
</record>
</odoo>

44
water_supply_with_mo/views/water_supply_method_views.xml

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Water supply methods model action-->
<record id="water_supply_methods_action" model="ir.actions.act_window">
<field name="name">Water Supply Methods</field>
<field name="res_model">water.supply.methods</field>
<field name="view_mode">tree,form</field>
</record>
<!--Model tree view-->
<record id="water_supply_methods_view_tree" model="ir.ui.view">
<field name="name">water.supply.methods.view.tree</field>
<field name="model">water.supply.methods</field>
<field name="arch" type="xml">
<tree string="Stages" multi_edit="1">
<field name="code"/>
<field name="supply_name"/>
</tree>
</field>
</record>
<!-- Model form view-->
<record id="water_supply_methods_view_form" model="ir.ui.view">
<field name="name">water.supply.methods.view.form</field>
<field name="model">water.supply.methods</field>
<field name="arch" type="xml">
<form string="Test">
<sheet>
<group>
<group>
<field name="code"/>
</group>
<group>
<field name="supply_name"/>
</group>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
</odoo>

114
water_supply_with_mo/views/water_supply_request_views.xml

@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Water Supply Request model action-->
<record id="water_supply_request_action" model="ir.actions.act_window">
<field name="name">Supply Request</field>
<field name="res_model">water.supply.request</field>
<field name="view_mode">tree,form</field>
</record>
<!--Water supply request model tree view-->
<record id="water_supply_request_view_tree" model="ir.ui.view">
<field name="name">water.supply.request.view.tree</field>
<field name="model">water.supply.request</field>
<field name="arch" type="xml">
<tree string="Stages" multi_edit="1">
<field name="reference_no"/>
<field name="responsible_user_id"/>
<field name="customer_name_id"/>
<field name="request_date"/>
<field name="is_closed" invisible="1"/>
<field name="date_planned_start" widget="remaining_days"/>
</tree>
</field>
</record>
<!-- Water supply request model form view-->
<record id="water_supply_request_view_form" model="ir.ui.view">
<field name="name">water.supply.request.view.form</field>
<field name="model">water.supply.request</field>
<field name="arch" type="xml">
<form string="Test">
<header>
<field name="state" widget="statusbar"
statusbar_visible="draft,supplied"/>
<button string="Apply" type="object"
name="action_apply"
attrs="{'invisible': [('state', '!=', 'draft')]}"
class="oe_highlight"
/>
<button string="Supply" type="object"
name="action_supply"
attrs="{'invisible': [('state', '!=', 'created')]}"
class="oe_highlight"
/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button"
name="action_stock_move"
type="object" icon="fa-user"
attrs="{'invisible': [('state', '=', 'draft')]}">
<field string="Stock Moves" name="stock_move_count"
widget="statinfo"/>
</button>
<button class="oe_stat_button"
name="action_mrp_production"
type="object"
icon="fa-cog"
attrs="{'invisible': [('state', '=', 'draft')]}">
<field string="Manufacturing Orders" name="mo_count"
widget="statinfo"/>
</button>
</div>
<group>
<div class="oe_title">
<h1>
<field name="reference_no"/>
</h1>
</div>
</group>
<group>
<group>
<field name="responsible_user_id"/>
<field name="customer_name_id"/>
<field name="customer_email"
widget="email"/>
<field name="customer_address"/>
<field name="create_date"/>
<field name="is_closed" invisible="1"/>
</group>
<group>
<field name="pickup_date"/>
<field name="request_date"/>
<field name="supply_method_ids"
widget="many2many_tags"/>
<field name="usage_categories_ids"
widget="many2many_tags"/>
<field name="usage_place_id"/>
</group>
</group>
<notebook>
<page string="Create MO">
<field name="create_mo_ids" editable="bottom"/>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
<!-- This record defines a custom search view for the 'water supply request' model. -->
<record id="water_supply_request_view_search" model="ir.ui.view">
<field name="name">water.supply.request.view.search</field>
<field name="model">water.supply.request</field>
<field name="arch" type="xml">
<search string="Report Xml">
<filter string="Is closed" name="groupby_phone"
domain="[('is_closed','=', True)]"/>
</search>
</field>
</record>
</odoo>

21
water_supply_with_mo/views/water_supply_with_mo_menus.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Root menu of Water Supply -->
<menuitem id="water_supply_with_mo_menu_root" name="Water Supply"
web_icon="water_supply_with_mo,static/description/icon.png"/>
<!-- Sub menus -->
<menuitem id="water_supply_request_menu" name="Supply Requests"
parent="water_supply_with_mo_menu_root"
action="water_supply_request_action"/>
<menuitem id="water_supply_request_menu_configuration" name="Configuration"
parent="water_supply_with_mo_menu_root">
<menuitem id="water_usage_categories_menu_action"
name="Supply Usage Categories"
action="water_usage_categories_action"/>
<menuitem id="water_supply_methods_menu_action"
name="Supply Requests Method"
action="water_supply_methods_action"/>
<menuitem id="water_usage_place_menu_action" name="Supply Usage Place"
action="water_usage_places_action"/>
</menuitem>
</odoo>

45
water_supply_with_mo/views/water_usage_categories_views.xml

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Water usage categories model action-->
<record id="water_usage_categories_action"
model="ir.actions.act_window">
<field name="name">Water Usage Categories</field>
<field name="res_model">water.usage.categories</field>
<field name="view_mode">tree,form</field>
</record>
<!--Water usage categories model tree view-->
<record id="water_usage_categories_view_tree" model="ir.ui.view">
<field name="name">water.usage.categories.view.tree</field>
<field name="model">water.usage.categories</field>
<field name="arch" type="xml">
<tree string="Stages" multi_edit="1">
<field name="code"/>
<field name="usage_category_name"/>
</tree>
</field>
</record>
<!-- Water usage categories model form view-->
<record id="water_usage_categories_view_form" model="ir.ui.view">
<field name="name">water.usage.categories.view.form</field>
<field name="model">water.usage.categories</field>
<field name="arch" type="xml">
<form string="Test">
<sheet>
<group>
<group>
<field name="code"/>
</group>
<group>
<field name="usage_category_name"/>
</group>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
</odoo>

44
water_supply_with_mo/views/water_usage_places_views.xml

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Water usage places model action-->
<record id="water_usage_places_action" model="ir.actions.act_window">
<field name="name">Water Usage Places</field>
<field name="res_model">water.usage.places</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Water usage places model tree view-->
<record id="water_usage_places_view_tree" model="ir.ui.view">
<field name="name">water.usage.places.view.tree</field>
<field name="model">water.usage.places</field>
<field name="arch" type="xml">
<tree string="Stages" multi_edit="1">
<field name="code"/>
<field name="usage_place_name"/>
</tree>
</field>
</record>
<!--Water usage places model form view-->
<record id="water_usage_places_view_form" model="ir.ui.view">
<field name="name">water.usage.places.view.form</field>
<field name="model">water.usage.places</field>
<field name="arch" type="xml">
<form string="Test">
<sheet>
<group>
<group>
<field name="code"/>
</group>
<group>
<field name="usage_place_name"/>
</group>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
</odoo>
Loading…
Cancel
Save