Browse Source

Jan 08 : [ADD] Initial Commit 'sales_stock_reservation'

pull/254/merge
RisvanaCybro 1 year ago
parent
commit
2f25ea80d4
  1. 45
      sales_stock_reservation/README.rst
  2. 23
      sales_stock_reservation/__init__.py
  3. 47
      sales_stock_reservation/__manifest__.py
  4. 13
      sales_stock_reservation/data/ir_sequence_data.xml
  5. 10
      sales_stock_reservation/data/stock_location_data.xml
  6. 7
      sales_stock_reservation/doc/RELEASE_NOTES.md
  7. 24
      sales_stock_reservation/models/__init__.py
  8. 48
      sales_stock_reservation/models/res_config_settings.py
  9. 158
      sales_stock_reservation/models/sale_order.py
  10. 61
      sales_stock_reservation/models/stock_reserved.py
  11. 4
      sales_stock_reservation/security/ir.model.access.csv
  12. BIN
      sales_stock_reservation/static/description/assets/icons/check.png
  13. BIN
      sales_stock_reservation/static/description/assets/icons/chevron.png
  14. BIN
      sales_stock_reservation/static/description/assets/icons/cogs.png
  15. BIN
      sales_stock_reservation/static/description/assets/icons/consultation.png
  16. BIN
      sales_stock_reservation/static/description/assets/icons/ecom-black.png
  17. BIN
      sales_stock_reservation/static/description/assets/icons/education-black.png
  18. BIN
      sales_stock_reservation/static/description/assets/icons/hotel-black.png
  19. BIN
      sales_stock_reservation/static/description/assets/icons/license.png
  20. BIN
      sales_stock_reservation/static/description/assets/icons/lifebuoy.png
  21. BIN
      sales_stock_reservation/static/description/assets/icons/logo.png
  22. BIN
      sales_stock_reservation/static/description/assets/icons/manufacturing-black.png
  23. BIN
      sales_stock_reservation/static/description/assets/icons/pos-black.png
  24. BIN
      sales_stock_reservation/static/description/assets/icons/puzzle.png
  25. BIN
      sales_stock_reservation/static/description/assets/icons/restaurant-black.png
  26. BIN
      sales_stock_reservation/static/description/assets/icons/service-black.png
  27. BIN
      sales_stock_reservation/static/description/assets/icons/trading-black.png
  28. BIN
      sales_stock_reservation/static/description/assets/icons/training.png
  29. BIN
      sales_stock_reservation/static/description/assets/icons/update.png
  30. BIN
      sales_stock_reservation/static/description/assets/icons/user.png
  31. BIN
      sales_stock_reservation/static/description/assets/icons/wrench.png
  32. BIN
      sales_stock_reservation/static/description/assets/modules/budget_image.png
  33. BIN
      sales_stock_reservation/static/description/assets/modules/credit_image.png
  34. BIN
      sales_stock_reservation/static/description/assets/modules/employee_image.png
  35. BIN
      sales_stock_reservation/static/description/assets/modules/export_image.png
  36. BIN
      sales_stock_reservation/static/description/assets/modules/gantt_image.png
  37. BIN
      sales_stock_reservation/static/description/assets/modules/quotation_image.png
  38. BIN
      sales_stock_reservation/static/description/assets/screenshots/hero.gif
  39. BIN
      sales_stock_reservation/static/description/assets/screenshots/sr1.png
  40. BIN
      sales_stock_reservation/static/description/assets/screenshots/sr10.png
  41. BIN
      sales_stock_reservation/static/description/assets/screenshots/sr2.png
  42. BIN
      sales_stock_reservation/static/description/assets/screenshots/sr3.png
  43. BIN
      sales_stock_reservation/static/description/assets/screenshots/sr4.png
  44. BIN
      sales_stock_reservation/static/description/assets/screenshots/sr5.png
  45. BIN
      sales_stock_reservation/static/description/assets/screenshots/sr6.png
  46. BIN
      sales_stock_reservation/static/description/assets/screenshots/sr7.png
  47. BIN
      sales_stock_reservation/static/description/assets/screenshots/sr8.png
  48. BIN
      sales_stock_reservation/static/description/assets/screenshots/sr9.png
  49. BIN
      sales_stock_reservation/static/description/banner.png
  50. BIN
      sales_stock_reservation/static/description/icon.png
  51. 659
      sales_stock_reservation/static/description/index.html
  52. 57
      sales_stock_reservation/views/res_config_settings_views.xml
  53. 43
      sales_stock_reservation/views/sale_order_views.xml
  54. 22
      sales_stock_reservation/wizard/__init__.py
  55. 157
      sales_stock_reservation/wizard/sale_stock_reservation.py
  56. 38
      sales_stock_reservation/wizard/sale_stock_reservation_views.xml

45
sales_stock_reservation/README.rst

@ -0,0 +1,45 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
Product Stock Reservation
==========================
Allow sales users to create a product stock reservation from the sales quotation form.
Configuration
=============
* No additional configurations needed
License
-------
GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3)
(https://www.gnu.org/licenses/agpl.html)
Company
-------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
Credits
-------
* Developer: (V15) Akhil Ashok, 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>`__

23
sales_stock_reservation/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Akhil Ashok @cybrosys(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
from . import wizard

47
sales_stock_reservation/__manifest__.py

@ -0,0 +1,47 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Akhil Ashok @cybrosys(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': 'Product Stock Reservation',
'version': "15.0.1.0.0",
'category': 'Sales,Warehouse',
'summary': """ Reserve Product for Sales Order.""",
'description': """This module allow sales users to create a product stock
reservation from the sales quotation form.""",
'author': "Cybrosys Techno Solutions",
'company': "Cybrosys Techno Solutions",
'maintainer': "Cybrosys Techno Solutions",
'website': "https://www.cybrosys.com",
'depends': ['sale_management', 'stock', 'mail'],
'data': [
'security/ir.model.access.csv',
'views/sale_order_views.xml',
'views/res_config_settings_views.xml',
'wizard/sale_stock_reservation_views.xml',
'data/stock_location_data.xml',
'data/ir_sequence_data.xml',
],
'images': ['static/description/banner.png'],
'license': "AGPL-3",
'installable': True,
'auto_install': False,
'application': False
}

13
sales_stock_reservation/data/ir_sequence_data.xml

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Define the sequence for stock reservations -->
<record id="seq_stock_reserved" model="ir.sequence">
<field name="name">Sock Reserved Sequence</field>
<field name="code">stock.reserved</field>
<field name="prefix">STOCK/RES/</field>
<field name="padding">3</field>
<field name="company_id" eval="False"/>
</record>
</data>
</odoo>

10
sales_stock_reservation/data/stock_location_data.xml

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- Define the stock location for sale stock reservations -->
<record id="sale_stock_reservation" model="stock.location">
<field name="name">Stock Reservation Location</field>
<field name="location_id" ref="stock.stock_location_locations"/>
</record>
</data>
</odoo>

7
sales_stock_reservation/doc/RELEASE_NOTES.md

@ -0,0 +1,7 @@
## Module <sales_stock_reservation>
#### 27.12.2023
#### Version 15.0.1.0.0
##### ADD
- Initial commit for Product Stock Reservation

24
sales_stock_reservation/models/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Akhil Ashok @cybrosys(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 sale_order
from . import stock_reserved
from . import res_config_settings

48
sales_stock_reservation/models/res_config_settings.py

@ -0,0 +1,48 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Akhil Ashok @cybrosys(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 ResConfigSettings(models.TransientModel):
"""
Inherits the Res Config Settings model to add two many-to-one fields for
selecting source and destination locations. These fields are used to
configure the source and destination locations for stock reservations.
"""
_inherit = 'res.config.settings'
source_location_id = fields.Many2one("stock.location",
String="Source Location",
config_parameter=
'sales_stock_reservation.source_location_id',
help=
'This is a Many2one field that refers '
'to the location from'
'which the products will be sourced.')
destination_location_id = fields.Many2one("stock.location",
String="Destination Location",
config_parameter=
'sales_stock_reservation.destination_location_id',
help=
'This is a Many2one field that '
'refers to the location to which '
'the products will be delivered.')

158
sales_stock_reservation/models/sale_order.py

@ -0,0 +1,158 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Akhil Ashok @cybrosys(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 SaleOrder(models.Model):
"""
Inherits the Sale Order model to add the ability to apply stock
reservation for products in draft state. This model also adds a state for
tracking the reservation status and a one-to-many relationship to the
Stock Reserved model for storing the details of the reserved stock.
"""
_inherit = "sale.order"
apply_stock_reservation = fields.Boolean(string="Apply stock reservation",
help="Apply stock reservation in "
"draft")
state_reservation = fields.Selection([
('reserved', 'Reserved'), ('cancel', 'Cancelled')],
help="Condition for visibility of buttons")
reserved_stock_ids = fields.One2many("stock.reserved", "sale_order_id",
string="Reserved Stock",
help="Stock reserved details")
def action_create_stock_reservation(self):
"""
This function creates a stock reservation based on the current sale
order's order lines.
If the sale order has order lines, the function creates a list of
tuples representing the order lines,which are used to set default
values for the stock reservation. Each tuple contains three elements:
(0, 0, {...}), where the dictionary contains values for the following
fields of the stock reservation:
- order_line_name: a string representing the name of the sale order
and the order line, concatenated
- product_id: the ID of the product being reserved
- quantity: the quantity being reserved, in the unit of measure
specified by the order line
- unit_of_measure_id: the ID of the unit of measure being used for the
reservation
- reserve_quantity: the quantity being reserved, in the unit of
measure specified by the product
If the sale order does not have any order lines, an empty list
created.
The function then returns a dictionary representing an action to
create a new stock reservation.
The dictionary has the following keys:
- name: a string representing the name of the action
- type: a string representing the type of the action (in this case,
'ir.actions.act_window')
- view_type: a string representing the type of view to use
(in this case, 'form')
- view_mode: a string representing the mode of the view
(in this case, 'form')
- res_model: a string representing the name of the model being used
(in this case,'sale.stock.reservation')
- context: a dictionary representing the context to use when creating
the stock reservation
- default_sale_order_id: the ID of the sale order being used as the
basis for the reservation
- default_stock_reservation_ids: the list of tuples representing the
order lines (or an empty list)
- view_id: the ID of the view to use (retrieved using self.env.ref())
- target: a string representing the target for the action
(in this case, 'new')
:return: a dictionary representing the action to create a new stock
reservation
"""
line_vals = [(0, 0, {
'order_line_name': f"{self.name}-{line.name}",
'product_id': line.product_id.id,
'quantity': line.product_uom_qty,
'unit_of_measure_id': line.product_uom.id,
'reserve_quantity': line.product_uom_qty
}) for line in self.order_line] if self.order_line else []
return {
'name': "Stock Reservation",
'type': 'ir.actions.act_window',
'view_type': 'form',
'view_mode': 'form',
'res_model': 'sale.stock.reservation',
'context': {'default_sale_order_id': self.id,
'default_stock_reservation_ids': line_vals},
'view_id': self.env.ref(
'sales_stock_reservation.sale_stock_reservation_view_form').id,
'target': 'new',
}
def action_cancel_reservation(self):
"""
This function cancels a stock reservation by setting its state to
'cancel', cancelling the moves associated with the reservation's
reserved stock,and setting the status of the reserved stock to
'cancelled'.
The function first sets the `state_reservation` field of the current
object to 'cancel'.
It then retrieves the `move_id` field of each reserved stock associated
with the reservation using `mapped()`,and calls the `_action_cancel()`
method on the resulting recordset to cancel the moves.
After cancelling the moves, the function sets the `status` field of each
reserved stock associated with the reservation to 'cancelled' using
`mapped()`.
Finally, the function returns True to indicate that the cancellation
was successful.
:return: True if the reservation was successfully cancelled, False
otherwise
"""
self.state_reservation = 'cancel'
self.reserved_stock_ids.mapped('move_id')._action_cancel()
self.mapped("reserved_stock_ids").status = 'cancelled'
return True
def action_confirm(self):
"""
This function confirms a sale order by calling the parent
`action_confirm()` method and then cancelling any associated stock
reservation.
The function first calls the `super()` method to confirm the sale order
using the parent implementation.
It then calls the `cancel_reservation()` method to cancel any existing
stock reservation associated with the sale order.
Finally, the function returns the result of the `super()` method call to
indicate whether the sale order was successfully confirmed.
:return: the result of the parent `action_confirm()` method call
"""
res = super().action_confirm()
self.action_cancel_reservation()
return res

61
sales_stock_reservation/models/stock_reserved.py

@ -0,0 +1,61 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Akhil Ashok @cybrosys(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 StockReserved(models.Model):
"""
This model stores details of product reservations made in sale orders.
"""
_name = "stock.reserved"
_description = "Reserved stock details"
name = fields.Char(string="Name", readonly="True", help="Name")
order_line_name = fields.Char(string="Order Line", readonly="True",
help="Name of order line")
product_id = fields.Many2one("product.product", string="Product",
readonly="True", help="Product reserved")
status = fields.Selection(
[('reserved', 'Reserved'), ('cancelled', 'Cancelled')],
string="Status", readonly="True", help="Status of reservation")
reserved_quantity = fields.Float(string="Reserved Quantity",
readonly="True",
help="Quantity Reserved")
sale_order_id = fields.Many2one("sale.order", string="Sale Order",
readonly="True",
help="Sale order")
move_id = fields.Many2one("stock.move", string="Move Id", readonly="True",
help="Stock move details")
@api.model
def create(self, vals_list):
"""
Create a new record for the model and generate a sequence for the name
field if it is not provided.
:return: the result of the parent `create()` method call
"""
if vals_list.get('name', _('New')) == _('New'):
vals_list['name'] = self.env['ir.sequence'].next_by_code(
'stock.reserved'
) or _('New')
res = super().create(vals_list)
return res

4
sales_stock_reservation/security/ir.model.access.csv

@ -0,0 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_stock_reservation_sale_user,access.stock.reservation.sale.user,model_sale_stock_reservation,base.group_user,1,1,1,1
access_stock_reservation_user,access.stock.reservation.user,model_stock_reservation,base.group_user,1,1,1,1
access_stock_reserved_user,access.stock.reserved.user,model_stock_reserved,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_stock_reservation_sale_user access.stock.reservation.sale.user model_sale_stock_reservation base.group_user 1 1 1 1
3 access_stock_reservation_user access.stock.reservation.user model_stock_reservation base.group_user 1 1 1 1
4 access_stock_reserved_user access.stock.reserved.user model_stock_reserved base.group_user 1 1 1 1

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
sales_stock_reservation/static/description/assets/icons/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
sales_stock_reservation/static/description/assets/modules/budget_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
sales_stock_reservation/static/description/assets/modules/credit_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
sales_stock_reservation/static/description/assets/modules/employee_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
sales_stock_reservation/static/description/assets/modules/export_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
sales_stock_reservation/static/description/assets/modules/gantt_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
sales_stock_reservation/static/description/assets/modules/quotation_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 KiB

BIN
sales_stock_reservation/static/description/assets/screenshots/sr1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
sales_stock_reservation/static/description/assets/screenshots/sr10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

BIN
sales_stock_reservation/static/description/assets/screenshots/sr2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

BIN
sales_stock_reservation/static/description/assets/screenshots/sr3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

BIN
sales_stock_reservation/static/description/assets/screenshots/sr4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

BIN
sales_stock_reservation/static/description/assets/screenshots/sr5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
sales_stock_reservation/static/description/assets/screenshots/sr6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

BIN
sales_stock_reservation/static/description/assets/screenshots/sr7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

BIN
sales_stock_reservation/static/description/assets/screenshots/sr8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

BIN
sales_stock_reservation/static/description/assets/screenshots/sr9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

BIN
sales_stock_reservation/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
sales_stock_reservation/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

659
sales_stock_reservation/static/description/index.html

@ -0,0 +1,659 @@
<div class="container" style="padding: 1rem !important; margin-bottom: 1rem !important;">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12 d-flex justify-content-between"
style="border-bottom: 1px solid #d5d5d5;">
<div class="my-3">
<img src="./assets/icons/logo.png" style="width: auto !important; height: 40px !important;">
</div>
<div class="my-3 d-flex align-items-center">
<div
style="background-color: #7C7BAD !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;">
<i class="fa fa-check mr-1"></i>Community
</div>
<div
style="background-color: #875A7B !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;">
<i class="fa fa-check mr-1"></i>Enterprise
</div>
<div
style="background-color: #fff !important; color:#017E84; !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;">
<i class="fa fa-check mr-1"></i>Odoo.sh
</div>
</div>
</div>
</div>
</div>
<div class="container" style="padding: 0rem 1.5rem 4rem !important">
<div class="row" style="height: 900px !important;">
<div class="col-sm-12 col-md-12 col-lg-12"
style="padding: 4rem 1rem !important; background-color: #714B67 !important; height: 600px !important; border-radius: 20px !important;">
<h1
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #FFFFFF !important; font-size: 3.5rem !important; text-align: center !important;">
Product Stock Reservation</h1>
<p
style="font-family: 'Montserrat', sans-serif !important; font-weight: 300 !important; color: #FFFFFF !important; font-size: 1.4rem !important; text-align: center !important;">
This module helps users to create a product stock reservation from the sales quotation form.
</p>
<img src="./assets/screenshots/hero.gif" class="img-responsive" width="100%" height="auto" />
</div>
</div>
<div class="row">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin-bottom: 2rem !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-compass mr-2"></i>Explore this module
</h2>
<div class="row">
<div class="col-md-6">
<a href="#overview" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Overview</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
Learn more about this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#features" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Features</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
View features of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#screenshots" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Screenshots</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
See key screenshots of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
</div>
</div>
</div>
<div class="row" id="overview">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-pie-chart mr-2"></i>Overview
</h2>
</div>
<div class="col-mg-12 pl-3">
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;">
In the Stock Reservation App, Allow sales users to create a product stock reservation from the sales quotation form.
Allow sales users to unreserve stock also once the customer confirms the order.
Email notification to stock users during reservation from sales quote state.
</p>
</div>
</div>
<div class="row" id="features">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-star mr-2"></i>Features
</h2>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Allow sales users to create a product stock reservation from the sales quotation form.</h4>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Allow sales users to cancel reservation stock.</h4>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Email notification to stock users during reservation from sales quotation state.</h4>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Allow users to choose how much quantity of product from quotation they want to reserve on wizard.</h4>
</div>
</div>
</div>
<div class="row" id="screenshots">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-image mr-2"></i>Screenshots
</h2>
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Configuration</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Under "Inventory" > "Configurations" > "Settings" user have to select source location and destination location to reserve stock.
</p>
<img src="assets/screenshots/sr1.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Product Quantity Before Reserve Stock</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
User can see product on hand quantity before reserve stock.
</p>
<img src="assets/screenshots/sr2.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Reserve Stock</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
User can reserve stock by clicking on "Reserve Stock" button on sale order which is visible only if "Apply Stock Reservation" is checked.
</p>
<img src="assets/screenshots/sr3.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Stock Reservation Wizard</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
New wizard will open on clicking of "Reserve Stock" button,
here user can see default sale order line details and select "Notify User" to get email and enter "Reserve" to reserve stock.
</p>
<img src="assets/screenshots/sr4.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Reserved Stock</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
User can view created reserved stock from "Reserved Stock" page in sale order.
</p>
<img src="assets/screenshots/sr5.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Product Quantity After Reserved Stock
</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
You can view updated product quantities after reservation from sales orders.
</p>
<img src="assets/screenshots/sr6.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Email Notification to Users
</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Email notification to stock users selected on the wizard.
</p>
<img src="assets/screenshots/sr7.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Cancel Stock Reservation Button Flow
</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Cancel Stock Reservation Button: When click to Cancel Stock Reservation Button will release a product that is already reserved at the time of quotation.
</p>
<img src="assets/screenshots/sr8.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
<img src="assets/screenshots/sr9.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Product Forecasted Quantity after Release
</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Quantities are released in stock after the release reservation.
</p>
<img src="assets/screenshots/sr10.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<!-- SUGGESTED 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/export_stockinfo_xls/" 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/export_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/custom_gantt_view/" 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/gantt_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/sales_credit_limit/" 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/credit_image.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/base_account_budget/" 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/budget_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/product_to_quotation/" 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/quotation_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/employee_documents_expiry/"
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/employee_image.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 SUGGESTED PRODUCTS -->
<!-- OUR SERVICES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Services</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</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: #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>
</section>
<!-- END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Industries</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; 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: 10px; 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: 10px; 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: 10px; 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: 10px; 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: 10px; 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: 10px; 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: 10px; 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>
</section>
<!-- END OF OUR INDUSTRIES -->
<!-- FOOTER -->
<!-- Footer Section -->
<section class="container" style="margin: 5rem auto 2rem;">
<div class="row" style="max-width:1540px;">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Need Help?</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
</div>
<!-- Contact Cards -->
<div class="row d-flex justify-content-center align-items-center"
style="max-width:1540px; margin: 0 auto 2rem auto;">
<div class="col-lg-12" style="padding: 0rem 3rem 2rem; border-radius: 10px; margin-right: 3rem; ">
<div class="row mt-4">
<div class="col-lg-6">
<a href="mailto:odoo@cybrosys.com" target="_blank" class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #4d4d4d; color: #FFF; border-radius: 4px;"><i
class="fa fa-envelope mr-2"></i>odoo@cybrosys.com</a>
</div>
<div class="col-lg-6">
<a href="https://api.whatsapp.com/send?phone=918606827707" target="_blank"
class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #25D366; color: #FFF; border-radius: 4px;"><i
class="fa fa-whatsapp mr-2"></i>WhatsApp</a>
</div>
</div>
</div>
</div>
<!-- End of Contact Cards -->
</section>
<!-- Footer -->
<section class="oe_container" style="padding: 2rem 3rem 1rem;">
<div class="row" style="max-width:1540px; margin: 0 auto; margin-right: 3rem; ">
<!-- Logo -->
<div class="col-lg-12 d-flex justify-content-center align-items-center" style="margin-top: 3rem;">
<img src="https://www.cybrosys.com/images/logo.png" width="200px" height="auto" />
</div>
<!-- End of Logo -->
<div class="col-lg-12">
<hr
style="margin-top: 3rem;background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(229,229,229,1) 33%, rgba(229,229,229,1) 58%, rgba(0,212,255,0) 100%); height: 2px; border-style: none;">
<!-- End of Footer Section -->
</div>
</div>
</section>
<!-- END OF FOOTER -->
</div>
</div>

57
sales_stock_reservation/views/res_config_settings_views.xml

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- The view is used to display a form that allows users to configure stock settings for a company. Specifically, the XML code extends an existing view, 'stock.res_config_settings_view_form', by adding two new settings fields: 'source_location_id' and 'destination_location_id'.-->
<odoo>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">
res.config.settings.view.form.inherit.sales.stock.reservation
</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="0"/>
<field name="inherit_id" ref="stock.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='barcode_setting_container']"
position="after">
<h2>Stock Reserve Location</h2>
<div class="row mt16 o_settings_container"
name="stock_reserve_setting_container">
<div class="col-12 col-lg-6 o_setting_box"
id="stock_reserve_source_location">
<div class="o_setting_left_pane"/>
<div class="o_setting_right_pane"
id="stock_reserve_source_location_setting">
<label for="source_location_id"/>
<div class="text-muted" name="source_location_id">
Choose source location to reserve the stock.
</div>
<div class="content-group">
<div class="mt16">
<field name="source_location_id"
widget="selection"/>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box"
id="stock_reserve_destination_location">
<div class="o_setting_left_pane"/>
<div class="o_setting_right_pane"
id="stock_reserve_destination_location_setting">
<label for="destination_location_id"/>
<div class="text-muted"
name="destination_location_id">
Choose destination location to reserve the
stock.
</div>
<div class="content-group">
<div class="mt16">
<field name="destination_location_id"
widget="selection"/>
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>

43
sales_stock_reservation/views/sale_order_views.xml

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- It defines a new view for the Sale Order model and adds some fields and buttons to it. Specifically, it adds a checkbox field named "apply_stock_reservation" and a hidden field named "state_reservation" to the view. It also adds a button named "Create stock reservation" that triggers the "create_reservation_form" action when clicked, and another button named "Cancel stock reservation" that triggers the "cancel_reservation" action when clicked. Finally, it adds a new page named "Reserved Stock" to the view, which contains a tree view displaying information about reserved stock for the order. The code uses the XPath language to locate and modify existing elements in the view definition.-->
<odoo>
<record id="view_order_form" model="ir.ui.view">
<field name="name">sale.order.view.form.inherit.sales.stock.reservation</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='payment_term_id']" position="after">
<field name="apply_stock_reservation"/>
<field name="state_reservation" invisible="1"/>
</xpath>
<xpath expr="//button[@name='action_cancel']" position="after">
<button name="action_create_stock_reservation"
string="Create stock reservation"
class="btn-primary"
type="object"
attrs="{'invisible': ['|','|',('apply_stock_reservation', '=', False), ('state', 'not in', 'draft'),('state_reservation', '=', 'reserved')]}"/>
</xpath>
<xpath expr="//button[@name='action_create_stock_reservation']"
position="after">
<button name="action_cancel_reservation"
string="Cancel stock reservation"
class="btn-primary"
type="object"
attrs="{'invisible': ['|','|',('state_reservation', '!=', 'reserved'),('state', 'not in', 'draft'),('state_reservation', '=', 'cancel')]}"/>
</xpath>
<xpath expr="//page[@name='other_information']" position="after">
<page string="Reserved Stock" name="reserved_stock">
<field name="reserved_stock_ids">
<tree create="false" editable="0">
<field name="name"/>
<field name="order_line_name"/>
<field name="product_id"/>
<field name="reserved_quantity"/>
<field name="status" decoration-success="status=='reserved'" decoration-danger="status=='cancelled'"/>
</tree>
</field>
</page>
</xpath>
</field>
</record>
</odoo>

22
sales_stock_reservation/wizard/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Akhil Ashok @cybrosys(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 sale_stock_reservation

157
sales_stock_reservation/wizard/sale_stock_reservation.py

@ -0,0 +1,157 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Akhil Ashok @cybrosys(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
from odoo.http import request
class SaleStockReservation(models.TransientModel):
"""
This model is used to reserve products for a sale order.
Fields:
- stock_reservation_ids: A one-to-many relationship to the
`stock.reservation` model, representing the reservations to be made.
- sale_order_id: The ID of the sale order for which the products are being
reserved.
- mail_notification_ids: A many-to-many relationship to the `res.users`
model,representing the users who should receive email notifications about
the reservation.
"""
_name = "sale.stock.reservation"
_description = "Stock Reservation"
stock_reservation_ids = fields.One2many("stock.reservation",
"stock_reservation_wizard_id",
string="Order line",
help='This is a One2many field that '
'refers to the reserved stock items '
'associated with the wizard.')
sale_order_id = fields.Many2one("sale.order", string="Sale order",
readonly="True",
help="Many2one field that returns the Sale "
"Order")
mail_notification_ids = fields.Many2many("res.users",
string="Email Notification",
help='This is a Many2many field '
'that refers to the '
'users who will receive '
'email notifications.')
def action_reserve_stock(self):
"""
This function reserves stock for a sale order and creates a stock
reservation.
The function sets the state of the associated sale order to "reserved".
It then retrieves the source and destination locations for the stock
reservation from the system parameters.
For each product in the stock reservation, the function creates a
stock move to transfer the product from the source location to the
destination location, sets the reservation status for the product, and
updates the stock reservation with the ID of the newly created stock
move.
The function then creates a new record for each reserved product and
adds it to the `reserved_stock_ids` field of the associated sale order.
Finally, if there are any mail notifications associated with the stock
reservation,the function sends an email to each recipient with details
of the reserved items.
:return: None
"""
self.sale_order_id.state_reservation = "reserved"
source_location = int(
self.env['ir.config_parameter'].sudo().get_param(
'sales_stock_reservation.source_location_id'))
destination_location = int(
self.env['ir.config_parameter'].sudo().get_param(
'sales_stock_reservation.destination_location_id'))
for rec in self.stock_reservation_ids:
move_vals = {
"name": "Product Quantity Reserved",
"location_id": source_location,
"location_dest_id": destination_location,
'product_id': rec.product_id.id,
"product_uom_qty": rec.reserve_quantity,
"date": fields.Datetime.now(),
"product_uom": rec.unit_of_measure_id.id
}
move = self.env["stock.move"].create(move_vals)
rec.move_id = move.id
move._action_confirm()
move._action_assign()
line_vals = [{
"order_line_name": rec.order_line_name,
"product_id": rec.product_id.id,
"reserved_quantity": rec.reserve_quantity,
"sale_order_id": self.sale_order_id.id,
"status": 'reserved',
"move_id": rec.move_id.id
} for rec in self.stock_reservation_ids]
self.sale_order_id.write(
{'reserved_stock_ids': [(0, 0, vals) for vals in line_vals]})
if self.mail_notification_ids:
for rec in self.mail_notification_ids:
message_body = f"Dear {rec.name}," \
f"<br>We would like to inform you that, some item(s)" \
f" have been reserved for - {self.sale_order_id.name}." \
f" Please check and take necessary action if needed."
message_body += '<table border="1" cellpadding="0" bgcolor="#ededed">'
message_body += '<tr><th width="250px;">Name</th><th width="250px;">Product</th>' \
'<th width="250px;">Quantity for Reservation</th></tr>'
for reserved in self.sale_order_id.reserved_stock_ids.filtered(
lambda r: r.status == 'reserved'):
message_body += f"<tr><td>{reserved.name}</td>" \
f"<td>{reserved.product_id.name}</th>" \
f"<td>{reserved.reserved_quantity}</td></tr>"
message_body += '</table>Thank you'
template_obj = self.env['mail.mail'].create({
'subject': f"Stock Reservation: {self.sale_order_id.name}",
'body_html': message_body,
'email_from': request.env.user.company_id.email,
'email_to': rec.login
})
template_obj.send()
class StockReservation(models.TransientModel):
""" This model for storing wizard order line values."""
_name = "stock.reservation"
stock_reservation_wizard_id = fields.Many2one("sale.stock.reservation",
string="Wizard",
help="Sale stock reservation "
"wizard")
order_line_name = fields.Char(string="Order Line",
help="Name of order line")
product_id = fields.Many2one("product.product", string="Product",
help="Product to be reserved")
quantity = fields.Float(string="Quantity", help="Product quantity")
unit_of_measure_id = fields.Many2one("uom.uom", string="UOM",
help="Unit of measure")
reserve_quantity = fields.Char(string="Reserve Quantity",
help="Quantity to be reserved")
move_id = fields.Many2one("stock.move", string="Move Id",
help="Stock move")

38
sales_stock_reservation/wizard/sale_stock_reservation_views.xml

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- It defines two records, one for an action and another for a view. The action record defines a new window action named "create_reservation", which will be used to create a new stock reservation record. The view record defines a new form view named "create.reservation.form" for the "sale.stock.reservation" model. The view contains a group of fields for the sale order ID and email notifications, and a tree view for displaying information about the stock reservation. The tree view displays fields for the order line name, product ID, quantity, unit of measure, and reserved quantity. The view also includes a footer with a button named "Reserve", which triggers the "reserve_stock" action when clicked. Overall, this code is related to the previous code snippet and provides additional functionality for creating and managing stock reservations for sale orders in Odoo.-->
<odoo>
<record id="sale_stock_reservation_wizard_action" model="ir.actions.act_window">
<field name="name">Sale Stock Reservation Wizard</field>
<field name="res_model">sale.stock.reservation</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="sale_stock_reservation_view_form" model="ir.ui.view">
<field name="name">sale.stock.reservation.view.form</field>
<field name="model">sale.stock.reservation</field>
<field name="arch" type="xml">
<form string="Decimal Precision">
<group>
<group>
<field name="sale_order_id"/>
</group>
<group>
<field name="mail_notification_ids" widget="many2many_tags"/>
</group>
</group>
<field name="stock_reservation_ids">
<tree create="false" editable="bottom">
<field name="order_line_name"/>
<field name="product_id"/>
<field name="quantity"/>
<field name="unit_of_measure_id"/>
<field name="reserve_quantity"/>
</tree>
</field>
<footer>
<button name="action_reserve_stock" string="Reserve" type="object" class="btn-primary"/>
</footer>
</form>
</field>
</record>
</odoo>
Loading…
Cancel
Save