Compare commits

..

4 Commits

Author SHA1 Message Date
Deena e7fc8099c5 Merge pull request 'Feature' (#13) from Feature into main
Reviewed-on: #13
2025-09-17 15:02:23 +05:30
Deena 574bec5c2b Reference #12 2025-09-17 14:53:26 +05:30
Deena 8cfba696e2 Reference #11 2025-09-08 10:55:45 +05:30
Deena 652885bfb7 Reference #9 and #10 2025-08-13 11:07:30 +05:30
104 changed files with 2005 additions and 419 deletions

View File

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Aysha Shalin (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 LESSER GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################

View File

@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Aysha Shalin (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 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': 'One2many Search Widget',
'version': '17.0.1.0.0',
'category': 'Extra Tools',
'summary': 'Quick Search Feature For One2many Fields In Odoo',
'description': """This module enables users to search for text within
One2many fields. The rows that match the search criteria will be displayed,
while others will be hidden.""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': "https://www.cybrosys.com",
'depends': ['web'],
'assets': {
'web.assets_backend': [
'one2many_search_widget/static/src/css/header.css',
'one2many_search_widget/static/src/fields/one2manysearch/one2manysearch.js',
'one2many_search_widget/static/src/fields/one2manysearch/one2manysearch_template.xml',
],
},
'images': ['static/description/banner.png'],
'installable': True,
'application': True,
'license': 'LGPL-3'
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View File

@ -0,0 +1,33 @@
<svg width="80" height="81" viewBox="0 0 80 81" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="3116889_design_email_material_communication_mail_icon 1" clip-path="url(#clip0_81_366)">
<g id="layer1">
<path id="rect3851" d="M74.6067 0.730957H5.5424C2.75742 0.730957 0.499756 3.01685 0.499756 5.83664V75.7642C0.499756 78.584 2.75742 80.8699 5.5424 80.8699H74.6067C77.3916 80.8699 79.6493 78.584 79.6493 75.7642V5.83664C79.6493 3.01685 77.3916 0.730957 74.6067 0.730957Z" fill="#DB534B"/>
<g id="Clip path group">
<mask id="mask0_81_366" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="1" y="5" width="78" height="76">
<g id="clipPath4206">
<path id="rect4208" d="M73.6244 5.2915H6.62595C3.92428 5.2915 1.73413 7.4473 1.73413 10.1066V76.0546C1.73413 78.7139 3.92428 80.8697 6.62595 80.8697H73.6244C76.3261 80.8697 78.5162 78.7139 78.5162 76.0546V10.1066C78.5162 7.4473 76.3261 5.2915 73.6244 5.2915Z" fill="white"/>
</g>
</mask>
<g mask="url(#mask0_81_366)">
<g id="g4145" opacity="0.489612">
<g id="g4147">
<path id="path4149" d="M65.8115 41.5171C65.8115 54.9863 54.4292 65.9053 40.3884 65.9053L198.828 221.861C212.869 221.861 224.251 210.942 224.251 197.472L65.8115 41.5171Z" fill="black" fill-opacity="0.0588235"/>
<path id="path4151" d="M40.3884 65.9051C33.2495 65.9051 26.7979 63.0825 22.1802 58.5371L180.62 214.492C185.237 219.038 191.689 221.86 198.828 221.86L40.3884 65.9051Z" fill="black" fill-opacity="0.0588235"/>
<path id="path4153" d="M22.1802 58.5373C17.7157 54.1428 14.9653 48.1381 14.9653 41.5171L173.405 197.472C173.405 204.093 176.155 210.098 180.62 214.493L22.1802 58.5373Z" fill="black" fill-opacity="0.0588235"/>
<path id="path4155" d="M14.9653 41.5171C14.9653 28.0479 26.3476 17.1289 40.3884 17.1289L198.828 173.084C184.787 173.084 173.405 184.003 173.405 197.472L14.9653 41.5171Z" fill="black" fill-opacity="0.0588235"/>
<path id="path4157" d="M40.3884 17.1289C47.5273 17.1289 53.9789 19.9516 58.5966 24.4969L217.036 180.452C212.418 175.907 205.967 173.084 198.828 173.084L40.3884 17.1289Z" fill="black" fill-opacity="0.0588235"/>
<path id="path4159" d="M58.5964 24.4971C63.0609 28.8916 65.8113 34.8963 65.8113 41.5173L224.251 197.473C224.251 190.852 221.5 184.847 217.036 180.452L58.5964 24.4971Z" fill="black" fill-opacity="0.0588235"/>
</g>
<path id="path4111" d="M65.8114 41.5171C65.8114 54.9863 54.4291 65.9053 40.3884 65.9053C26.3476 65.9053 14.9653 54.9863 14.9653 41.5171C14.9653 28.0479 26.3476 17.1289 40.3884 17.1289C54.4291 17.1289 65.8114 28.0479 65.8114 41.5171Z" fill="black" fill-opacity="0.0588235"/>
</g>
</g>
</g>
<path id="path3864" d="M17.506 17.5386H62.9018C64.4068 17.5386 65.8501 18.1439 66.9143 19.2214C67.9784 20.2988 68.5763 21.7602 68.5763 23.284V57.7564C68.5763 58.5109 68.4295 59.258 68.1443 59.9551C67.8592 60.6521 67.4412 61.2855 66.9143 61.819C66.3873 62.3525 65.7618 62.7757 65.0733 63.0645C64.3849 63.3532 63.647 63.5018 62.9018 63.5018H17.506C14.3567 63.5018 11.8315 60.9164 11.8315 57.7564V23.284C11.8315 20.0953 14.3567 17.5386 17.506 17.5386ZM40.2039 37.6475L62.9018 23.284H17.506L40.2039 37.6475ZM17.506 57.7564H62.9018V30.0923L40.2039 44.4271L17.506 30.0923V57.7564Z" fill="white"/>
</g>
</g>
<defs>
<clipPath id="clip0_81_366">
<rect width="80" height="81" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,3 @@
<svg width="36" height="44" viewBox="0 0 36 44" fill="none" xmlns="http://www.w3.org/2000/svg">
<path id="Vector" d="M7.25 19.3903C10.13 26.0689 14.76 31.5322 20.43 34.9305L24.83 29.7268C25.38 29.0778 26.17 28.889 26.86 29.1486C29.1 30.0218 31.51 30.4938 34 30.4938C35.11 30.4938 36 31.544 36 32.8537V41.1135C36 42.4233 35.11 43.4734 34 43.4734C15.22 43.4734 0 25.5143 0 3.35456C0 2.0448 0.9 0.994629 2 0.994629H9C10.11 0.994629 11 2.0448 11 3.35456C11 6.29268 11.4 9.1364 12.14 11.7795C12.36 12.5937 12.2 13.5259 11.65 14.1749L7.25 19.3903Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 565 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 26 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 43 KiB

View File

@ -0,0 +1,6 @@
<svg width="49" height="37" viewBox="0 0 49 37" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group">
<path id="Vector" d="M2.23798 3.59132C3.53363 4.39742 21.5313 15.9748 22.2027 16.3917C22.8741 16.8087 23.5573 17.0032 24.6173 17.0032C25.6774 17.0032 26.3606 16.8087 27.0319 16.3917C27.7033 15.9748 45.701 4.39742 46.9967 3.59132C47.4796 3.29945 48.2923 2.77131 48.469 2.17368C48.7753 1.11741 48.4455 0.714355 47.138 0.714355H24.6173H2.09664C0.789214 0.714355 0.459412 1.13131 0.765656 2.17368C0.942335 2.78521 1.75506 3.29945 2.23798 3.59132Z" fill="white"/>
<path id="Vector_2" d="M48.0214 4.21664C47.0555 4.80037 38.3865 12.0831 32.6503 16.4611L42.3323 29.3171C42.5679 29.5951 42.6739 29.9286 42.5443 30.0954C42.403 30.2483 42.0967 30.1649 41.8494 29.9008L30.2357 18.3374C28.4807 19.6716 27.2439 20.5889 27.0319 20.7279C26.1249 21.2699 25.4889 21.3394 24.6173 21.3394C23.7457 21.3394 23.1096 21.2699 22.2027 20.7279C21.9789 20.5889 20.7539 19.6716 18.9989 18.3374L7.38519 29.9008C7.14961 30.1788 6.83159 30.2622 6.69025 30.0954C6.54891 29.9425 6.65491 29.5951 6.89048 29.3171L16.5607 16.4611C10.8245 12.0831 2.06126 4.80037 1.09541 4.21664C0.0588929 3.59121 0 4.32783 0 4.89766C0 5.46749 0 33.3893 0 33.3893C0 34.6819 1.61367 36.2941 2.76797 36.2941H24.6173H46.4666C47.6209 36.2941 48.999 34.668 48.999 33.3893C48.999 33.3893 48.999 5.4536 48.999 4.89766C48.999 4.31393 49.0697 3.59121 48.0214 4.21664Z" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,17 @@
<svg width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<rect width="52" height="52" fill="#F5F5F5"/>
<g clip-path="url(#clip0_0_1)">
<rect width="1440" height="7504" transform="translate(-107 -1660)" fill="white"/>
<rect x="-45" y="-203" width="1305" height="937" rx="19" fill="#FFF5FC"/>
<rect width="52" height="52" fill="url(#pattern0)"/>
</g>
<defs>
<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
<use xlink:href="#image0_0_1" transform="scale(0.00387597)"/>
</pattern>
<clipPath id="clip0_0_1">
<rect width="1440" height="7504" fill="white" transform="translate(-107 -1660)"/>
</clipPath>
<image id="image0_0_1" width="258" height="258" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQIAAAECCAYAAAAVT9lQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAJJ0lEQVR4nO3dYZXjNhQGUDEohEAohEAohEAYCIawEAxhIQRCIQTCQmhX202bTWcmcWzpSda953y/J9JYL5EsyykBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD1/f49f37PXwXztVprgMXeUtkCkDNXaw2wyOF7zql8EXir1SBgmTw4v6XyReBUq0HA835L/8zVSxeAXGSOldoELPBHqvMrIP+N3yu1CXhS/hXwJZUvAIoANKrGbcFr8t/5rU6zgGfVWhBUBKBBtRYEFQFoVJ4KXJIiAMOqsUNQEYBG1Z4K/PXz7ykC0IjaU4GcuUrLgKecUt0CoAhAQ/JP8jwgFQEY1CHV2yCkCECDaj0rcJ8/azQOeGxK9QvAtQi4OwDBIm4NKgLQkJoPDCkC0KCo9QBFABpRe6uwIgANidofcM23pAhAqDwAo9YDrkXAyUIQKA/AqPUARQAacEqxRSBHEYBAkYuC15yKtxL40JwUARhWXhQ8p/gi4DVkEOSQYu8MXDOXbijwvug7A4oABIvcLnwbuwYhyCnFFwBFAALVet/go+RfI4fCbQXekefi0QXgWgRsGILKWrk9eM0fZZsL3It+cOg+p7LNBe5Fnib0XuayzQXutbJHQBGAIK0VAbcJobI8B2+pCDhhCCrLRSB64N8XAbcJoaLWikCO24RQ0ZTiB/19PFIMFc0pftDfZy7aYuAXLRYBLyeFilosApfkDgFU02IRcIcAKmnt4aHbuEMAFbT28NBtpoLtBn5quQh8Ldhu4KeWi4BnCKCClouAo8aggpaLQM6xXNOBrPUiYPswFNZ6EZjLNR3IWi8CFgehsNaLgMVBKKz1IpBj5yAU1EMRmIq1HuiiCNg5CAX1UAQuyeIgFNNDEfBYMRTUQxHIOZXqAKDd8wRuMxdrPdDkyUL3ceYgFNRDEbBpCArqoQjk2DQEhfRSBKZSHQCj+5LiB/gzOZfqABjdKcUP8GfibcVQSC9FIOdYqA9gaD0VgalQH8DQ8rdr9OB+NudCfQBDy/vy83w7eoA/E+sCUEBPRSDnWKYbYFz5m7WnIjCV6QYYVy9PEl5zLtMNMK7eioB1ASggf7tGD+4lOZbpBhjXnOIH9pJ8KdMNMK5enh+4xvkCsLFTih/YS+J8AdhYb0Ugx/kCsKG8YSh6UC/NXKQnaFb+h+d5oJ+AZfS2azDHy0oHk4vA9Z+fL9ZT7MfZnTyYLil+YC+N9xEM5LYI3Ca/osq3wXq9bRi65q1EZ9Cmj4rANflb7Bj26fYhF9ToQb003lM4kEdF4DZT0Gfs3ZI+biW2EA/klQvUQuIy+ad19KB+JccSnUF71nxLWUh8Tu6j6AH9SmwhHsSaInAbC4kf6/E2YY4txIPYqghcc0l+Rt47pD6LgFeXD2LrInCbqWI7WtbrbcIctwoHULIIXGMhsb9zBa5xq3AANYrANSMvJNbs563/Z9Z6di7q4hxtITEXv+gB/Wo8Vbhz0d9QlzTGQmJuY/RgfjVuFe5cdBG4zVS4rZF6vU2Yc0lj/WobTktF4Jo9LiT2fIcgx63CnWv14tzbQuI5xffpq5kK9AeNaf3n6h4WEucU34+vxu7BgZxS/AX3WS6p34XE1vv2sziAdEA9PAM/FWt9Gbl4RffZmtg9OKBejsbqZSExf8aWp1yPct6+S+hFLyfmtr6Q2PsdArsH6epwjFYXEucU3zdrYvcgP/SwXnDNJbW1kNhTIX0vHijiX72sF9xmKtITy+SCFN0Pa2JKwP/0eFFHLiTmv9vz4mDOcfNeYRemFH9xLk3EQmLvi4M5HijiU+cUf5G+kpoLiXOlNpXKJZkS8EC+QHr9yZsv8OP2XfKL3hcHc0r3ETuRL5Toi3VNpu275Ife+yXHlIBF8gUTfdGuydYLiT3/UrrtE1MCFut9QWzLhcTe+yLHGQO85JD6/xbMWbuQ2Puvo5xpRfvhx/bT6It4i1zSa4tke2i/MwbYxJziL+atMi1o9yHt4xeRKQGb2MMGmts8s5C4lzZPD9oJi/TyyPKzebSQODfwGdfGlIAi9rCZ5j7vLSTuYV0gx5SAYnp6ZPnZXNJ/C4mHtI91gend/x5sZA8baz4bPHtYFzAloIpjir/Y5eOYElDNlOIvePl/ps/+aVDCHn5G7ymmBIQ4pP2uF/QYUwLCnFL8ABBTAhowp/iBMHIuyePFNKDHU5D3lOPjfxHUsbctyL3EiUM0Z0rxA2OkXJIpAY06p/gBMkqOT/5PoLpDckuxRkwJaN5ent5rNV5VRjf2cM5fq/H2YrqxlxN+Wou3F9MdtxS3jSkB3drjqUZROS3se2jKOcUPot5zXtzr0JhDcktxTb6lbV/fBmHcUnw90wv9Dc2aU/yg6i0OG2F3PKW4PA4bYZfcUnw+04t9DF3IF3j0IGs9l2TPAAOw6/DzHF/vWujHIbml+FHmFf0K3Tml+EHXWmwjZkh7fJfimpzWdSf0ac/vUlya88q+hK4dU/wgjI5txJAcZDKt70Lo38gHmdhGDDdG3XV43KLzYE/yT+TogVkzTiOGD5xT/ACtEXsG4BOHNMYtRacRwwN7P+vwvF1Xwb7tedfhYcN+gl3b667DactOghHs7azDy7bdA+OYU/wA3irHjfsGhrGXsw7nrTsGRpO/SaMH8prYMwAb6fnBpLcC/QFD6nWK4KEi2FiPDyZ5NwEUMKX4wf1sPFQEBfVwdoEFQiishynCqVjrgX+1PEU4F2w3cKfVKcKhZKOBX7U4RZiKthh4V0tThEuyQAhhWpkiOHUIArUwRTgXbyXwUPQU4VC+icAzoqYIU43GAc+JmCJckgVCaE7tKYIFQmhUrSnCuVaDgOVqTREOtRoEvKb0FGGq1xRgjVJTBAuE0JFSU4RTzUYA6209RbBACB3a+tBTZxBCp45pmyLgDELo3Nr3IjiDEHZg7RTBAiHsxKtvV/aSEtiZr2l5ITiGfFKgmDxFyPP9Z4vAHPMxgdLyS0mfXSA8BH1GoIK8MehRIZjCPh1QxaPtx5e4jwbUlL/xPyoEDhyBQXy0t+Ac+aGA+t7bW+B5AhjQ7d4CzxPAoPItwm/J8wQwvLxw+Bb9IQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4DV/A/Mf3+pWEmbtAAAAAElFTkSuQmCC"/>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -0,0 +1,33 @@
<svg width="80" height="80" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="3116884_whatsapp_square_chat_design_message_icon 1" clip-path="url(#clip0_81_382)">
<g id="layer1">
<path id="rect3851" d="M74.6066 0.72168H5.5424C2.75742 0.72168 0.499756 2.97935 0.499756 5.76433V74.8286C0.499756 77.6135 2.75742 79.8712 5.5424 79.8712H74.6066C77.3916 79.8712 79.6492 77.6135 79.6492 74.8286V5.76433C79.6492 2.97935 77.3916 0.72168 74.6066 0.72168Z" fill="#39BB59"/>
<g id="Clip path group">
<mask id="mask0_81_382" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="6" y="9" width="75" height="72">
<g id="clipPath4206">
<path id="rect4208" d="M75.7716 9.01709H11.1629C8.55758 9.01709 6.44556 11.0471 6.44556 13.5512V75.6502C6.44556 78.1543 8.55758 80.1843 11.1629 80.1843H75.7716C78.3769 80.1843 80.4889 78.1543 80.4889 75.6502V13.5512C80.4889 11.0471 78.3769 9.01709 75.7716 9.01709Z" fill="white"/>
</g>
</mask>
<g mask="url(#mask0_81_382)">
<g id="g4145" opacity="0.489612">
<g id="g4147">
<path id="path4149" d="M68.2374 43.1284C68.2374 55.8115 57.2611 66.0932 43.7212 66.0932L196.51 212.946C210.049 212.946 221.026 202.665 221.026 189.982L68.2374 43.1284Z" fill="black" fill-opacity="0.0588235"/>
<path id="path4151" d="M43.7211 66.0932C36.8369 66.0932 30.6154 63.4353 26.1624 59.1553L178.951 206.008C183.404 210.289 189.625 212.946 196.51 212.946L43.7211 66.0932Z" fill="black" fill-opacity="0.0588235"/>
<path id="path4153" d="M26.1623 59.1553C21.8571 55.0173 19.2048 49.363 19.2048 43.1284L171.993 189.982C171.993 196.216 174.645 201.87 178.951 206.008L26.1623 59.1553Z" fill="black" fill-opacity="0.0588235"/>
<path id="path4155" d="M19.2048 43.1284C19.2048 30.4453 30.1811 20.1636 43.7211 20.1636L196.509 167.017C182.969 167.017 171.993 177.299 171.993 189.982L19.2048 43.1284Z" fill="black" fill-opacity="0.0588235"/>
<path id="path4157" d="M43.7212 20.1636C50.6054 20.1636 56.8269 22.8215 61.2799 27.1015L214.068 173.955C209.615 169.675 203.394 167.017 196.51 167.017L43.7212 20.1636Z" fill="black" fill-opacity="0.0588235"/>
<path id="path4159" d="M61.2798 27.1016C65.585 31.2396 68.2373 36.8939 68.2373 43.1284L221.026 189.982C221.026 183.747 218.373 178.093 214.068 173.955L61.2798 27.1016Z" fill="black" fill-opacity="0.0588235"/>
</g>
<path id="path4111" d="M68.2373 43.1284C68.2373 55.8115 57.261 66.0932 43.7211 66.0932C30.1811 66.0932 19.2048 55.8115 19.2048 43.1284C19.2048 30.4453 30.1811 20.1636 43.7211 20.1636C57.261 20.1636 68.2373 30.4453 68.2373 43.1284Z" fill="black" fill-opacity="0.0588235"/>
</g>
</g>
</g>
<path id="path4074" d="M51.3896 43.6875C51.9673 43.9879 52.337 44.1497 52.4526 44.3808C52.5912 44.635 52.545 45.7904 51.9673 47.1076C51.5051 48.4017 49.1018 49.6496 48.0388 49.6958C46.9758 49.7421 46.9527 50.5277 41.1985 48.0089C35.4444 45.49 31.9781 39.3431 31.7008 38.9502C31.4235 38.5574 29.4823 35.7612 29.5748 32.9188C29.6903 30.0995 31.1693 28.7592 31.7701 28.2046C32.3247 27.6037 32.9487 27.5344 33.3415 27.6037H34.4276C34.7743 27.6037 35.2596 27.4651 35.6986 28.6437L37.2931 32.965C37.4318 33.2654 37.5242 33.6121 37.3163 33.9818L36.6923 34.9293L35.7911 35.8998C35.5138 36.1771 35.1902 36.4776 35.5138 37.0553C35.7911 37.6561 36.9465 39.5741 38.5641 41.1687C40.667 43.2022 42.5158 43.8724 43.0704 44.1728C43.625 44.4963 43.9716 44.4501 44.3182 44.0804L46.1901 41.9081C46.6291 41.3304 46.9989 41.4691 47.5304 41.6539L51.3896 43.6875ZM40.4128 16.0493C46.5417 16.0493 52.4195 18.484 56.7533 22.8178C61.0871 27.1515 63.5217 33.0293 63.5217 39.1582C63.5217 45.287 61.0871 51.1649 56.7533 55.4986C52.4195 59.8324 46.5417 62.2671 40.4128 62.2671C35.8604 62.2671 31.6315 60.9498 28.0496 58.6852L17.304 62.2671L20.8858 51.5214C18.6212 47.9396 17.304 43.7106 17.304 39.1582C17.304 33.0293 19.7386 27.1515 24.0724 22.8178C28.4061 18.484 34.284 16.0493 40.4128 16.0493ZM40.4128 20.6711C35.5098 20.6711 30.8075 22.6188 27.3405 26.0858C23.8735 29.5528 21.9257 34.2551 21.9257 39.1582C21.9257 43.1329 23.1736 46.8072 25.2996 49.8114L23.0812 56.4898L29.7596 54.2714C32.7638 56.3974 36.4381 57.6453 40.4128 57.6453C45.3159 57.6453 50.0182 55.6975 53.4852 52.2305C56.9522 48.7635 58.9 44.0613 58.9 39.1582C58.9 34.2551 56.9522 29.5528 53.4852 26.0858C50.0182 22.6188 45.3159 20.6711 40.4128 20.6711Z" fill="white"/>
</g>
</g>
<defs>
<clipPath id="clip0_81_382">
<rect width="80" height="80" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -0,0 +1,569 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Odoo App 3 Index</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
</head>
<body>
<section>
<div class="container" style="font-family: 'Inter', sans-serif !important;background-color: #fff !important;">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12 d-flex justify-content-between flex-wrap align-items-sm-center"
style="border-bottom:1px solid rgba(0, 0, 0, 0.22)">
<div class="my-3">
<img src="assets/misc/Cybrosys R.png" style="width:auto !important; height:40px !important">
</div>
<div class="my-3 d-flex align-items-center">
<div class="text-center"
style="background-color:#017E84 !important;font-size: 0.8rem !important; color:#fff !important; font-weight:500 !important; padding:4px !important; margin:0 3px !important; border-radius:50px !important; min-width: 120px !important;">
Community
</div>
<div class="text-center"
style="background-color:#875A7B !important; color:#fff !important;font-size: 0.8rem !important; font-weight:500 !important; padding:4px !important; margin:0 3px !important; border-radius:50px !important;min-width: 120px !important;">
Enterprise
</div>
<div class="text-center"
style="background-color:#7C7BAD !important; color:#fff !important;font-size: 0.8rem !important; font-weight:500 !important; padding:4px !important; margin:0 3px !important; border-radius:50px !important; min-width: 120px !important;">
Odoo.sh
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12 text-center d-flex align-items-center flex-column"
style="margin: 80px 0px !important;">
<h1 style="font-size: 2.8rem;font-weight: 700; color:
#1A202C;">
One2many Search Widget</h1>
<p class="my-3 mb-4"
style="max-width: 80%; font-weight: 400 !important; line-height: 32px; color: #718096;">
Quick Search Feature for One2many Fields In Odoo.
</p>
<div style="width: 80%; margin-top: 3rem;">
<img src="assets/screenshots/hero.gif" class="img-responsive" width="100%" height="auto">
</div>
</div>
</div>
<div class="container mt-5 mb-5">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center mt-4">
<p class="m-0" style="font-weight: 600; font-size: 24px; color:#714b67 !important">Key Highlights
</p>
</div>
<div class="row py-4">
<div class="col-md-6 col-sm-12 p-3">
<div class="d-flex h-100" style="padding: 30px;border-radius: 12px;
background: #FFF;
box-shadow: 1px 2px 3px 0px rgba(0, 0, 0, 0.25); ">
<div style="width: 36px; height: 36px; border-radius: 50%; background: #714B67;
display: flex; justify-content: center; align-items: center;
margin-right: 10px; flex-shrink: 0;">
<i class="fa-solid fa-star " style="color: #fff;font-size:14px;"></i>
</div>
<div>
<p style="color: #1A202C;font-weight: 600;
font-size: 1.2rem; margin-bottom: 2px;">Quick Search Feature for any One2Many Field.</p>
<p class="m-0" style="color:#718096">Users can Perform Searches within One2Many Fields Using this Widget.
</p>
</div>
</div>
</div>
<div class="col-md-6 col-sm-12 p-3">
<div class="d-flex h-100" style="padding: 30px;border-radius: 12px;
background: #FFF;
box-shadow: 1px 2px 3px 0px rgba(0, 0, 0, 0.25); ">
<div style="width: 36px; height: 36px; border-radius: 50%; background: #714B67;
display: flex; justify-content: center; align-items: center;
margin-right: 10px; flex-shrink: 0;">
<i class="fa-solid fa-star " style="color: #fff;font-size:14px;"></i>
</div>
<div>
<p style="color: #1A202C;font-weight: 600;
font-size: 1.2rem; margin-bottom: 2px;">Search for Both Texts and Numbers.</p>
<p class="m-0" style="color:#718096">You can Search for Both Texts and Numbers Using this Widget.
</p>
</div>
</div>
</div>
</div>
</div>
<div class="container rounded" >
<ul class="nav nav-tabs d-flex" style="width: fit-content;margin: 0 auto;gap: 1rem;">
<li class="col text-center py-2 text-nowrap "
style="color: #fff; background-color: #714B67;border-radius: 6px 6px 0px 0px;"><a
class="active show" data-toggle="tab" href="#tab1"
style="color: #fff;font-weight: 500; background-color: #714B67; text-decoration: none;">
<i class="fa-regular fa-image pr-2" style="color: #fff;"></i>
Screenshots</a></li>
<li class="col text-center py-2 text-nowrap "
style="color: #fff; background-color: #714B67;border-radius: 6px 6px 0px 0px;"><a
data-toggle="tab" href="#tab2"
style="color: #fff;font-weight: 500; text-decoration: none;"><i
class="fa-solid fa-star pr-2" style="color: #fff;"></i>Features</a></li>
<li class="col text-center py-2 text-nowrap "
style="color: #fff; background-color: #714B67;border-radius: 6px 6px 0px 0px;"><a
data-toggle="tab" href="#tab3"
style="color: #fff;font-weight: 500; text-decoration: none; background-color: #714B67;"><i
class="fa-solid fa-book-open pr-2" style="color: #fff;"></i>Released Notes</a></li>
</ul>
<div class="tab-content" style="background-color: rgba(121, 113, 119, 0.04);">
<div id="tab1" class="tab-pane fade in active show">
<div class="col-lg-12 py-2" style="padding: 1rem 4rem !important;">
<div
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="row justify-content-center p-3 w-100 m-0">
<img src="assets/screenshots/1.png" class="img-responsive" width="100%" height="auto">
</div>
<div class="px-3">
<h4 class="mt-2"
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important">
Set the "one2many_search" Widget for the One2Many Field.</h4>
</div>
</div>
</div>
<div class="col-lg-12 py-2" style="padding: 1rem 4rem !important;">
<div
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="row justify-content-center p-3 w-100 m-0">
<img src="assets/screenshots/2.png" class="img-responsive" width="100%" height="auto">
</div>
<div class="px-3">
<h4 class="mt-2"
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important">
A Search Bar is Located Above the One2Many Field.</h4>
</div>
</div>
</div>
<div class="col-lg-12 py-2" style="padding: 1rem 4rem !important;">
<div
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="row justify-content-center p-3 w-100 m-0">
<img src="assets/screenshots/3.png" class="img-responsive" width="100%" height="auto">
</div>
<div class="px-3">
<h4 class="mt-2"
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important">
When the Search Bar is Empty, All Rows in the One2Many Field will be Visible.</h4>
</div>
</div>
</div>
<div class="col-lg-12 py-2" style="padding: 1rem 4rem !important;">
<div
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="row justify-content-center p-3 w-100 m-0">
<img src="assets/screenshots/4.png" class="img-responsive" width="100%" height="auto">
</div>
<div class="px-3">
<h4 class="mt-2"
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important">
The One2Many Field is Filtered Based on the Text Entered the Search Bar.</h4>
</div>
</div>
</div>
<div class="col-lg-12 py-2" style="padding: 1rem 4rem !important;">
<div
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="row justify-content-center p-3 w-100 m-0">
<img src="assets/screenshots/5.png" class="img-responsive" width="100%" height="auto">
</div>
<div class="px-3">
<h4 class="mt-2"
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important">
The One2Many Field is Filtered Based on the Numbers Entered the Search Bar.</h4>
</div>
</div>
</div>
</div>
<div id="tab2" class="tab-pane fade">
<div class="col-mg-12" style="padding: 1rem 4rem;">
<ul style="list-style: none; padding: 1rem 0;font-weight: 500;">
<li class="py-3"
style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<span style="margin-right: 12px;"><img src="assets/misc/star (1) 2.svg" alt=""
width="16px"></span>Can Search within One2Many Fields Using this Widget.
</li>
<li class="py-3"
style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<span style="margin-right: 12px;"><img src="assets/misc/star (1) 2.svg" alt=""
width="16px"></span>Set the "one2many_search" Widget for the One2Many Field.
</li>
<li class="py-3"
style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<span style="margin-right: 12px;"><img src="assets/misc/star (1) 2.svg" alt=""
width="16px"></span>Can Search for Both Texts and Numbers.
</li>
</ul>
</div>
</div>
<div id="tab3" class="tab-pane fade">
<div class="col-mg-12 active" style="padding: 1rem 4rem;">
<div class="py-3"
style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="d-flex mb-3" style="font-size: 0.8rem; font-weight: 500;"><span>Version
17.0.1.0.0</span><span class="px-2">|</span><span
style="color: #714B67;font-weight: 600;">Released on:06th November 2023</span>
</div>
<p class="m-0"
style=" color:#718096!important; font-size:1rem !important;line-height: 28px;">
Initial Commit for One2many Search Widget.</p>
</div>
</div>
</div>
</div>
</div>
<div class="container mt-5">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center mt-5">
<p class="m-0" style="font-weight: 600; font-size: 24px; color:#000 !important">Related Products</p>
</div>
</div>
<div id="myCarousel" class="carousel slide py-3" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<div class="row p-4">
<div class="col">
<div class="p-3">
<a href="https://apps.odoo.com/apps/modules/17.0/invoice_format_editor/" style="color: #000; text-decoration: none;">
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;">
<div style="width: 300px; ">
<img src="assets/modules/1.png" alt="" width="100%" height="auto">
</div>
<p class="text-center pt-2 text-black font-weight-bold">Invoice Format Editor</p>
</div>
</a>
</div>
</div>
<div class="col">
<div class="p-3">
<a href="https://apps.odoo.com/apps/modules/17.0/whatsapp_redirect/" style="color: #000; text-decoration: none;">
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;">
<div style="width: 300px; ">
<img src="assets/modules/2.jpg" alt="" width="100%" height="auto">
</div>
<p class="text-center pt-2 text-black font-weight-bold">Send Whatsapp Message</p>
</div>
</a>
</div>
</div>
<div class="col">
<div class="p-3">
<a href="https://apps.odoo.com/apps/modules/17.0/inventory_barcode_scanning/" style="color: #000; text-decoration: none;">
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;">
<div style="width: 300px; ">
<img src="assets/modules/3.png" alt="" width="100%" height="auto">
</div>
<p class="text-center pt-2 text-black font-weight-bold">Barcode scanning in Inventory</p>
</div>
</a>
</div>
</div>
</div>
</div>
<div class="carousel-item">
<div class="row p-4">
<div class="col">
<div class="p-3">
<a href="https://apps.odoo.com/apps/modules/17.0/dynamic_accounts_report/" style="color: #000; text-decoration: none;">
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;">
<div style="width: 300px; ">
<img src="assets/modules/4.png" alt="" width="100%" height="auto">
</div>
<p class="text-center pt-2 text-black font-weight-bold">Dynamic Accounts Reports</p>
</div>
</a>
</div>
</div>
<div class="col">
<div class="p-3">
<a href="https://apps.odoo.com/apps/modules/17.0/hr_payroll_community/" style="color: #000; text-decoration: none;">
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;">
<div style="width: 300px;">
<img src="assets/modules/5.jpg" alt="" width="100%" height="auto">
</div>
<p class="text-center pt-2 text-black font-weight-bold">Odoo 17 HR Payroll</p>
</div>
</a>
</div>
</div>
<div class="col">
<div class="p-3">
<a href="https://apps.odoo.com/apps/modules/17.0/export_stockinfo_xls/" style="color: #000; text-decoration: none;">
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;">
<div style="width: 300px;">
<img src="assets/modules/6.png" alt="" width="100%" height="auto">
</div>
<p class="text-center pt-2 text-black font-weight-bold">Export Product Stock in Excel</p>
</div>
</a>
</div>
</div>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#myCarousel" data-slide="prev" style="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="#myCarousel" data-slide="next" style="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 class="container mt-5">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center mt-4">
<p class="m-0" style="font-weight: 600; font-size: 24px; color:#000 !important">Our Services</p>
</div>
</div>
<div class="container my-5">
<div class="row py-3">
<div class="col-md-4 col-sm-6 px-4 py-4">
<div
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative;border-radius: 4px;">
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);">
<div style="background-color:#13EA36 ; border-radius: 50%; padding: 15px; width: 68px;
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);">
<img src="assets/icons/cogs.png" alt="service-icon" width="38px" height="auto">
</div>
</div>
<p style="margin-top: 20px; font-weight: bold;">Odoo Customization</p>
</div>
</div>
<div class="col-md-4 col-sm-6 px-4 py-4">
<div
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative;border-radius: 4px;">
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);">
<div style="background-color:#DBC711; border-radius: 50%; padding: 15px; width: 68px;
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);">
<img src="assets/icons/wrench.png" alt="service-icon" width="38px" height="auto">
</div>
</div>
<p style="margin-top: 20px; font-weight: bold;">Odoo Implementation</p>
</div>
</div>
<div class="col-md-4 col-sm-6 px-4 py-4">
<div
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative; border-radius: 4px;">
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);">
<div style="background-color:#FF6B6B ; border-radius: 50%; padding: 15px; width: 68px;
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);">
<img src="assets/icons/lifebuoy.png" alt="service-icon" width="38px" height="auto">
</div>
</div>
<p style="margin-top: 20px; font-weight: bold;">Odoo Support</p>
</div>
</div>
<div class="col-md-4 col-sm-6 px-4 py-4">
<div
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative; border-radius: 4px;">
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);">
<div style="background-color:#FFA801 ; border-radius: 50%; padding: 15px; width: 68px;
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);">
<img src="assets/icons/user.png" alt="service-icon" width="38px" height="auto">
</div>
</div>
<p style="margin-top: 20px; font-weight: bold;">Hire Odoo Developer</p>
</div>
</div>
<div class="col-md-4 col-sm-6 px-4 py-4">
<div
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative; border-radius: 4px;">
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);">
<div style="background-color:#54A0FF; border-radius: 50%; padding: 15px; width: 68px;
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);">
<img src="assets/icons/puzzle.png" alt="service-icon" width="38px" height="auto">
</div>
</div>
<p style="margin-top: 20px; font-weight: bold;">Odoo Integration</p>
</div>
</div>
<div class="col-md-4 col-sm-6 px-4 py-4">
<div
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative;border-radius: 4px;">
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);">
<div style="background-color:#6D7680 ; border-radius: 50%; padding: 15px; width: 68px;
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);">
<img src="assets/icons/update.png" alt="service-icon" width="38px" height="auto">
</div>
</div>
<p style="margin-top: 20px; font-weight: bold;">Odoo Migration</p>
</div>
</div>
<div class="col-md-4 col-sm-6 px-4 py-4">
<div
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative;border-radius: 4px;">
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);">
<div style="background-color:#786FA6 ; border-radius: 50%; padding: 15px; width: 68px;
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);">
<img src="assets/icons/consultation.png" alt="service-icon" width="38px" height="auto">
</div>
</div>
<p style="margin-top: 20px; font-weight: bold;">Odoo Consultancy</p>
</div>
</div>
<div class="col-md-4 col-sm-6 px-4 py-4">
<div
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;position: relative;border-radius: 4px;">
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);">
<div style="background-color:#F8A5C2 ; border-radius: 50%; padding: 15px; width: 68px;
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);">
<img src="assets/icons/training.png" alt="service-icon" width="38px" height="auto">
</div>
</div>
<p style="margin-top: 20px; font-weight: bold;">Odoo Implementation</p>
</div>
</div>
<div class="col-md-4 col-sm-6 px-4 py-4">
<div
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative;border-radius: 4px;">
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);">
<div style="background-color:#E6BE26; border-radius: 50%; padding: 15px; width: 68px;
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);">
<img src="assets/icons/license.png" alt="service-icon" width="38px" height="auto">
</div>
</div>
<p style="margin-top: 20px; font-weight: bold;">Odoo Licensing Consultancy</p>
</div>
</div>
</div>
</div>
<div class="container mt-5">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center mt-4">
<p class="m-0" style="font-weight: 600; font-size: 24px; color:#000 !important">Our Industries</p>
</div>
</div>
<div class="container">
<div class="row my-5 py-4">
<div class="col-md-3 col-sm-6 p-0">
<div class="d-flex flex-column h-100 "
style="border-right: 1px solid rgb(209, 209, 209); border-bottom: 1px solid rgb(209, 209, 209); padding: 30px; box-shadow: 6px 0 10px rgba(228, 227, 227, 0.373);">
<img src="assets/icons/trading-black.png" width="42px" height="auto" alt="">
<p style="color: #714B67;font-weight: 600; margin-top: 10px;
font-size: 1.2rem; margin-bottom: 2px;">Trading</p>
<p>Easily procure and sell your products</p>
</div>
</div>
<div class="col-md-3 col-sm-6 p-0">
<div class="d-flex flex-column h-100"
style="border-right: 1px solid rgb(209, 209, 209);border-bottom: 1px solid rgb(209, 209, 209); padding: 30px;">
<img src="assets/icons/pos-black.png" width="42px" height="auto" alt="">
<p style="color: #714B67;font-weight: 600; margin-top: 10px;
font-size: 1.2rem; margin-bottom: 2px;">POS</p>
<p>Easy configuration and convivial experience</p>
</div>
</div>
<div class="col-md-3 col-sm-6 p-0">
<div class="d-flex flex-column h-100"
style="border-right: 1px solid rgb(209, 209, 209);border-bottom: 1px solid rgba(0, 0, 0, 0.2); padding: 30px; box-shadow: 0 5px 10px rgba(228, 227, 227, 0.373)">
<img src="assets/icons/education-black.png" width="42px" height="auto" alt="">
<p style="color: #714B67;font-weight: 600; margin-top: 10px;
font-size: 1.2rem; margin-bottom: 2px;">Education</p>
<p>A platform for educational management</p>
</div>
</div>
<div class="col-md-3 col-sm-6 p-0">
<div class="d-flex flex-column h-100"
style="border-bottom: 1px solid rgb(209, 209, 209); padding: 30px; ">
<img src="assets/icons/manufacturing-black.png" width="42px" height="auto" alt="">
<p style="color: #714B67;font-weight: 600; margin-top: 10px;
font-size: 1.2rem; margin-bottom: 2px;">Manufacturing</p>
<p>Plan, track and schedule your operations</p>
</div>
</div>
<div class="col-md-3 col-sm-6 p-0">
<div class="d-flex flex-column h-100"
style="border-right: 1px solid rgb(209, 209, 209); padding: 30px;">
<img src="assets/icons/ecom-black.png" width="42px" height="auto" alt="">
<p style="color: #714B67;font-weight: 600; margin-top: 10px;
font-size: 1.2rem; margin-bottom: 2px;">E-commerce & Website</p>
<p>Mobile friendly, awe-inspiring product pages</p>
</div>
</div>
<div class="col-md-3 col-sm-6 p-0">
<div class="d-flex flex-column h-100"
style="border-right: 1px solid rgb(209, 209, 209); padding: 30px;box-shadow: 0 -5px 10px rgba(228, 227, 227, 0.373);">
<img src="assets/icons/service-black.png" width="42px" height="auto" alt="">
<p style="color: #714B67;font-weight: 600; margin-top: 10px;
font-size: 1.2rem; margin-bottom: 2px;">Service Management</p>
<p>Keep track of services and invoice</p>
</div>
</div>
<div class="col-md-3 col-sm-6 p-0">
<div class="d-flex flex-column h-100"
style="border-right: 1px solid rgb(209, 209, 209); padding: 30px; ">
<img src="assets/icons/restaurant-black.png" width="42px" height="auto" alt="">
<p style="color: #714B67;font-weight: 600; margin-top: 10px;
font-size: 1.2rem; margin-bottom: 2px;">Restaurant</p>
<p>Run your bar or restaurant methodically</p>
</div>
</div>
<div class="col-md-3 col-sm-6 p-0">
<div class="d-flex flex-column h-100"
style=" padding: 30px;box-shadow: -5px 0 10px rgba(228, 227, 227, 0.373);">
<img src="assets/icons/hotel-black.png" width="42px" height="auto" alt="">
<p style="color: #714B67;font-weight: 600; margin-top: 10px;
font-size: 1.2rem; margin-bottom: 2px;">Hotel Management</p>
<p>An all-inclusive hotel management application</p>
</div>
</div>
</div>
</div>
<div class="container mt-5">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center mt-5">
<p class="m-0" style="font-weight: 600; font-size: 24px; color:#000 !important">Support</p>
</div>
</div>
<div class="container my-5">
<div class="row" style="background-color: #FFFAFE;">
<div class="col-md-6 pb-4 d-flex align-items-center justify-content-center"
style="border-right: 1px solid #D9D9D9;">
<div style="padding: 30px;">
<div class="d-flex align-items-center">
<img src="assets/misc/support (1) 1.svg" alt="" width="60px" style="margin-right: 12px;">
<div style="padding: 0px 8px;">
<span
style="color: #714B67;font-size: 24px;font-weight: 600;padding-bottom: 1rem;">Need
Help?</span>
<p class="m-0" style="color:#718096;">Got questions or need help? Get in touch.</p>
<div style="font-weight: 400;"><span><img src="assets/misc/support-email.svg" alt=""
width="18px"
style="filter: invert(1);margin-right: 0.8rem;"></span>odoo@cybrosys.com
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6 pb-4 d-flex align-items-center justify-content-center">
<div style="padding: 30px;">
<div class="d-flex align-items-center">
<img src="assets/misc/whatsapp 1.svg" alt="" width="60px" style="margin-right: 12px;">
<div>
<span style="color: #714B67;font-size: 24px;font-weight: 600;">WhatsApp</span>
<p class="m-0" style="color:#718096;">Say hi to us on WhatsApp!</p>
<div style="font-weight: 400; font-size: 16px;"><span><img src="assets/misc/phone.svg"
alt="" width="14px"
style="filter: invert(1); margin-right: 0.8rem;"></span>+91
99456767686</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,11 @@
.oe_search_value{
border-radius: 20px !important;
border: 2px solid #e3d9e7 !important;
padding: 12px !important;
margin-top: 20px !important;
margin-left: 10px !important;
width: 300px !important;
height: 20px !important;
color:#495057 !important;
font-size: 15px !important;
}

View File

@ -0,0 +1,21 @@
/** @odoo-module **/
import { registry } from "@web/core/registry";
import { X2ManyField, x2ManyField } from "@web/views/fields/x2many/x2many_field";
export class One2ManySearch extends X2ManyField {
// Override to include the onInputKeyUp method.
// Whenever text is entered into the search input box, it dynamically
// filters the content of the One2Many field to display only matching records
onInputKeyUp() {
var value = $(event.currentTarget).val().toLowerCase();
$(".o_list_table tr:not(:lt(1))").filter(function() {
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
});
}
}
One2ManySearch.template = "One2ManySearchTemplate";
export const one2ManySearch = {
...x2ManyField,
component: One2ManySearch,
};
registry.category("fields").add("one2many_search", one2ManySearch);

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates>
<!-- Inherits X2ManyField view in Odoo to add a search input field.-->
<t t-name="One2ManySearchTemplate" t-inherit="web.X2ManyField"
t-inherit-mode="primary" owl="1">
<t t-if="displayControlPanelButtons" position="replace">
<div>
<div>
<input type="text" class="oe_search_value searchInput pl-3"
placeholder="🔍 Search..."
t-ref="search_keyword"
style="height:30px;"
t-on-keyup="onInputKeyUp"/>
</div>
</div>
</t>
</t>
</templates>

View File

@ -40,6 +40,7 @@ class NCMR_Model(models.Model):
qa_action = fields.Selection([ ('scrap', 'Scrap'),('rework', 'Rework')], string="Action") qa_action = fields.Selection([ ('scrap', 'Scrap'),('rework', 'Rework')], string="Action")
dispensed_doc_ref = fields.Char(string="Dispensed Doc Ref") dispensed_doc_ref = fields.Char(string="Dispensed Doc Ref")
dispensed_responsibility = fields.Text(string="Dispensed Responsibility") dispensed_responsibility = fields.Text(string="Dispensed Responsibility")
return_incoming_resposibility = fields.Char(string="Approved Doc Ref")
approved_doc_ref = fields.Char(string="Approved Doc Ref") approved_doc_ref = fields.Char(string="Approved Doc Ref")
approved_responsibility = fields.Text(string="Approved Responsibility") approved_responsibility = fields.Text(string="Approved Responsibility")
customer_complaint_doc_ref = fields.Char(string="Customer Complaint Doc Ref") customer_complaint_doc_ref = fields.Char(string="Customer Complaint Doc Ref")
@ -112,7 +113,7 @@ class NCMR_Model(models.Model):
('sos_return_fir', 'Return BRR FIR Ref'), ('sos_return_fir', 'Return BRR FIR Ref'),
('sos_fir', 'FIR Ref') ('sos_fir', 'FIR Ref')
], ],
string="Incoming Document Reference", string="Document Reference",
compute="_compute_combined_incoming_doc_ref", compute="_compute_combined_incoming_doc_ref",
store=False store=False
) )

View File

@ -77,11 +77,28 @@ class sos__wo(models.Model):
top_management_approved_on = fields.Datetime(string="Approved On") top_management_approved_on = fields.Datetime(string="Approved On")
rounded_total_value = fields.Float(string="Total Value", compute="_compute_total_value", store=True) rounded_total_value = fields.Float(string="Total Value", compute="_compute_total_value", store=True)
adjustment_value = fields.Float(string="Round-off", compute="_compute_total_value", store=True) adjustment_value = fields.Float(string="Round-off", compute="_compute_total_value", store=True)
# @api.model nre_charges = fields.Monetary(string="NRE Charges", currency_field='currency_id')
# def create(self, vals): nre_tax = fields.Integer(default=18,string="Tax (%)")
# record = super(sos__wo, self).create(vals) nre_tax_amount = fields.Float(string="NRE Tax Value", store=True,readonly=True, compute="_compute_nretax")
# record.action_esign_btn() nre_total_value = fields.Float(string="Total", store=True)
# return record
@api.depends('nre_charges', 'nre_tax')
def _compute_nretax(self):
for record in self:
if record.nre_charges:
nre_tax_amount = round((record.nre_tax * record.nre_charges) / 100, 2)
exact_total = round(record.nre_charges + nre_tax_amount, 2)
if math.isnan(exact_total) or exact_total is None:
record.total_value = 0.00
record.nre_total_value = 0.00
else:
rounded_total = round(exact_total)
record.nre_total_value = exact_total
record.nre_tax_amount = nre_tax_amount
else:
record.nre_total_value = 0.00
record.nre_tax_amount = 0.00
def action_amend(self): def action_amend(self):
active_ids = self.env.context.get('active_ids', []) active_ids = self.env.context.get('active_ids', [])
records = self.browse(active_ids) records = self.browse(active_ids)
@ -191,12 +208,12 @@ class sos__wo(models.Model):
for record in self: for record in self:
record.gross_value = round(sum(line.total_price for line in record.line_ids), 2) record.gross_value = round(sum(line.total_price for line in record.line_ids), 2)
@api.depends('gross_value') @api.depends('gross_value','nre_total_value')
def _compute_total_value(self): def _compute_total_value(self):
for record in self: for record in self:
if record.wo_planned_at != "inhouse": if record.wo_planned_at != "inhouse":
if record.gross_value: if record.gross_value:
exact_total = round(record.gross_value, 2) exact_total = round(record.nre_total_value + record.gross_value, 2)
if math.isnan(exact_total) or exact_total is None: if math.isnan(exact_total) or exact_total is None:
record.total_value = 0.00 record.total_value = 0.00
record.rounded_total_value = 0.00 record.rounded_total_value = 0.00

View File

@ -47,7 +47,12 @@
<record id="sos_ncmr_all_records_rule" model="ir.rule"> <record id="sos_ncmr_all_records_rule" model="ir.rule">
<field name="name">Sos NCMR: All Records - Read Access</field> <field name="name">Sos NCMR: All Records - Read Access</field>
<field name="model_id" ref="model_sos_ncmr"/> <field name="model_id" ref="model_sos_ncmr"/>
<field name="domain_force">[('rd_user', '=', user.id), ('rework_responsible_rd_user', '=', user.id)]</field> <field name="domain_force">
['|',
('rd_user', 'in', [user.id]),
('rework_responsible_rd_user', '=', user.id)
]
</field>
<field name="groups" eval="[(4, ref('base.group_user'))]"/> <field name="groups" eval="[(4, ref('base.group_user'))]"/>
<field name="perm_read" eval="1"/> <field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/> <field name="perm_write" eval="1"/>

View File

@ -81,7 +81,7 @@
<notebook> <notebook>
<page string="Finished Goods"> <page string="Finished Goods">
<field name="line_ids_fg"> <field name="line_ids_fg" readonly="scg_head_verified_by">
<tree editable="bottom"> <tree editable="bottom">
<field name="component_id"/> <field name="component_id"/>
<field name="add_production_cost" widget="boolean_toggle"/> <field name="add_production_cost" widget="boolean_toggle"/>
@ -94,7 +94,7 @@
</field> </field>
</page> </page>
<page string="Semi Finished Goods"> <page string="Semi Finished Goods">
<field name="line_ids_sfg"> <field name="line_ids_sfg" readonly="scg_head_verified_by">
<tree editable="bottom"> <tree editable="bottom">
<field name="component_id"/> <field name="component_id"/>
<field name="add_production_cost" widget="boolean_toggle"/> <field name="add_production_cost" widget="boolean_toggle"/>
@ -107,7 +107,7 @@
</field> </field>
</page> </page>
<page string="Materials"> <page string="Materials">
<field name="line_ids_material"> <field name="line_ids_material" readonly="scg_head_verified_by">
<tree editable="bottom"> <tree editable="bottom">
<field name="component_id"/> <field name="component_id"/>
<field name="display_name"/> <field name="display_name"/>
@ -122,7 +122,7 @@
</field> </field>
</page> </page>
<page string="Installation Kit"> <page string="Installation Kit">
<field name="line_ids_installation_kit"> <field name="line_ids_installation_kit" readonly="scg_head_verified_by">
<tree editable="bottom"> <tree editable="bottom">
<field name="component_id"/> <field name="component_id"/>
<field name="display_name"/> <field name="display_name"/>
@ -134,7 +134,7 @@
</field> </field>
</page> </page>
<page string="Miscellaneous"> <page string="Miscellaneous">
<field name="line_ids_miscellaneous"> <field name="line_ids_miscellaneous" readonly="scg_head_verified_by">
<tree editable="bottom"> <tree editable="bottom">
<field name="name"/> <field name="name"/>
<field name="cost"/> <field name="cost"/>

View File

@ -173,16 +173,19 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr><td class="column">In-Coming Material (RM/PM)</td><td><field name="combined_incoming_doc_ref"/></td><td><field name="incoming_responsibility"/></td></tr> <tr><td class="column">In-Coming Material (RM/PM)</td><td><field name="incoming_doc_ref"/></td><td><field name="incoming_responsibility"/></td></tr>
<tr><td class="column">Return In-Coming Material (RM/PM)</td><td><field name="return_incoming_doc_ref"/></td><td><field name="return_incoming_resposibility"/></td></tr>
<!--
<tr><td class="column">Dispensed Material (RM/PM)</td><td><field name="dispensed_doc_ref"/></td><td><field name="dispensed_responsibility"/></td></tr> <tr><td class="column">Dispensed Material (RM/PM)</td><td><field name="dispensed_doc_ref"/></td><td><field name="dispensed_responsibility"/></td></tr>
<tr><td class="column">Approved Stored Material (RM/PM)</td><td><field name="approved_doc_ref"/></td><td><field name="approved_responsibility"/></td></tr> <tr><td class="column">Approved Stored Material (RM/PM)</td><td><field name="approved_doc_ref"/></td><td><field name="approved_responsibility"/></td></tr>
<tr><td class="column">Customer Complaint</td><td><field name="customer_complaint_doc_ref"/></td><td><field name="customer_complaint_responsibility"/></td></tr> <tr><td class="column">Customer Complaint</td><td><field name="customer_complaint_doc_ref"/></td><td><field name="customer_complaint_responsibility"/></td></tr>
<tr><td class="column">Approved Finished Products</td><td><field name="approved_fg_doc_ref"/></td><td><field name="approved_fg_responsibility"/></td></tr> -->
<tr><td class="column">Returned Finished Products</td><td><field name="returned_fg_doc_ref"/></td><td><field name="returned_fg_responsibility"/></td></tr> <tr><td class="column">Approved Finished Products</td><td><field name="fir_incoming_doc_ref"/></td><td><field name="approved_fg_responsibility"/></td></tr>
<tr><td class="column">Finished Products(Production Assy)</td><td><field name="finished_fg_assy"/></td><td><field name="finished_fg_assy_responsibility"/></td></tr> <tr><td class="column">Returned Finished Products</td><td><field name="return_fg_incoming_doc_ref"/></td><td><field name="returned_fg_responsibility"/></td></tr>
<tr><td class="column">Finished Products(Production Assy)</td><td><field name="fg_incoming_doc_ref"/></td><td><field name="finished_fg_assy_responsibility"/></td></tr>
</tbody> </tbody>
</table> </table>

View File

@ -147,6 +147,35 @@
</tree> </tree>
</field> </field>
<div class="oe_subtotal_footer" style="float: left;
padding: 20px;
border: solid 1px #ccc;
font-weight: bold;
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;">
<!-- Gross Value Field -->
<div style="margin-bottom: 5px;">
<label for="nre_charges" style="font-weight: bold; margin-right: 10px;">Delivery Charges</label>
<field name="nre_charges" widget="monetary" options="{'currency_field': 'currency_id'}" class="oe_inline"/>
</div>
<!-- Tax Field -->
<div style="margin-bottom: 5px;">
<label for="nre_tax" style="font-weight: bold; margin-right: 10px;">Tax (%)</label>
<field name="nre_tax" class="oe_inline"/>
</div>
<div style="margin-bottom: 5px;">
<label for="nre_tax_amount" style="font-weight: bold; margin-right: 10px;">Tax Amount</label>
<field name="nre_tax_amount" widget="monetary" options="{'currency_field': 'currency_id'}" class="oe_inline"/>
</div>
<div>
<label for="nre_total_value" style="font-weight: bold; margin-right: 10px;">Final Value</label>
<field name="nre_total_value" widget="monetary" options="{'currency_field': 'currency_id'}" class="oe_inline"/>
</div>
</div>
<div invisible="wo_planned_at == 'inhouse'" class="oe_subtotal_footer" style="float: right; <div invisible="wo_planned_at == 'inhouse'" class="oe_subtotal_footer" style="float: right;
padding: 34px; padding: 34px;
border: solid 1px #ccc; border: solid 1px #ccc;

View File

@ -49,7 +49,8 @@
'wizard/week_summary_wizard.xml', 'wizard/week_summary_wizard.xml',
'wizard/action_plan_summary_wizard.xml', 'wizard/action_plan_summary_wizard.xml',
'wizard/sos_sales_achievement_wizard_view.xml', 'wizard/sos_sales_achievement_wizard_view.xml',
'wizard/sos_business_performance_wizard_view.xml' 'wizard/sos_business_performance_wizard_view.xml',
'wizard/yet_to_bill_wizard_view.xml'
], ],

View File

@ -28,7 +28,7 @@ class sos_case_diary(models.Model):
'res.users', 'res.users',
string='Sales Executive', string='Sales Executive',
default=lambda self: self.env.user, default=lambda self: self.env.user,
domain=lambda self: [('groups_id', 'in', self.env.ref('sos_inventory.sos_sales_user').ids + self.env.ref('sos_inventory.sos_ce_head').ids)]) domain=lambda self: [('groups_id', 'in', self.env.ref('sos_inventory.sos_sales_user').ids + self.env.ref('sos_inventory.sos_ce_head').ids + self.env.ref('sos_inventory.sos_sales_sapl_user').ids)])
currency_id = fields.Many2one( currency_id = fields.Many2one(
'res.currency', 'res.currency',
string='Currency', string='Currency',
@ -43,7 +43,6 @@ class sos_case_diary(models.Model):
('projects', 'Projects') ('projects', 'Projects')
], ],
string="Interested In",required=True,default="products") string="Interested In",required=True,default="products")
project_name = fields.Char(string="Project Name")
products = fields.Selection( products = fields.Selection(
[ [
('BHMS 1.2V', 'BHMS 1.2V'), ('BHMS 1.2V', 'BHMS 1.2V'),
@ -80,7 +79,32 @@ class sos_case_diary(models.Model):
po_copy = fields.Binary(string="PO Copy") po_copy = fields.Binary(string="PO Copy")
po_copy_filename=fields.Char(string="PO DocumentFile Name") po_copy_filename=fields.Char(string="PO DocumentFile Name")
order_expected_on = fields.Date(string="Order Expected On") order_expected_on = fields.Date(string="Order Expected On")
sales_type = fields.Selection(
[
('Domestic', 'Domestic'),
('International', 'International')
],
string="Sales Type",default="Domestic")
project_name= fields.Many2one('sos_projects',string="Project Name")
country = fields.Many2one(
'res.country',
string='Country',
default=lambda self: self.env['res.country'].search([('code', '=', 'IN')], limit=1)
)
is_ce_user_created = fields.Boolean(
compute='_compute_is_ce_user_created',
store=True,
string='Created by Sales User'
)
@api.depends('create_uid')
def _compute_is_ce_user_created(self):
ce_groups = [
self.env.ref('sos_inventory.sos_ce_user').id
]
for record in self:
record.is_ce_user_created = any(
gid in record.create_uid.groups_id.ids for gid in ce_groups
)
@api.depends('end_customer_name', 'quote_no') @api.depends('end_customer_name', 'quote_no')
def _compute_display_name(self): def _compute_display_name(self):
for rec in self: for rec in self:
@ -148,8 +172,13 @@ class sos_case_diary(models.Model):
proposal_value = last_record.current_state_value proposal_value = last_record.current_state_value
# Log brief entry # Log brief entry
current_date = last_record.status_changed_on
start_year = current_date.year if current_date.month >= 4 else current_date.year - 1
end_year = start_year + 1
current_fy = f"FY {start_year}-{end_year}"
self.env['sos_sales_achievement_report_brief'].create({ self.env['sos_sales_achievement_report_brief'].create({
'ref_id': ref_id, 'ref_id': ref_id,
'financial_year':current_fy,
'customer_name': self.customer_name.id, 'customer_name': self.customer_name.id,
'action_date': last_record.status_changed_on, 'action_date': last_record.status_changed_on,
'proposal_value': proposal_value, 'proposal_value': proposal_value,
@ -235,7 +264,8 @@ class sos_case_diary(models.Model):
}) })
totals_by_month[order_month_year] += record.proposal_value or 0.0 totals_by_month[order_month_year] += record.proposal_value or 0.0
action = self.env.ref("sos_sales.action_report_pipeline").with_context(landscape=True).report_action( action = self.env.ref("sos_sales.action_report_pipeline").with_context(landscape=True).report_action(
self, data={'data_by_month': data_by_month,'totals_by_month': totals_by_month} self, data={'data_by_month': data_by_month,'totals_by_month': totals_by_month,
'report_generated_on':date.today(),'from_date':from_date,'to_date':to_date}
) )
return action return action
else: else:

View File

@ -39,6 +39,20 @@ class SOS_Customers(models.Model):
line_ids_contacts = fields.One2many('sos_customers_line', 'ref_id', string="Contact Details",copy=True) line_ids_contacts = fields.One2many('sos_customers_line', 'ref_id', string="Contact Details",copy=True)
reporting_to = fields.Many2one('res.users', string='Reporting To') reporting_to = fields.Many2one('res.users', string='Reporting To')
responsible = fields.Many2one('res.users', string='Sales Executive',default=lambda self: self.env.user) responsible = fields.Many2one('res.users', string='Sales Executive',default=lambda self: self.env.user)
is_ce_user_created = fields.Boolean(
compute='_compute_is_ce_user_created',
store=True,
string='Created by Sales User'
)
@api.depends('create_uid')
def _compute_is_ce_user_created(self):
ce_groups = [
self.env.ref('sos_inventory.sos_ce_user').id
]
for record in self:
record.is_ce_user_created = any(
gid in record.create_uid.groups_id.ids for gid in ce_groups
)
@api.model @api.model
def create(self, vals): def create(self, vals):
create_uid = vals.get('create_uid', self.env.uid) create_uid = vals.get('create_uid', self.env.uid)

View File

@ -7,12 +7,13 @@ class Battery_Installation_Requirement(models.Model):
_name = 'sos_proposal_boq' _name = 'sos_proposal_boq'
_description = 'Battery Installation Details' _description = 'Battery Installation Details'
_rec_name="proposal_id" _rec_name="proposal_id"
_order = 'proposal_id asc' _order = 'id desc'
_sql_constraints = [ _sql_constraints = [
('unique_proposal_id', 'unique(proposal_id)', 'Proposal ID must be unique!') ('unique_proposal_id', 'unique(proposal_id)', 'Proposal ID must be unique!')
] ]
proposal_id = fields.Many2one('sos_proposal_customer_requirement',string="Proposal ID", required= True, proposal_id = fields.Many2one('sos_proposal_customer_requirement',string="Proposal ID", required= True,
domain=lambda self: [('id', 'not in', self.env['sos_proposal_boq'].search([]).mapped('proposal_id').ids)]) domain=lambda self: [('id', 'not in', self.env['sos_proposal_boq'].search([]).mapped('proposal_id').ids)])
sales_executive = fields.Many2one('res.users', string='Requirement Submitted By',related="proposal_id.requirement_submitted_by_name")
customer_name = fields.Char(string="Customer Name") customer_name = fields.Char(string="Customer Name")
location = fields.Char(string="Location") location = fields.Char(string="Location")
number_of_batteries = fields.Integer(string="Number of Batteries") number_of_batteries = fields.Integer(string="Number of Batteries")
@ -63,10 +64,17 @@ class Battery_Installation_Requirement(models.Model):
warranty_percentage = fields.Float(string="Warranty(%)") warranty_percentage = fields.Float(string="Warranty(%)")
final_cost = fields.Monetary(string="Final Cost", compute='_compute_final_cost', store=True, currency_field='currency_id') final_cost = fields.Monetary(string="Final Cost", compute='_compute_final_cost', store=True, currency_field='currency_id')
final_cost_per_battery = fields.Monetary(string="Final Cost", compute='_compute_final_cost_per_battery', store=True, currency_field='currency_id') final_cost_per_battery = fields.Monetary(string="Final Cost", compute='_compute_final_cost_per_battery', store=True, currency_field='currency_id')
final_cost_by_acc = fields.Monetary(string="Final Cost By Accounts", currency_field='currency_id')
final_total = fields.Monetary(string="Final Cost", compute='_compute_final_cost_acc', store=True, currency_field='currency_id')
communication_type = fields.Selection([ communication_type = fields.Selection([
('wired', 'Wired'), ('wired', 'Wired'),
('wireless', 'Wireless') ('wireless', 'Wireless')
], string="Communication Type", default='wired') ], string="Communication Type", default='wired')
slave_type = fields.Selection([
('15S Individual Slave', '15S Individual Slave'),
('90S Electrical Panel', '90S Electrical Panel'),
('60S Electrical Panel', '60S Electrical Panel')
], string="Slave Type", default='15S Individual Slave')
specific_requirements = fields.Html(string="Specific Requirements") specific_requirements = fields.Html(string="Specific Requirements")
#CE Team Fields #CE Team Fields
@ -85,7 +93,8 @@ class Battery_Installation_Requirement(models.Model):
man_month_1to2_yrs_cost = fields.Monetary(string="Cost", currency_field='currency_id') man_month_1to2_yrs_cost = fields.Monetary(string="Cost", currency_field='currency_id')
man_month_2to3_yrs_cost = fields.Monetary(string="Cost", currency_field='currency_id') man_month_2to3_yrs_cost = fields.Monetary(string="Cost", currency_field='currency_id')
man_month_manager_cost = fields.Monetary(string="Cost", currency_field='currency_id') man_month_manager_cost = fields.Monetary(string="Cost", currency_field='currency_id')
iandc_costing=fields.Monetary(readonly=False,string="I & C Costing",currency_field='currency_id',compute='_compute_iandc_expense') iandc_costing=fields.Monetary(readonly=False,string="I & C Man Month Cost",currency_field='currency_id',compute='_compute_iandc_expense')
iandc_travel_cost = fields.Monetary(string="Travel Cost", currency_field='currency_id')
#FG Fields #FG Fields
line_ids_fg_ups1 = fields.One2many('sos_proposal_boq_fg', 'ref_id', string="FG UPS 1",compute='_compute_line_ids_by_ups',store=False) line_ids_fg_ups1 = fields.One2many('sos_proposal_boq_fg', 'ref_id', string="FG UPS 1",compute='_compute_line_ids_by_ups',store=False)
line_ids_fg_ups2 = fields.One2many('sos_proposal_boq_fg', 'ref_id', string="FG UPS 2",compute='_compute_line_ids_by_ups',store=False) line_ids_fg_ups2 = fields.One2many('sos_proposal_boq_fg', 'ref_id', string="FG UPS 2",compute='_compute_line_ids_by_ups',store=False)
@ -148,21 +157,21 @@ class Battery_Installation_Requirement(models.Model):
#Installation Kit Fields #Installation Kit Fields
line_ids_installation_kit_ups1 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 1",compute='_compute_line_ids_by_ups',store=False) line_ids_installation_kit_ups1 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 1",compute='_compute_line_ids_by_ups',store=False,readonly=False)
line_ids_installation_kit_ups2 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 2",compute='_compute_line_ids_by_ups',store=False) line_ids_installation_kit_ups2 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 2",compute='_compute_line_ids_by_ups',store=False,readonly=False)
line_ids_installation_kit_ups3 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 3",compute='_compute_line_ids_by_ups',store=False) line_ids_installation_kit_ups3 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 3",compute='_compute_line_ids_by_ups',store=False,readonly=False)
line_ids_installation_kit_ups4 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 4",compute='_compute_line_ids_by_ups',store=False) line_ids_installation_kit_ups4 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 4",compute='_compute_line_ids_by_ups',store=False,readonly=False)
line_ids_installation_kit_ups5 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 5",compute='_compute_line_ids_by_ups',store=False) line_ids_installation_kit_ups5 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 5",compute='_compute_line_ids_by_ups',store=False,readonly=False)
line_ids_installation_kit_ups6 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 6",compute='_compute_line_ids_by_ups',store=False) line_ids_installation_kit_ups6 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 6",compute='_compute_line_ids_by_ups',store=False,readonly=False)
line_ids_installation_kit_ups7 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 7",compute='_compute_line_ids_by_ups',store=False) line_ids_installation_kit_ups7 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 7",compute='_compute_line_ids_by_ups',store=False,readonly=False)
line_ids_installation_kit_ups8 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 8",compute='_compute_line_ids_by_ups',store=False) line_ids_installation_kit_ups8 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 8",compute='_compute_line_ids_by_ups',store=False,readonly=False)
line_ids_installation_kit_ups9 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 9",compute='_compute_line_ids_by_ups',store=False) line_ids_installation_kit_ups9 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 9",compute='_compute_line_ids_by_ups',store=False,readonly=False)
line_ids_installation_kit_ups10 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 10",compute='_compute_line_ids_by_ups',store=False) line_ids_installation_kit_ups10 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 10",compute='_compute_line_ids_by_ups',store=False,readonly=False)
line_ids_installation_kit_ups11 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 11",compute='_compute_line_ids_by_ups',store=False) line_ids_installation_kit_ups11 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 11",compute='_compute_line_ids_by_ups',store=False,readonly=False)
line_ids_installation_kit_ups12 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 12",compute='_compute_line_ids_by_ups',store=False) line_ids_installation_kit_ups12 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 12",compute='_compute_line_ids_by_ups',store=False,readonly=False)
line_ids_installation_kit_ups13 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 13",compute='_compute_line_ids_by_ups',store=False) line_ids_installation_kit_ups13 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 13",compute='_compute_line_ids_by_ups',store=False,readonly=False)
line_ids_installation_kit_ups14 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 14",compute='_compute_line_ids_by_ups',store=False) line_ids_installation_kit_ups14 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 14",compute='_compute_line_ids_by_ups',store=False,readonly=False)
line_ids_installation_kit_ups15 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 15",compute='_compute_line_ids_by_ups',store=False) line_ids_installation_kit_ups15 = fields.One2many('sos_proposal_line_material_installation', 'ref_id', string="Installation Kit UPS 15",compute='_compute_line_ids_by_ups',store=False,readonly=False)
#Miscellaneous Kit Fields #Miscellaneous Kit Fields
line_ids_miscellaneous_ups1 = fields.One2many('sos_proposal_miscellaneous_items', 'ref_id', string="Miscellaneous UPS 1",compute='_compute_line_ids_by_ups',store=False) line_ids_miscellaneous_ups1 = fields.One2many('sos_proposal_miscellaneous_items', 'ref_id', string="Miscellaneous UPS 1",compute='_compute_line_ids_by_ups',store=False)
@ -199,7 +208,7 @@ class Battery_Installation_Requirement(models.Model):
ups15_total = fields.Float(string="UPS 15 Total Cost", compute='_compute_ups_total', store=True) ups15_total = fields.Float(string="UPS 15 Total Cost", compute='_compute_ups_total', store=True)
extra_lines_cost = fields.Monetary(string="Cost", compute='_compute_extra_lines_cost', store=True, currency_field='currency_id') extra_lines_cost = fields.Monetary(string="Cost", compute='_compute_extra_lines_cost', store=True, currency_field='currency_id')
packing_and_forwarding = fields.Monetary(string="Packing & Forwarding", currency_field='currency_id',store=True) packing_and_forwarding = fields.Monetary(string="Packing & Forwarding", currency_field='currency_id',store=True,compute="_compute_packing_and_forwarding",compute_sudo=True)
additional_warranty = fields.Monetary(string="Additional Warranty", currency_field='currency_id',store=True) additional_warranty = fields.Monetary(string="Additional Warranty", currency_field='currency_id',store=True)
line_ids_spare_ups1 = fields.One2many('sos_proposal_line_spare_ups1','ref_id', string="Spare UPS 1") line_ids_spare_ups1 = fields.One2many('sos_proposal_line_spare_ups1','ref_id', string="Spare UPS 1")
line_ids_spare_ups2 = fields.One2many('sos_proposal_line_spare_ups2', 'ref_id',string="Spare UPS 2") line_ids_spare_ups2 = fields.One2many('sos_proposal_line_spare_ups2', 'ref_id',string="Spare UPS 2")
@ -216,6 +225,33 @@ class Battery_Installation_Requirement(models.Model):
line_ids_spare_ups13 = fields.One2many('sos_proposal_line_spare_ups13','ref_id', string="Spare UPS 13") line_ids_spare_ups13 = fields.One2many('sos_proposal_line_spare_ups13','ref_id', string="Spare UPS 13")
line_ids_spare_ups14 = fields.One2many('sos_proposal_line_spare_ups14','ref_id', string="Spare UPS 14") line_ids_spare_ups14 = fields.One2many('sos_proposal_line_spare_ups14','ref_id', string="Spare UPS 14")
line_ids_spare_ups15 = fields.One2many('sos_proposal_line_spare_ups15','ref_id', string="Spare UPS 15") line_ids_spare_ups15 = fields.One2many('sos_proposal_line_spare_ups15','ref_id', string="Spare UPS 15")
@api.depends(
'final_cost_by_acc','number_of_batteries'
)
def _compute_final_cost_acc(self):
for rec in self:
rec.final_total = rec.final_cost_by_acc * rec.number_of_batteries
@api.depends(
'proposal_id.number_of_batteries',
'proposal_id.number_of_ups',
'proposal_id.direction',
)
def _compute_packing_and_forwarding(self):
for rec in self:
val = 0.0
p = rec.proposal_id
if p:
packing_calculation = 1200
packing_kg_12V = 100 * (p.number_of_ups or 0)
direction = (p.direction or '').strip()
rate = 20 if direction == "North" else 19 if direction == "West" \
else 23 if direction == "East" else 13
forwarding_calculation = rate * packing_kg_12V
base_amount = 1.20 * (packing_calculation + forwarding_calculation)
val = base_amount * 1.18
rec.packing_and_forwarding = val
def _compute_merged_spare_html(self): def _compute_merged_spare_html(self):
for rec in self: for rec in self:
# Collect lines from ups1..ups15 (skip models that don't exist) # Collect lines from ups1..ups15 (skip models that don't exist)
@ -228,16 +264,17 @@ class Battery_Installation_Requirement(models.Model):
if model not in self.env: if model not in self.env:
continue continue
for l in self.env[model].search([('ref_id', '=', rec.id)]): for l in self.env[model].search([('ref_id', '=', rec.id)]):
unit_price = l.unit_price or 0.0 if l.production_cost:
curr_id = l.currency_id.id if l.currency_id else False unit_price = l.unit_price or 0.0
key = (l.component_id.id, l.uom, curr_id, unit_price) curr_id = l.currency_id.id if l.currency_id else False
key = (l.component_id.id, l.uom, curr_id, unit_price)
agg[key] += float(l.quantity or 0) agg[key] += float(l.quantity or 0)
if key not in name_map: if key not in name_map:
# Use part number (fallback to component name if needed) # Use part number (fallback to component name if needed)
name_map[key] = (getattr(l.component_id, 'part_no', False) or l.component_id.name or '') name_map[key] = (getattr(l.component_id, 'part_no', False) or l.component_id.name or '')
curr_map[key] = l.currency_id if l.currency_id else False curr_map[key] = l.currency_id if l.currency_id else False
price_map[key] = unit_price price_map[key] = unit_price
rows_sorted = sorted(agg.items(), key=lambda it: name_map[it[0]].lower()) rows_sorted = sorted(agg.items(), key=lambda it: name_map[it[0]].lower())
if not rows_sorted: if not rows_sorted:
@ -374,15 +411,16 @@ class Battery_Installation_Requirement(models.Model):
price_map = {} price_map = {}
for l in lines: for l in lines:
unit_price = l.unit_price or 0.0 if l.production_cost:
curr_id = l.currency_id.id if l.currency_id else False unit_price = l.unit_price or 0.0
key = (l.component_id.id, l.uom, curr_id, unit_price) curr_id = l.currency_id.id if l.currency_id else False
key = (l.component_id.id, l.uom, curr_id, unit_price)
agg[key] += float(l.quantity or 0) agg[key] += float(l.quantity or 0)
if key not in name_map: if key not in name_map:
name_map[key] = l.component_id.part_no or '' name_map[key] = l.component_id.part_no or ''
curr_map[key] = l.currency_id if l.currency_id else False curr_map[key] = l.currency_id if l.currency_id else False
price_map[key] = unit_price price_map[key] = unit_price
rows_sorted = sorted(agg.items(), key=lambda it: name_map[it[0]].lower()) rows_sorted = sorted(agg.items(), key=lambda it: name_map[it[0]].lower())
if not rows_sorted: if not rows_sorted:
@ -524,15 +562,16 @@ class Battery_Installation_Requirement(models.Model):
price_map = {} price_map = {}
for l in lines: for l in lines:
unit_price = l.unit_price or 0.0 if l.production_cost:
curr_id = l.currency_id.id if l.currency_id else False unit_price = l.unit_price or 0.0
key = (l.component_id.id, l.uom, curr_id, unit_price) curr_id = l.currency_id.id if l.currency_id else False
key = (l.component_id.id, l.uom, curr_id, unit_price)
agg[key] += float(l.quantity or 0) agg[key] += float(l.quantity or 0)
if key not in name_map: if key not in name_map:
name_map[key] = l.component_id.name or '' name_map[key] = l.component_id.name or ''
curr_map[key] = l.currency_id if l.currency_id else False curr_map[key] = l.currency_id if l.currency_id else False
price_map[key] = unit_price price_map[key] = unit_price
rows_sorted = sorted(agg.items(), key=lambda it: name_map[it[0]].lower()) rows_sorted = sorted(agg.items(), key=lambda it: name_map[it[0]].lower())
if not rows_sorted: if not rows_sorted:
@ -599,15 +638,16 @@ class Battery_Installation_Requirement(models.Model):
price_map = {} price_map = {}
for l in lines: for l in lines:
unit_price = l.unit_price or 0.0 if l.production_cost:
curr_id = l.currency_id.id if l.currency_id else False unit_price = l.unit_price or 0.0
key = (l.component_id.id, l.uom, curr_id, unit_price) curr_id = l.currency_id.id if l.currency_id else False
key = (l.component_id.id, l.uom, curr_id, unit_price)
agg[key] += float(l.quantity or 0) agg[key] += float(l.quantity or 0)
if key not in name_map: if key not in name_map:
name_map[key] = l.component_id.name or '' name_map[key] = l.component_id.name or ''
curr_map[key] = l.currency_id if l.currency_id else False curr_map[key] = l.currency_id if l.currency_id else False
price_map[key] = unit_price price_map[key] = unit_price
rows_sorted = sorted(agg.items(), key=lambda it: name_map[it[0]].lower()) rows_sorted = sorted(agg.items(), key=lambda it: name_map[it[0]].lower())
if not rows_sorted: if not rows_sorted:
@ -707,10 +747,10 @@ class Battery_Installation_Requirement(models.Model):
# for rec in self: # for rec in self:
# rec.transport_expense = 5000 # rec.transport_expense = 5000
@api.depends('no_of_days','man_month_1to2_yrs_persons','man_month_2to3_yrs_persons','man_month_manager_persons','man_month_1to2_yrs_cost','man_month_2to3_yrs_cost','man_month_manager_cost') @api.depends('iandc_travel_cost','no_of_days','man_month_1to2_yrs_persons','man_month_2to3_yrs_persons','man_month_manager_persons','man_month_1to2_yrs_cost','man_month_2to3_yrs_cost','man_month_manager_cost')
def _compute_iandc_expense(self): def _compute_iandc_expense(self):
for rec in self: for rec in self:
rec.iandc_costing = ((rec.man_month_1to2_yrs_persons * rec.man_month_1to2_yrs_cost) + rec.iandc_costing = rec.iandc_travel_cost + ((rec.man_month_1to2_yrs_persons * rec.man_month_1to2_yrs_cost) +
(rec.man_month_2to3_yrs_persons * rec.man_month_2to3_yrs_cost) + (rec.man_month_2to3_yrs_persons * rec.man_month_2to3_yrs_cost) +
(rec.man_month_manager_persons * rec.man_month_manager_cost)) * rec.no_of_days (rec.man_month_manager_persons * rec.man_month_manager_cost)) * rec.no_of_days
@ -719,10 +759,10 @@ class Battery_Installation_Requirement(models.Model):
for record in self: for record in self:
record.extra_lines_cost = sum(line.cost for line in record.extra_cost_line_ids) record.extra_lines_cost = sum(line.cost for line in record.extra_cost_line_ids)
@api.depends('iandc_costing','warranty_cost', 'total_cost','margin','extra_lines_cost','packing_and_forwarding','additional_warranty') @api.depends('warranty_cost', 'total_cost','margin','extra_lines_cost','packing_and_forwarding','additional_warranty','iandc_costing')
def _compute_final_cost(self): def _compute_final_cost(self):
for rec in self: for rec in self:
rec.final_cost = rec.warranty_cost + rec.total_cost + rec.margin + rec.extra_lines_cost + rec.packing_and_forwarding + rec.additional_warranty + rec.iandc_costing rec.final_cost = rec.warranty_cost + rec.total_cost + rec.margin + rec.extra_lines_cost + rec.packing_and_forwarding + rec.additional_warranty + rec.iandc_costing
@api.depends('total_cost', 'warranty_percentage') @api.depends('total_cost', 'warranty_percentage')
def _compute_warranty(self): def _compute_warranty(self):
@ -879,8 +919,10 @@ class Battery_Installation_Requirement(models.Model):
@api.model @api.model
def create(self, vals): def create(self, vals):
record = super().create(vals) record = super().create(vals)
if vals.get('proposal_id'): if vals.get('proposal_id') and vals.get('products') == "BHMS 12V":
record._generate_boq_lines_from_proposal() record._generate_boq_lines_from_proposal_12v()
elif vals.get('proposal_id') and vals.get('products') == "BHMS 1.2V" and vals.get('slave_type') == "15S Individual Slave":
record._generate_boq_lines_from_proposal_15s()
return record return record
@api.onchange('proposal_id') @api.onchange('proposal_id')
@ -898,37 +940,186 @@ class Battery_Installation_Requirement(models.Model):
self.number_of_ups = self.proposal_id.number_of_ups self.number_of_ups = self.proposal_id.number_of_ups
self.products = self.proposal_id.products self.products = self.proposal_id.products
self.communication_type = self.proposal_id.communication_type self.communication_type = self.proposal_id.communication_type
self.slave_type = self.proposal_id.slave_type
self.specific_requirements = self.proposal_id.specific_requirements self.specific_requirements = self.proposal_id.specific_requirements
multiplier = max(1, math.ceil(self.proposal_id.number_of_batteries / 20))
if self.proposal_id.number_of_batteries < 100:
self.engineers_nos = 1
self.no_of_days = multiplier
else:
self.engineers_nos = 2
self.no_of_days = multiplier / 2
packing_calculation = 1200
packing_kg_12V = 100 * self.proposal_id.number_of_ups
direction = self.proposal_id.direction
if direction == "North":
forwarding_calculation = 20 * packing_kg_12V
elif direction == "West":
forwarding_calculation = 19 * packing_kg_12V
elif direction == "East":
forwarding_calculation = 23 * packing_kg_12V
else:
forwarding_calculation = 13 * packing_kg_12V
base_amount = 1.20 * (packing_calculation + forwarding_calculation)
self.packing_and_forwarding = base_amount * 1.18
# Clear all lines
self.line_ids_fg = [(5, 0, 0)] self.line_ids_fg = [(5, 0, 0)]
self.line_ids_sfg = [(5, 0, 0)] self.line_ids_sfg = [(5, 0, 0)]
self.line_ids_material = [(5, 0, 0)] self.line_ids_material = [(5, 0, 0)]
self.line_ids_installation_kit = [(5, 0, 0)] self.line_ids_installation_kit = [(5, 0, 0)]
self.line_ids_miscellaneous = [(5, 0, 0)] self.line_ids_miscellaneous = [(5, 0, 0)]
self._generate_boq_lines_from_proposal() if self.products == 'BHMS 12V':
self._generate_boq_lines_from_proposal_12v()
elif self.products == 'BHMS 1.2V':
self._generate_boq_lines_from_proposal_15s()
def _generate_boq_lines_from_proposal_15s(self):
if not self.proposal_id:
return
record = self.env['sos_deliverables_config'].search([
('fg_name', '=', self.products),
('slave_type', '=', self.slave_type)
], limit=1)
if record and self.number_of_ups:
fg_lines = []
sfg_lines = []
material_lines = []
install_kit_lines = []
misc_lines = []
def _generate_boq_lines_from_proposal(self): for ups_index in range(1, self.number_of_ups + 1):
for line in record.fg_ids:
single_set_qty = 1
if line.item_type == 'Master Panel':
single_set_qty = 1
elif line.item_type == 'CT Module':
matching_ups_line = self.proposal_id.ups_line_ids.filtered(lambda l: l.ups_index == ups_index)
if matching_ups_line:
number_of_strings_per_battery = matching_ups_line.number_of_strings_per_battery
single_set_qty = number_of_strings_per_battery
ct_module = ((matching_ups_line.ups_capacity_kva * 1000) / (12 * matching_ups_line.number_of_batteries)) / 10
if 0 <= ct_module < 100:
material_code="MDS070"
elif 100 <= ct_module < 200:
material_code="MDS071"
elif 200 <= ct_module < 300:
material_code="MDS069"
else:
material_code="MDS040"
material_record=self.env['sos_material'].search([('material_code', '=', material_code)],limit=1)
material_lines.append((0, 0, {
'component_id': material_record.id,
'uom': material_record.uom,
'singet_set_qty':single_set_qty,
'unit_price': material_record.unit_price,
'description': material_record.description,
'ups_index': ups_index,
'production_cost':True
}))
elif line.item_type == 'Slave Module':
matching_ups_line = self.proposal_id.ups_line_ids.filtered(lambda l: l.ups_index == ups_index)
if matching_ups_line:
single_set_qty = math.ceil((matching_ups_line.number_of_batteries / 15)
* matching_ups_line.number_of_strings_per_battery)
name_lower = (line.component_id.name or "").lower()
is_electrical_panel = "electrical panel" in name_lower
# Find the UPS line for this index (use first match if multiple)
matching_ups_line = self.proposal_id.ups_line_ids.filtered(lambda l: l.ups_index == ups_index)[:1]
num_strings = (matching_ups_line.number_of_strings_per_battery
if matching_ups_line and matching_ups_line.number_of_strings_per_battery
else 0)
fg_lines.append((0, 0, {
'component_id': line.component_id.id,
'uom': line.uom,
'unit_price': line.component_id.unit_price, # no panel-based zeroing
'description': line.description,
'item_type': line.item_type,
'total_set': 1, # stays 1
'singet_set_qty': num_strings if is_electrical_panel else single_set_qty,
'production_cost': line.add_production_cost,
'ups_index': ups_index,
}))
for line in record.sfg_ids:
if line.item_type == 'Master Panel':
single_set_qty = 1
elif line.item_type == 'Battery Count':
matching_ups_line = self.proposal_id.ups_line_ids.filtered(lambda l: l.ups_index == ups_index)
if matching_ups_line:
single_set_qty = matching_ups_line.number_of_batteries
elif line.item_type == 'CT Module':
matching_ups_line = self.proposal_id.ups_line_ids.filtered(lambda l: l.ups_index == ups_index)
if matching_ups_line:
number_of_strings_per_battery = matching_ups_line.number_of_strings_per_battery
single_set_qty = number_of_strings_per_battery # example logic
elif line.item_type == 'Slave Module':
matching_ups_line = self.proposal_id.ups_line_ids.filtered(lambda l: l.ups_index == ups_index)
if matching_ups_line:
single_set_qty = math.ceil((matching_ups_line.number_of_batteries)/4) * matching_ups_line.number_of_strings_per_battery
sfg_lines.append((0, 0, {
'component_id': line.component_id.id,
'uom': line.uom,
'unit_price': line.component_id.unit_price,
'description': line.description,
'item_type': line.item_type,
'singet_set_qty': single_set_qty,
'production_cost': line.add_production_cost,
'ups_index': ups_index
}))
for line in record.material_ids:
if line.item_type == 'Internet Module' and self.proposal_id.internet_connectivity != 'yes':
continue
if line.item_type == 'Master Panel':
single_set_qty = 1 * line.quantity
elif line.item_type == 'Battery Count':
matching_ups_line = self.proposal_id.ups_line_ids.filtered(lambda l: l.ups_index == ups_index)
if matching_ups_line:
single_set_qty = matching_ups_line.number_of_batteries
elif line.item_type == 'CT Module':
matching_ups_line = self.proposal_id.ups_line_ids.filtered(lambda l: l.ups_index == ups_index)
if matching_ups_line:
number_of_strings_per_battery = matching_ups_line.number_of_strings_per_battery
single_set_qty = number_of_strings_per_battery * line.quantity
elif line.item_type == 'Slave Module':
matching_ups_line = self.proposal_id.ups_line_ids.filtered(lambda l: l.ups_index == ups_index)
if matching_ups_line:
single_set_qty = (math.ceil((matching_ups_line.number_of_batteries)/4) * matching_ups_line.number_of_strings_per_battery) * line.quantity
material_lines.append((0, 0, {
'component_id': line.component_id.id,
'uom': line.uom,
'unit_price': line.component_id.unit_price,
'description': line.description,
'item_type': line.item_type,
'singet_set_qty': single_set_qty,
'production_cost': line.add_production_cost,
'ups_index': ups_index
}))
for line in record.installation_kit_ids:
if line.item_type == 'Master Panel':
single_set_qty = 1 * line.quantity
elif line.item_type == 'CT Module':
matching_ups_line = self.proposal_id.ups_line_ids.filtered(lambda l: l.ups_index == ups_index)
if matching_ups_line:
number_of_strings_per_battery = matching_ups_line.number_of_strings_per_battery
single_set_qty = number_of_strings_per_battery * line.quantity
elif line.item_type == 'Slave Module':
matching_ups_line = self.proposal_id.ups_line_ids.filtered(lambda l: l.ups_index == ups_index)
if matching_ups_line:
single_set_qty = (math.ceil((matching_ups_line.number_of_batteries)/4) * matching_ups_line.number_of_strings_per_battery) * line.quantity
install_kit_lines.append((0, 0, {
'component_id': line.component_id.id,
'uom': line.uom,
'unit_price': line.component_id.unit_price,
'description': line.description,
'item_type': line.item_type,
'singet_set_qty': single_set_qty,
'production_cost': line.add_production_cost,
'ups_index': ups_index
}))
misc_lines += [(0, 0, {
'name': line.name,
'cost': line.cost,
'quantity': line.quantity,
'ups_index': ups_index
}) for line in record.miscellaneous_ids]
self.write({
'line_ids_fg': fg_lines,
'line_ids_sfg': sfg_lines,
'line_ids_material': material_lines,
'line_ids_installation_kit': install_kit_lines,
'line_ids_miscellaneous': misc_lines
})
def _generate_boq_lines_from_proposal_12v(self):
if not self.proposal_id: if not self.proposal_id:
return return
@ -1142,33 +1333,81 @@ class Battery_Installation_Requirement(models.Model):
'boq_submitted_by_approved_on' 'boq_submitted_by_approved_on'
) )
def action_acc_esign_btn(self): def action_acc_esign_btn(self):
self.ensure_one()
sequence_util = self.env['sos_common_scripts'] sequence_util = self.env['sos_common_scripts']
body_html = """ # ---- Pretty values with fallbacks ----
<p>Below <b>Proposal</b> is waiting for your Updation</p> customer = self.customer_name or ''
location = self.location or ''
batteries = int(self.number_of_batteries or 0)
currency_symbol = self.env.company.currency_id.symbol or ''
final_cost = float(self.final_cost_by_acc or 0.0)
final_cost_disp = f"{currency_symbol} {final_cost:,.2f}"
warranty = self.proposal_id.warranty
insta_location = self.proposal_id.installation_location or ''
# ---- HTML body ----
body_html = f"""
<div style="font-family:Inter, Arial, sans-serif; color:#111827;">
<p style="margin:0 0 10px 0;">
Below <b>Proposal Costing</b> was completed. You can proceed with the proposal builder.
</p>
<table style="border-collapse:separate;border-spacing:0; width:100%; max-width:560px; background:#fff; border:1px solid #e5e7eb; border-radius:8px; overflow:hidden;">
<tbody>
<tr style="background:#f9fafb;">
<td style="padding:10px 12px; width:40%; color:#303236;">Customer</td>
<td style="padding:10px 12px;"><b>{customer}</b></td>
</tr>
<tr>
<td style="padding:10px 12px; color:#303236;">Delivery Location</td>
<td style="padding:10px 12px;">{location}</td>
</tr>
<tr>
<td style="padding:10px 12px; color:#303236;">Installation Location</td>
<td style="padding:10px 12px;">{insta_location}</td>
</tr>
<tr style="background:#f9fafb;">
<td style="padding:10px 12px; color:#303236;">Number of Batteries</td>
<td style="padding:10px 12px;">{batteries:,}</td>
</tr>
<tr style="background:#f9fafb;">
<td style="padding:10px 12px; color:#303236;">Warranty (In Months)</td>
<td style="padding:10px 12px;">{warranty}</td>
</tr>
<tr>
<td style="padding:10px 12px; color:#303236;"> Final MSP per Battery</td>
<td style="padding:10px 12px;"><b>{final_cost_disp}</b></td>
</tr>
</tbody>
</table>
</div><br></br>
""" """
# Who submitted requirements?
req_submitted_by = self.env['sos_proposal_customer_requirement'].search([ req_submitted_by = self.env['sos_proposal_customer_requirement'].search([
('proposal_id', '=', self.proposal_id.proposal_id) ('proposal_id', '=', self.proposal_id.proposal_id)
], limit=1) ], limit=1)
# Send email only if login exists
if req_submitted_by and req_submitted_by.requirement_submitted_by_name and req_submitted_by.requirement_submitted_by_name.login: if req_submitted_by and req_submitted_by.requirement_submitted_by_name and req_submitted_by.requirement_submitted_by_name.login:
sequence_util.send_direct_email( sequence_util.send_direct_email(
self.env, self.env,
"sos_proposal_boq", "sos_proposal_boq",
self.id, self.id,
req_submitted_by.requirement_submitted_by_name.login, req_submitted_by.requirement_submitted_by_name.login,
f"Costing Done - {self.proposal_id.proposal_id}", f"Costing Done - {customer}",
body_html body_html
) )
# Assign signature # Assign signature (account approval)
return sequence_util.action_assign_signature( return sequence_util.action_assign_signature(
self, self,
'acc_approved_by_name', 'acc_approved_by_name',
'acc_approved_on' 'acc_approved_on'
) )
class SOS_Proposal_BOQ_Material(models.Model): class SOS_Proposal_BOQ_Material(models.Model):
_name = 'sos_proposal_boq_material' _name = 'sos_proposal_boq_material'
_description = 'Proposal BOQ Material Lines' _description = 'Proposal BOQ Material Lines'

View File

@ -8,6 +8,7 @@ class SOS_Proposal_Builder(models.Model):
_rec_name="proposal_id" _rec_name="proposal_id"
proposal_id = fields.Many2one('sos_proposal_customer_requirement',string="Proposal ID", required= True) proposal_id = fields.Many2one('sos_proposal_customer_requirement',string="Proposal ID", required= True)
sales_executive = fields.Many2one('res.users', string='Requirement Submitted By',related="proposal_id.requirement_submitted_by_name")
customer_name = fields.Char(string="Customer Name") customer_name = fields.Char(string="Customer Name")
customer_logo=fields.Binary(string="Customer Logo") customer_logo=fields.Binary(string="Customer Logo")
doc_attachement = fields.Binary(string="Attachments",help="Any attachments to be attached with Proposal") doc_attachement = fields.Binary(string="Attachments",help="Any attachments to be attached with Proposal")
@ -190,7 +191,7 @@ class SOS_Proposal_Builder(models.Model):
if self.proposal_id: if self.proposal_id:
self.customer_name = self.proposal_id.customer_name self.customer_name = self.proposal_id.customer_name
boq = self.env['sos_proposal_boq'].search([('proposal_id', '=', self.proposal_id.id)], limit=1, order='id desc') boq = self.env['sos_proposal_boq'].search([('proposal_id', '=', self.proposal_id.id)], limit=1, order='id desc')
self.total_cost = boq.final_cost self.total_cost = boq.final_cost_by_acc
@api.depends('buffer_in_percentage', 'total_cost') @api.depends('buffer_in_percentage', 'total_cost')
def _compute_total_with_buffer(self): def _compute_total_with_buffer(self):
@ -204,7 +205,7 @@ class SOS_Proposal_Builder(models.Model):
[('proposal_id', '=', rec.proposal_id.id)], [('proposal_id', '=', rec.proposal_id.id)],
limit=1, order='id desc' limit=1, order='id desc'
) )
rec.total_cost = boq.final_cost if boq else 0.0 rec.total_cost = boq.final_cost_by_acc if boq else 0.0
@api.model @api.model
def create(self, vals): def create(self, vals):
if vals.get('proposal_id') and not vals.get('total_cost'): if vals.get('proposal_id') and not vals.get('total_cost'):
@ -212,7 +213,7 @@ class SOS_Proposal_Builder(models.Model):
[('proposal_id', '=', vals['proposal_id'])], limit=1, order='id desc' [('proposal_id', '=', vals['proposal_id'])], limit=1, order='id desc'
) )
if boq: if boq:
vals['total_cost'] = boq.final_cost vals['total_cost'] = boq.final_cost_by_acc
return super().create(vals) return super().create(vals)
def write(self, vals): def write(self, vals):
@ -221,7 +222,7 @@ class SOS_Proposal_Builder(models.Model):
[('proposal_id', '=', vals['proposal_id'])], limit=1, order='id desc' [('proposal_id', '=', vals['proposal_id'])], limit=1, order='id desc'
) )
if boq: if boq:
vals['total_cost'] = boq.final_cost vals['total_cost'] = boq.final_cost_by_acc
return super().write(vals) return super().write(vals)
class SOS_Technical_Diagrams(models.Model): class SOS_Technical_Diagrams(models.Model):

View File

@ -5,6 +5,7 @@ class Battery_Installation_Requirement(models.Model):
_name = 'sos_proposal_customer_requirement' _name = 'sos_proposal_customer_requirement'
_description = 'Battery Installation Details' _description = 'Battery Installation Details'
_rec_name="proposal_id" _rec_name="proposal_id"
_order = 'id desc'
proposal_id = fields.Char(string="Proposal ID", readonly= True, required= True, default=lambda self: self._generate_id()) proposal_id = fields.Char(string="Proposal ID", readonly= True, required= True, default=lambda self: self._generate_id())
customer_name = fields.Char(string="Customer Name", required=True) customer_name = fields.Char(string="Customer Name", required=True)
location = fields.Char(string="Delivery Location") location = fields.Char(string="Delivery Location")
@ -58,7 +59,7 @@ class Battery_Installation_Requirement(models.Model):
duct_type = fields.Selection([ duct_type = fields.Selection([
('pvc', 'PVC'), ('pvc', 'PVC'),
('metal', 'Metal') ('metal', 'Metal')
], string="Duct Type", default='metal') ], string="Duct Type", default='pvc')
communication_type = fields.Selection([ communication_type = fields.Selection([
('wired', 'Wired'), ('wired', 'Wired'),
('wireless', 'Wireless') ('wireless', 'Wireless')
@ -70,6 +71,7 @@ class Battery_Installation_Requirement(models.Model):
ups_line_ids = fields.One2many('dynamic_ups_line', 'parent_id', string="UPS Details") ups_line_ids = fields.One2many('dynamic_ups_line', 'parent_id', string="UPS Details")
warranty=fields.Char(string="Warranty (In Months)") warranty=fields.Char(string="Warranty (In Months)")
# Fields for 1.2V # Fields for 1.2V
spare_count = fields.Integer(string="Spare Count")
master_type = fields.Selection([ master_type = fields.Selection([
('AC 110V', 'AC 110V'), ('AC 110V', 'AC 110V'),
('AC 220V', 'AC 220V'), ('AC 220V', 'AC 220V'),
@ -78,7 +80,8 @@ class Battery_Installation_Requirement(models.Model):
], string="Master Type", default='AC 110V') ], string="Master Type", default='AC 110V')
slave_type = fields.Selection([ slave_type = fields.Selection([
('15S Individual Slave', '15S Individual Slave'), ('15S Individual Slave', '15S Individual Slave'),
('90S Electrical Panel', '90S Electrical Panel') ('60S Electrical Panel', '60S Electrical Panel'),
('90S Electrical Panel', '90S Electrical Panel'),
], string="Slave Type", default='15S Individual Slave') ], string="Slave Type", default='15S Individual Slave')
ntc = fields.Selection([ ntc = fields.Selection([
('Individual', 'Individual'), ('Individual', 'Individual'),

View File

@ -14,8 +14,12 @@ class SOS_Sales_Achievement_Report(models.Model):
('unique_financial_year_sales_person', 'UNIQUE(financial_year, sales_person)', 'The combination of Financial Year and Sales Person must be unique.') ('unique_financial_year_sales_person', 'UNIQUE(financial_year, sales_person)', 'The combination of Financial Year and Sales Person must be unique.')
] ]
display_name = fields.Char(string="Name", compute='_compute_display_name', store=True) display_name = fields.Char(string="Name", compute='_compute_display_name', store=True)
category = fields.Selection([
('sales', 'Sales'),
('export', 'Export')
], string="Category", required=True, default='sales')
financial_year = fields.Char(string="Financial Year", default=lambda self: self._get_financial_year()) financial_year = fields.Char(string="Financial Year", default=lambda self: self._get_financial_year())
sales_person = fields.Many2one('res.users', string='Sales person',required=True) sales_person = fields.Many2one('res.users', string='Sales person')
overall_target = fields.Float(string="Overall Target") overall_target = fields.Float(string="Overall Target")
opening_balance = fields.Float(string="Opening Balance") opening_balance = fields.Float(string="Opening Balance")
planned_target_april = fields.Float(string="Planned For April") planned_target_april = fields.Float(string="Planned For April")
@ -105,7 +109,7 @@ class SOS_Sales_Achievement_Report(models.Model):
ytd_target = fields.Float(string="YTD Total", store=True, compute="_compute_ytd_target") ytd_target = fields.Float(string="YTD Total", store=True, compute="_compute_ytd_target")
ytd_sales = fields.Float(string="YTD Sales", store=True, compute="_compute_ytd_sales_target") ytd_sales = fields.Float(string="YTD Sales", store=True, compute="_compute_ytd_sales_target")
ytd_sales_percentage = fields.Float(string="YTD Sales Percentage", store=True, compute="_compute_ytd_sales_percentage") ytd_sales_percentage = fields.Float(string="YTD Sales Percentage", store=True, compute="_compute_ytd_sales_percentage")
ytd_yet_to_billed = fields.Float(string="YTD Billed", store=True,compute="_compute_ytd_yet_to_billed") ytd_yet_to_billed = fields.Float(string="YTD Billed")
ytd_billed = fields.Float(string="YTD Billed", store=True,compute="_compute_ytd_billed") ytd_billed = fields.Float(string="YTD Billed", store=True,compute="_compute_ytd_billed")
ytd_collected = fields.Float(string="YTD Collected", store=True,compute="_compute_ytd_collected") ytd_collected = fields.Float(string="YTD Collected", store=True,compute="_compute_ytd_collected")
line_ids = fields.One2many('sos_sales_achievement_report_brief', 'ref_id',copy=True) line_ids = fields.One2many('sos_sales_achievement_report_brief', 'ref_id',copy=True)
@ -114,10 +118,26 @@ class SOS_Sales_Achievement_Report(models.Model):
'ref_id', 'ref_id',
string="Billing Collection Lines" string="Billing Collection Lines"
) )
@api.depends('financial_year', 'sales_person') def action_yet_to_bill(self):
self.ensure_one()
return {
'type': 'ir.actions.act_window',
'name': 'Yet To Bill',
'res_model': 'yet_to_bill_wizard',
'view_mode': 'form',
'target': 'new',
'context': {
'brief_ref_id': self.id, # scopes wizard to this report's brief lines
}
}
@api.depends('category','financial_year', 'sales_person')
def _compute_display_name(self): def _compute_display_name(self):
for record in self: for record in self:
record.display_name = f"{record.financial_year or ''} / {record.sales_person.name or ''}" if record.category == "sales":
record.display_name = f"{record.financial_year or ''} / {record.sales_person.name or ''}"
else:
record.display_name = f"{record.financial_year or ''} / Export"
@api.depends('opening_balance', 'actual_target_april', 'billed_target_april') @api.depends('opening_balance', 'actual_target_april', 'billed_target_april')
def _compute_yet_to_billed_april(self): def _compute_yet_to_billed_april(self):
@ -158,31 +178,7 @@ class SOS_Sales_Achievement_Report(models.Model):
@api.depends(
'yet_to_billed_target_april', 'yet_to_billed_target_may', 'yet_to_billed_target_june',
'yet_to_billed_target_july', 'yet_to_billed_target_august', 'yet_to_billed_target_september',
'yet_to_billed_target_october', 'yet_to_billed_target_november', 'yet_to_billed_target_december',
'yet_to_billed_target_january', 'yet_to_billed_target_february', 'yet_to_billed_target_march'
)
def _compute_ytd_yet_to_billed(self):
month_map = [
'april', 'may', 'june', 'july', 'august', 'september',
'october', 'november', 'december',
'january', 'february', 'march'
]
current_month = date.today().month
# In FY April to March, January=10th index
if current_month >= 4:
months_to_include = month_map[:current_month - 4 + 1]
else:
months_to_include = month_map[:current_month + 9 + 1]
for rec in self:
total = 0.0
for m in months_to_include:
total += getattr(rec, f'yet_to_billed_target_{m}', 0.0)
rec.ytd_yet_to_billed = total
def action_view_billed_lines(self): def action_view_billed_lines(self):
self.ensure_one() self.ensure_one()
@ -193,29 +189,31 @@ class SOS_Sales_Achievement_Report(models.Model):
else: else:
view_id = self.env.ref('sos_sales.view_sos_billed_collection_wizard_form_collected').id view_id = self.env.ref('sos_sales.view_sos_billed_collection_wizard_form_collected').id
# Extract year from financial_year string like 'FY 2025-2026'
match = re.search(r'FY\s*(\d{4})', self.financial_year or '') match = re.search(r'FY\s*(\d{4})', self.financial_year or '')
year = int(match.group(1)) if match else date.today().year year = int(match.group(1)) if match else date.today().year
# Get month date range
last_day = calendar.monthrange(year, month)[1] last_day = calendar.monthrange(year, month)[1]
from_date = date(year, month, 1) from_date = date(year, month, 1)
to_date = date(year, month, last_day) to_date = date(year, month, last_day)
if self.category == "sales":
sales_person_id = self.sales_person.id or self.ref('sales_person').id
# Use the actual related record's value (not the related field) if not sales_person_id:
sales_person_id = self.sales_person.id or self.ref('sales_person').id raise UserError("Sales person is missing in this record.")
# If sales_person is still None, raise a warning billed_lines = self.env['sos_billing_collection'].search([
if not sales_person_id: ('sales_person', '=', sales_person_id),
raise UserError("Sales person is missing in this record.") ('action_status', '=', action),
('date_of_action', '>=', from_date),
# Search filtered billing lines ('date_of_action', '<=', to_date),
billed_lines = self.env['sos_billing_collection'].search([ ])
('sales_person', '=', sales_person_id), else:
('action_status', '=', action), billed_lines = self.env['sos_billing_collection'].search([
('date_of_action', '>=', from_date), ('category', '=', "export"),
('date_of_action', '<=', to_date), ('action_status', '=', action),
]) ('date_of_action', '>=', from_date),
('date_of_action', '<=', to_date),
])
wizard = self.env['sos_billed_collection_wizard'].create({ wizard = self.env['sos_billed_collection_wizard'].create({
'main_parent_id': self.id, 'main_parent_id': self.id,
'billed_line_ids': [(6, 0, billed_lines.ids)], 'billed_line_ids': [(6, 0, billed_lines.ids)],
@ -246,9 +244,14 @@ class SOS_Sales_Achievement_Report(models.Model):
# } # }
def action_view_brief_lines_acc(self): def action_view_brief_lines_acc(self):
self.ensure_one() self.ensure_one()
domain = [('ref_record_id', '=', self.id)] current_date = date.today()
start_year = current_date.year if current_date.month >= 4 else current_date.year - 1
end_year = start_year + 1
current_fy = f"FY {start_year}-{end_year}"
domain = [
('ref_record_id', '=', self.id),
('financial_year', '!=', current_fy),
]
brief_lines = self.env['sos_sales_achievement_report_brief'].search(domain) brief_lines = self.env['sos_sales_achievement_report_brief'].search(domain)
@ -266,7 +269,6 @@ class SOS_Sales_Achievement_Report(models.Model):
def action_view_brief_lines(self): def action_view_brief_lines(self):
self.ensure_one() self.ensure_one()
domain = [('ref_id', '=', self.id)] domain = [('ref_id', '=', self.id)]
# Extract starting year from 'FY 2025-2026' # Extract starting year from 'FY 2025-2026'
match = re.search(r'FY\s*(\d{4})', self.financial_year or '') match = re.search(r'FY\s*(\d{4})', self.financial_year or '')
if match: if match:
@ -289,6 +291,14 @@ class SOS_Sales_Achievement_Report(models.Model):
domain.append(('action_date', '<=', end_date)) domain.append(('action_date', '<=', end_date))
brief_lines = self.env['sos_sales_achievement_report_brief'].search(domain) brief_lines = self.env['sos_sales_achievement_report_brief'].search(domain)
total_proposal_value=0
for eachrecord in brief_lines:
total_proposal_value += eachrecord.proposal_value
if month:
month_name = calendar.month_name[month].lower()
field_name = f"actual_target_{month_name}"
self[field_name] = total_proposal_value
return { return {
'name': 'Achievement Brief Lines', 'name': 'Achievement Brief Lines',
@ -497,27 +507,22 @@ class SOS_Sales_Achievement_Report(models.Model):
record.achievement_percentage_total = "0.00%" record.achievement_percentage_total = "0.00%"
@api.depends( @api.depends(
'yet_to_billed_target_april','yet_to_billed_target_may','yet_to_billed_target_june', 'yet_to_billed_target_april','yet_to_billed_target_may','yet_to_billed_target_june',
'yet_to_billed_target_july','yet_to_billed_target_august','yet_to_billed_target_september', 'yet_to_billed_target_july','yet_to_billed_target_august','yet_to_billed_target_september',
'yet_to_billed_target_october','yet_to_billed_target_november','yet_to_billed_target_december', 'yet_to_billed_target_october','yet_to_billed_target_november','yet_to_billed_target_december',
'yet_to_billed_target_january','yet_to_billed_target_february','yet_to_billed_target_march' 'yet_to_billed_target_january','yet_to_billed_target_february','yet_to_billed_target_march'
) )
def _compute_yet_to_billed_total_target(self): def _compute_yet_to_billed_total_target(self):
for record in self: for record in self:
record.yet_to_billed_target_total = round(sum([ # Get current month name in lowercase
record.yet_to_billed_target_april or 0, month_num = date.today().month
record.yet_to_billed_target_may or 0, month_name = calendar.month_name[month_num].lower() # e.g., "august"
record.yet_to_billed_target_june or 0,
record.yet_to_billed_target_july or 0, # Build the dynamic field name
record.yet_to_billed_target_august or 0, field_name = f"yet_to_billed_target_{month_name}"
record.yet_to_billed_target_september or 0, record.ytd_yet_to_billed = round(getattr(record, field_name) or 0, 2)
record.yet_to_billed_target_october or 0, record.yet_to_billed_target_total = round(getattr(record, field_name) or 0, 2)
record.yet_to_billed_target_november or 0,
record.yet_to_billed_target_december or 0,
record.yet_to_billed_target_january or 0,
record.yet_to_billed_target_february or 0,
record.yet_to_billed_target_march or 0
]), 2)
@api.depends( @api.depends(
'planned_target_april','planned_target_may','planned_target_june', 'planned_target_april','planned_target_may','planned_target_june',
'planned_target_july','planned_target_august','planned_target_september', 'planned_target_july','planned_target_august','planned_target_september',
@ -599,6 +604,7 @@ class SOS_Sales_Achievement_Report_Brief(models.Model):
_name = 'sos_sales_achievement_report_brief' _name = 'sos_sales_achievement_report_brief'
_description = 'Achievement Brief' _description = 'Achievement Brief'
_order = 'action_date desc' _order = 'action_date desc'
_rec_name = 'po_no'
def get_financial_year_selection(self): def get_financial_year_selection(self):
current_date = date.today() current_date = date.today()
start_year = 2024 # starting from FY 2024-2025 start_year = 2024 # starting from FY 2024-2025
@ -624,33 +630,77 @@ class SOS_Sales_Achievement_Report_Brief(models.Model):
string="Financial Year", string="Financial Year",
required=True required=True
) )
category = fields.Selection([
('sales', 'Sales'),
('export', 'Export')
], string="Category", required=True,related="ref_id.category")
sales_person = fields.Many2one('res.users', string='Sales person',related="ref_id.sales_person",store=True) sales_person = fields.Many2one('res.users', string='Sales person',related="ref_id.sales_person",store=True)
po_no = fields.Char(string="PO No") po_no = fields.Char(string="PO No")
invoice_no = fields.Char(string="Invoice No") invoice_no = fields.Char(string="Invoice No")
proposal_value = fields.Monetary(currency_field='currency_id',string="PO Value(In Lakhs)") proposal_value = fields.Monetary(currency_field='currency_id',string="PO Value(In Lakhs)")
billed_date = fields.Date(string="Billed Date") billed_date = fields.Date(string="Billed Date")
billed_amount = fields.Monetary(currency_field='currency_id',string="Billed Value(In Lakhs)") billed_amount = fields.Monetary(currency_field='currency_id',string="Billed Value(In Lakhs)")
# def view_lines_acc(self):
# self.ensure_one()
# return {
# 'name': 'Achievement Brief Lines',
# 'type': 'ir.actions.act_window',
# 'res_model': 'sos_sales_achievement_report_brief',
# 'view_mode': 'tree',
# 'domain': [('ref_record_id', '=', self.id)],
# 'context': {
# 'default_ref_record_id': self.id
# },
# 'target': 'current',
# }
def delete_achievement_line(self): def delete_achievement_line(self):
self.unlink()
def unlink(self): Env = self.env
for record in self: Line = Env['sos_sales_achievement_report_brief']
report = self.env['sos_sales_achievement_report'].browse(record.ref_id.id) Parent = Env['sos_sales_achievement_report']
if report and hasattr(report, 'opening_balance'):
report.write({'opening_balance': report.opening_balance - record.proposal_value}) # 1) Collect affected month windows per parent (no sums yet)
return super(SOS_Sales_Achievement_Report_Brief, self).unlink() # { parent_id: set((cal_year, month_num)) }
affected = {}
for rec in self:
# resolve parent id (prefer Many2one 'ref_id'; fallback to 'ref_record_id')
parent_id = False
if hasattr(rec, 'ref_id') and rec.ref_id:
parent_id = rec.ref_id.id
elif hasattr(rec, 'ref_record_id') and rec.ref_record_id:
parent_id = getattr(rec.ref_record_id, 'id', rec.ref_record_id)
if not parent_id:
continue
d = fields.Date.to_date(rec.action_date) or fields.Date.context_today(self)
month_num = d.month # 1..12
fy_text = (rec.financial_year or '').strip()
m = re.search(r'FY\s*(\d{4})', fy_text)
if not m:
# skip this line if FY is malformed
continue
fy_start = int(m.group(1))
# AprDec => start year; JanMar => start year+1
cal_year = fy_start if month_num >= 4 else fy_start + 1
affected.setdefault(parent_id, set()).add((cal_year, month_num))
# 2) Delete the lines first
super(type(self), self).unlink()
# 3) Recompute totals from remaining lines and write to parent
for parent_id, months in affected.items():
write_vals = {}
for cal_year, month_num in months:
last_day = calendar.monthrange(cal_year, month_num)[1]
start_str = f"{cal_year}-{month_num:02d}-01"
end_str = f"{cal_year}-{month_num:02d}-{last_day:02d}"
total = sum(Line.search([
('ref_id', '=', parent_id),
('action_date', '>=', start_str),
('action_date', '<=', end_str),
]).mapped('proposal_value')) or 0.0
field_name = f"actual_target_{calendar.month_name[month_num].lower()}"
if field_name in Parent._fields:
write_vals[field_name] = total
if write_vals:
Parent.browse(parent_id).write(write_vals)
return True
def open_line_form(self): def open_line_form(self):
self.ensure_one() self.ensure_one()
@ -668,60 +718,58 @@ class SOS_Sales_Achievement_Report_Brief(models.Model):
return f"FY {start_year}-{end_year}" return f"FY {start_year}-{end_year}"
def write(self, vals): def write(self, vals):
res = super().write(vals)
# avoid infinite loop when we write our computed monthly field
if self.env.context.get('_skip_month_compute'):
return res
for rec in self: for rec in self:
# Previous values # take incoming values if present, else current record values
old_billed_date = rec.billed_date action_date_any = vals.get('action_date', rec.action_date)
old_billed_amount = rec.billed_amount fy_text = (vals.get('financial_year', rec.financial_year) or '').strip()
report = rec.ref_id
# New values
new_billed_date = vals.get('billed_date', old_billed_date)
new_billed_amount = vals.get('billed_amount', old_billed_amount)
if isinstance(new_billed_date, str):
new_billed_date = datetime.strptime(new_billed_date, '%Y-%m-%d').date()
# Adjust billed target # normalize to date
if report and old_billed_date and new_billed_date: d = fields.Date.to_date(action_date_any) or fields.Date.context_today(self)
old_month_billed = old_billed_date.strftime('%B').lower() month_num = d.month # 1..12
new_month_billed = new_billed_date.strftime('%B').lower()
if old_month_billed != new_month_billed or old_billed_amount != new_billed_amount: # FY like "FY 2025-2026" -> start year 2025
old_field_billed = f"billed_target_{old_month_billed}" m = re.search(r'FY\s*(\d{4})', fy_text)
new_field_billed = f"billed_target_{new_month_billed}" if not m:
if hasattr(report, old_field_billed): raise ValueError(f"Unable to extract year from financial year: {fy_text}")
report.write({ fy_start = int(m.group(1))
old_field_billed: max((getattr(report, old_field_billed, 0.0) or 0.0) - old_billed_amount, 0.0)
}) # AprDec belong to start year; JanMar to start year+1
if hasattr(report, new_field_billed): cal_year = fy_start if month_num >= 4 else fy_start + 1
report.write({
new_field_billed: (getattr(report, new_field_billed, 0.0) or 0.0) + new_billed_amount # monthly date window
}) last_day = calendar.monthrange(cal_year, month_num)[1]
# Optionally create billing collection entry (if needed start_str = f"{cal_year}-{month_num:02d}-01"
end_str = f"{cal_year}-{month_num:02d}-{last_day:02d}"
# sum for this record in that month
domain = [ domain = [
('ref_id', '=', report.id), ('ref_id', '=', self.ref_record_id),
('sales_person', '=', report.sales_person.id), ('action_date', '>=', start_str),
('customer_name', '=', vals.get('customer_name', rec.customer_name.id)) ('action_date', '<=', end_str),
] ]
lines = rec.env['sos_sales_achievement_report_brief'].search(domain)
total_proposal_value=0
for eachrecord in lines:
total_proposal_value += eachrecord.proposal_value
record = self.env['sos_sales_achievement_report'].search(
[('id', '=', self.ref_record_id)],
limit=1
)
month_name = calendar.month_name[month_num].lower()
field_name = f"actual_target_{month_name}"
field_name = f"actual_target_{month_name}"
record.write({
field_name : total_proposal_value
})
existing = self.env['sos_billing_collection'].search(domain, limit=1)
if not existing:
self.env['sos_billing_collection'].create({
'ref_id': report.id,
'customer_name': vals.get('customer_name', rec.customer_name.id),
'sales_person': report.sales_person.id,
'action_status': 'Billed',
'date_of_action': new_billed_date,
'po_no':vals.get('po_no'),
'value': new_billed_amount
})
else:
existing.write({
'value': new_billed_amount,
'po_no':vals.get('po_no'),
'date_of_action': new_billed_date
})
return super(SOS_Sales_Achievement_Report_Brief, self).write(vals)
return res
@api.model @api.model
def create(self, vals): def create(self, vals):
ref_id = vals.get('ref_id') ref_id = vals.get('ref_id')
@ -851,7 +899,12 @@ class SosBillingCollection(models.Model):
_name = 'sos_billing_collection' _name = 'sos_billing_collection'
_description = 'Billing & Collection Details' _description = 'Billing & Collection Details'
ref_id = fields.Many2one('sos_sales_achievement_report', ondelete="cascade", required=True) ref_id = fields.Many2one('sos_sales_achievement_report', ondelete="cascade", required=True)
category = fields.Selection([
('sales', 'Sales'),
('export', 'Export')
], string="Category", required=True,related="ref_id.category")
customer_name = fields.Many2one('sos_customers', string="Customer Name") customer_name = fields.Many2one('sos_customers', string="Customer Name")
sales_person = fields.Many2one( sales_person = fields.Many2one(
'res.users', 'res.users',
@ -871,7 +924,12 @@ class SosBillingCollection(models.Model):
) )
value = fields.Monetary(currency_field='currency_id', string="Value (In Lakhs)") value = fields.Monetary(currency_field='currency_id', string="Value (In Lakhs)")
customer_name = fields.Many2one('sos_customers',string="Customer Name") customer_name = fields.Many2one('sos_customers',string="Customer Name")
po_no = fields.Char(string="PO No") po_id = fields.Many2one(
'sos_sales_achievement_report_brief', # or 'sos_sales_achievement_report' if PO lives there
string="PO No",
domain="[('po_no','!=', False), ('customer_name', '=', customer_name)]",
)
po_no = fields.Char(string="PO No", related='po_id.po_no', store=True, readonly=True)
invoice_no = fields.Char(string="Invoice No") invoice_no = fields.Char(string="Invoice No")
products = fields.Selection( products = fields.Selection(
[ [
@ -894,7 +952,16 @@ class SosBillingCollection(models.Model):
return f"FY {start_year}-{end_year}" return f"FY {start_year}-{end_year}"
def delete_form_line(self): def delete_form_line(self):
self.unlink() self.unlink()
def write_line_form(self):
self.ensure_one()
return {
'type': 'ir.actions.act_window',
'name': 'Edit Line',
'res_model': self._name,
'res_id': self.id,
'view_mode': 'form',
'target': 'new', # Opens as a popup
}
def unlink(self): def unlink(self):
for record in self: for record in self:
@ -919,6 +986,53 @@ class SosBillingCollection(models.Model):
setattr(report, actual_field_name, current_val - record.value) setattr(report, actual_field_name, current_val - record.value)
return super(SosBillingCollection, self).unlink() return super(SosBillingCollection, self).unlink()
def write(self, vals):
for record in self:
# Capture old values
old_date = record.date_of_action
old_status = record.action_status
old_value = record.value
# Determine if any key field is changing
new_date = vals.get('date_of_action', old_date)
new_status = vals.get('action_status', old_status)
new_value = vals.get('value', old_value)
# Convert date if needed
if isinstance(new_date, str):
new_date = datetime.strptime(new_date, '%Y-%m-%d').date()
# Compute old and new financial year/month
old_fy = self._get_financial_year(old_date) if old_date else None
old_month = old_date.strftime('%B').lower() if old_date else None
new_fy = self._get_financial_year(new_date) if new_date else None
new_month = new_date.strftime('%B').lower() if new_date else None
# Build field names
old_field = f"{old_status.lower()}_target_{old_month}" if old_month else None
new_field = f"{new_status.lower()}_target_{new_month}" if new_month else None
# Fetch related report
years = [fy for fy in [old_fy, new_fy] if fy]
report = self.env['sos_sales_achievement_report'].search([
('sales_person', '=', record.sales_person.id),
('financial_year', 'in', years)
], limit=1)
if report:
# Subtract old value
if old_field and hasattr(report, old_field):
current_old = getattr(report, old_field, 0.0) or 0.0
setattr(report, old_field, current_old - old_value)
# Add new value
if new_field and hasattr(report, new_field):
current_new = getattr(report, new_field, 0.0) or 0.0
setattr(report, new_field, current_new + new_value)
# Proceed with actual write
return super(SosBillingCollection, self).write(vals)
@api.model @api.model
def create(self, vals): def create(self, vals):

View File

@ -24,6 +24,24 @@ class sos_sales_action_plan(models.Model):
string="End Customer/Quote No", string="End Customer/Quote No",
domain="[('customer_name', '=', customer_name), ('quote_no', '!=', False)]" domain="[('customer_name', '=', customer_name), ('quote_no', '!=', False)]"
) )
interested_in = fields.Selection(
[
('Product', 'Products'),
('Project', 'Projects')
],
string="Interested In",required=True,default="Product")
sales_type = fields.Selection(
[
('Domestic', 'Domestic'),
('International', 'International')
],
string="Sales Type",default="Domestic")
project_name= fields.Many2one('sos_projects',string="Project Name")
country = fields.Many2one(
'res.country',
string='Country',
default=lambda self: self.env['res.country'].search([('code', '=', 'IN')], limit=1)
)
ce_product_type = fields.Selection( ce_product_type = fields.Selection(
[ [
('Sales', 'Sales'), ('Sales', 'Sales'),
@ -45,7 +63,7 @@ class sos_sales_action_plan(models.Model):
('MC 250W', 'MC 250W'), ('MC 250W', 'MC 250W'),
('HeartTarang', 'HeartTarang') ('HeartTarang', 'HeartTarang')
], ],
string="Products",required=True) string="Products")
location = fields.Char(string="Location") location = fields.Char(string="Location")
quantity = fields.Char(string="Quantity") quantity = fields.Char(string="Quantity")
sales_executive = fields.Many2one( sales_executive = fields.Many2one(
@ -58,7 +76,7 @@ class sos_sales_action_plan(models.Model):
'res.users', 'res.users',
string='Sales Head', string='Sales Head',
default=lambda self: self.env.user, default=lambda self: self.env.user,
domain=lambda self: [('groups_id', 'in', self.env.ref('sos_inventory.sos_sales_user').ids + self.env.ref('sos_inventory.sos_ce_head').ids)] domain=lambda self: [('groups_id', 'in', self.env.ref('sos_inventory.sos_sales_user').ids + self.env.ref('sos_inventory.sos_ce_head').ids + self.env.ref('sos_inventory.sos_sales_sapl_user').ids)]
) )
action_type = fields.Selection([ action_type = fields.Selection([
@ -107,7 +125,21 @@ class sos_sales_action_plan(models.Model):
('draft', 'Draft'), ('draft', 'Draft'),
('confirmed', 'Confirmed'), ('confirmed', 'Confirmed'),
], string='State', default='draft', readonly=True) ], string='State', default='draft', readonly=True)
is_ce_user_created = fields.Boolean(
compute='_compute_is_ce_user_created',
store=True,
string='Created by CE User'
)
reporting_to = fields.Many2one('res.users',related="sales_executive.reporting_to", string='Reporting To')
@api.depends('create_uid')
def _compute_is_ce_user_created(self):
ce_groups = [
self.env.ref('sos_inventory.sos_ce_user').id
]
for record in self:
record.is_ce_user_created = any(
gid in record.create_uid.groups_id.ids for gid in ce_groups
)
def _get_customer_domain(self): def _get_customer_domain(self):
if ( if (
self.env.user.has_group('sos_inventory.sos_management_user') or self.env.user.has_group('sos_inventory.sos_management_user') or
@ -450,6 +482,7 @@ class sos_sales_action_plan(models.Model):
} }
} }
else: else:
interested_in=self.interested_in.lower()+'s'
vals = { vals = {
'customer_name': self.customer_name.id, 'customer_name': self.customer_name.id,
'end_customer_name': self.end_customer_name, 'end_customer_name': self.end_customer_name,
@ -462,7 +495,11 @@ class sos_sales_action_plan(models.Model):
'quantity': self.quantity, 'quantity': self.quantity,
'po_no': self.po_no, 'po_no': self.po_no,
'po_copy': self.po_copy, 'po_copy': self.po_copy,
'po_copy_filename': self.po_copy_filename 'po_copy_filename': self.po_copy_filename,
'sales_type':self.sales_type,
'project_name':self.project_name.id,
'interested_in':interested_in,
'country':self.country.id
} }
if self.ce_product_type: if self.ce_product_type:
vals['ce_product_type'] = self.ce_product_type vals['ce_product_type'] = self.ce_product_type

View File

@ -61,6 +61,8 @@ class sos_sales_leads(models.Model):
) )
line_ids_contacts = fields.One2many('sos_leads_customer_contact_lines', 'ref_id', string="Contact Details",copy=True) line_ids_contacts = fields.One2many('sos_leads_customer_contact_lines', 'ref_id', string="Contact Details",copy=True)
convert_to_customer_btn_display = fields.Boolean(default=True) convert_to_customer_btn_display = fields.Boolean(default=True)
responsible_sales_persons = fields.Many2many('res.users',string="Responsible")
def action_convert_to_customer(self): def action_convert_to_customer(self):
self.convert_to_customer_btn_display = False self.convert_to_customer_btn_display = False
self.status = "Moved to Customer" self.status = "Moved to Customer"
@ -73,14 +75,18 @@ class sos_sales_leads(models.Model):
'mobile_number': line.mobile_number, 'mobile_number': line.mobile_number,
'set_as_primary': line.set_as_primary, 'set_as_primary': line.set_as_primary,
}) for line in self.line_ids_contacts] }) for line in self.line_ids_contacts]
if self.interested_in == "Product":
interest = "products"
else:
interest = "projects"
customer_record = customer_model.create({ customer_record = customer_model.create({
'customer_name': self.company_name, 'customer_name': self.company_name,
'customer_city':self.location, 'customer_city':self.location,
'vertical_domain':self.vertical_domain.id, 'vertical_domain':self.vertical_domain.id,
'correspondence_address': self.correspondence_address, 'correspondence_address': self.correspondence_address,
'products':self.products, 'products':self.products_interested.name,
'interested_in':self.interested_in, 'interested_in':interest,
'project_name':self.project_name, 'project_name':self.project_name.name,
'line_ids_contacts': line_contacts_data, 'line_ids_contacts': line_contacts_data,
'leads_ref_no':self.id 'leads_ref_no':self.id

View File

@ -15,12 +15,17 @@ class ReportBusinessPerformance(models.AbstractModel):
def _get_report_values(self, docids, data=None): def _get_report_values(self, docids, data=None):
sales_person_id = data.get('sales_person_id') if data else False sales_person_id = data.get('sales_person_id') if data else False
financial_year = self._get_financial_year() financial_year = self._get_financial_year()
category = data.get('category')
domain = [('financial_year', '=', financial_year)] domain = [('financial_year', '=', financial_year)]
if sales_person_id: if category == "sales":
domain.append(('sales_person', '=', sales_person_id)) if sales_person_id:
domain.append(('sales_person', '=', sales_person_id))
records = self.env['sos_sales_achievement_report'].search(domain, order="sales_person ASC") records = self.env['sos_sales_achievement_report'].search(domain, order="sales_person ASC")
else:
domain.append(('category', '=', 'export'))
records = self.env['sos_sales_achievement_report'].search(domain)
months = [ months = [
'april', 'may', 'june', 'july', 'august', 'september', 'april', 'may', 'june', 'july', 'august', 'september',
@ -121,6 +126,7 @@ class ReportBusinessPerformance(models.AbstractModel):
'summary': summary, 'summary': summary,
'ytd_months': ytd_months, 'ytd_months': ytd_months,
'current_month_index': int(current_month_index), 'current_month_index': int(current_month_index),
'is_filtered_by_sales_person': bool(sales_person_id) 'is_filtered_by_sales_person': bool(sales_person_id),
'report_generated_on':date.today()
} }

View File

@ -21,6 +21,15 @@
border: solid 1px #ccc; border: solid 1px #ccc;
border-radius: 20px;"> border-radius: 20px;">
<h6 style="text-align:center">PIPELINE REPORT</h6> <h6 style="text-align:center">PIPELINE REPORT</h6>
<div style="text-align:right; font-size:14px; margin-bottom:5px;">
<t t-if="from_date or to_date">
<div>
<p><b>Report Period : From</b> <t t-esc="from_date or 'N/A'"/> <b>To</b> <t t-esc="to_date or 'N/A'"/>.</p>
</div>
</t>
<b>Report generated on : </b> <t t-esc="report_generated_on"/>
</div>
<table class="table_custom display"> <table class="table_custom display">
<thead style="background-color: lavender;"> <thead style="background-color: lavender;">
<tr> <tr>
@ -41,7 +50,7 @@
<th style=" line-height: 2px; text-align: center; <th style=" line-height: 2px; text-align: center;
font-weight: normal; font-weight: normal;
font-size: smaller;" t-att-colspan="month_count">Expected Order Value (In Lakhs)</th> font-size: smaller;" t-att-colspan="month_count">Expected Order Value(In Lacs)</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@ -9,8 +9,11 @@
<div class="page"> <div class="page">
<br></br> <br></br>
<h4 style="text-align: center;">Business Performance Report- <t t-esc="financial_year"/></h4> <h4 style="text-align: center;">Business Performance Report- <t t-esc="financial_year"/></h4>
<span style="float: right;font-weight: bold;">Note : Rupees(In Lakhs)</span> <span style="float: right;"><b>Note :</b> Rupees(In Lakhs)</span>
<!-- ✅ SUMMARY TABLE --> <br></br><div style="text-align:right; font-size:14px; margin-bottom:5px;">
<b>Report generated on : </b> <t t-esc="report_generated_on"/>
</div>
<t t-if="not is_filtered_by_sales_person"> <t t-if="not is_filtered_by_sales_person">
<table class="table_custom" style="width:100%; font-size:14px;"> <table class="table_custom" style="width:100%; font-size:14px;">
@ -44,7 +47,7 @@
<t t-set="total_sales" t-value="0"/> <t t-set="total_sales" t-value="0"/>
<t t-foreach="months" t-as="m"> <t t-foreach="months" t-as="m">
<t t-set="val" t-value="summary['sales'][m]"/> <t t-set="val" t-value="summary['sales'][m]"/>
<td><t t-esc="val"/></td> <td><t t-esc="'%.2f' % float(val)"/></td>
<t t-set="total_sales" t-value="total_sales + val"/> <t t-set="total_sales" t-value="total_sales + val"/>
</t> </t>
<td><t t-esc="'%.2f' % float(total_sales)"/></td> <td><t t-esc="'%.2f' % float(total_sales)"/></td>
@ -116,9 +119,11 @@
<t t-foreach="docs" t-as="doc"> <t t-foreach="docs" t-as="doc">
<table class="table_custom" style="width:100%; font-size:14px;"> <table class="table_custom" style="width:100%; font-size:14px;">
<thead> <thead>
<tr style="background-color: #c4c4ff;"> <tr t-if="doc.category == 'sales'">
<td colspan="15"><b>Sales Executive : <t t-esc="doc.sales_person.name"/></b></td> <td colspan="15">
</tr> <b>Sales Executive : <t t-esc="doc.sales_person.name"/></b>
</td>
</tr>
<tr style="background-color:#e4e0f9"> <tr style="background-color:#e4e0f9">
<th>Month</th> <th>Month</th>
<t t-foreach="months" t-as="m"> <t t-foreach="months" t-as="m">

View File

@ -99,6 +99,26 @@
</t> </t>
</tbody> </tbody>
</table> </table>
<br></br>
<table class="table">
<tbody>
<tr><td colspan="2" style="background-color:#ddd;font-weight:bold">Costing</td></tr>
<tr><td>Product Cost</td><td><t t-esc="o.total_cost"/></td></tr>
<tr><td>Opreational Cost per Battery</td><td><t t-esc="o.margin_per_battery"/></td></tr>
<tr><td>Opreational Cost</td><td><t t-esc="o.margin"/></td></tr>
<tr><td>Packing and Forwarding</td><td><t t-esc="o.packing_and_forwarding"/></td></tr>
<tr><td>I and C Cost</td><td><t t-esc="o.iandc_costing"/></td></tr>
<tr><td>Warranty (%)</td><td><t t-esc="o.warranty_percentage"/></td></tr>
<tr><td>Warranty</td><td><t t-esc="o.warranty_cost"/></td></tr>
<tr><td>MSP Per Battery</td><td><t t-esc="o.additional_warranty"/></td></tr>
<tr><td>Additional Warranty</td><td><t t-esc="o.final_cost_per_battery"/></td></tr>
<tr><td>Proposal Value</td><td><t t-esc="o.final_cost"/></td></tr>
<tr><td colspan="2" style="background-color:#ddd;font-weight:bold">Accounts Costing</td></tr>
<tr><td>MSP(Per Battery)</td><td><t t-esc="o.final_cost_by_acc"/></td></tr>
<tr><td>Final MSP</td><td><t t-esc="o.final_total"/></td></tr>
</tbody>
</table>
<div style="width: 100%; display: flex; justify-content: space-between; margin-top: 50px;"> <div style="width: 100%; display: flex; justify-content: space-between; margin-top: 50px;">
<table class="table table-bordered"> <table class="table table-bordered">

View File

@ -68,7 +68,7 @@
</table> </table>
<br></br> <br></br>
<table class="table_custom"> <table class="table_custom">
<thead><td>Final Costing</td></thead> <thead><td><b>Final Costing</b></td></thead>
<tr> <tr>
<td><t t-esc="o.total_with_buffer"/></td> <td><t t-esc="o.total_with_buffer"/></td>
</tr> </tr>

View File

@ -63,5 +63,6 @@ access_sos_billed_collection_wizard,sos_billed_collection_wizard access,model_so
access_sos_business_performance_wizard,sos_business_performance_wizard access,model_sos_business_performance_wizard,base.group_user,1,1,1,1 access_sos_business_performance_wizard,sos_business_performance_wizard access,model_sos_business_performance_wizard,base.group_user,1,1,1,1
access_sos_products,sos_products access,model_sos_products,base.group_user,1,1,1,1 access_sos_products,sos_products access,model_sos_products,base.group_user,1,1,1,1
access_sos_projects,sos_projects access,model_sos_projects,base.group_user,1,1,1,1 access_sos_projects,sos_projects access,model_sos_projects,base.group_user,1,1,1,1
access_yet_to_bill_wizard,yet_to_bill_wizard access,model_yet_to_bill_wizard,base.group_user,1,1,1,1
access_yet_to_bill_line,yet_to_bill_line access,model_yet_to_bill_line,base.group_user,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
63 access_sos_business_performance_wizard sos_business_performance_wizard access model_sos_business_performance_wizard base.group_user 1 1 1 1
64 access_sos_products sos_products access model_sos_products base.group_user 1 1 1 1
65 access_sos_projects sos_projects access model_sos_projects base.group_user 1 1 1 1
66 access_yet_to_bill_wizard yet_to_bill_wizard access model_yet_to_bill_wizard base.group_user 1 1 1 1
67 access_yet_to_bill_line yet_to_bill_line access model_yet_to_bill_line base.group_user 1 1 1 1
68

View File

@ -7,7 +7,8 @@
<field name="domain_force">[(1, '=', 1)]</field> <field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[ <field name="groups" eval="[
(4, ref('sos_inventory.sos_management_user')), (4, ref('sos_inventory.sos_management_user')),
(4, ref('sos_inventory.sos_finance_user')) (4, ref('sos_inventory.sos_finance_user')),
(4, ref('sos_inventory.sos_sales_reviewer'))
]"/> ]"/>
<field name="perm_read" eval="1"/> <field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/> <field name="perm_write" eval="1"/>
@ -18,7 +19,9 @@
<field name="name">Sos Achievement Report: All Records - Read Access</field> <field name="name">Sos Achievement Report: All Records - Read Access</field>
<field name="model_id" ref="model_sos_sales_achievement_report"/> <field name="model_id" ref="model_sos_sales_achievement_report"/>
<field name="domain_force">[ <field name="domain_force">[
('create_uid', '=', user.id) '|',
('create_uid', '=', user.id),
('sales_person', '=', user.id)
]</field> ]</field>
<field name="groups" eval="[(4, ref('base.group_user'))]"/> <field name="groups" eval="[(4, ref('base.group_user'))]"/>
<field name="perm_read" eval="1"/> <field name="perm_read" eval="1"/>
@ -33,7 +36,8 @@
<field name="domain_force">[(1, '=', 1)]</field> <field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[ <field name="groups" eval="[
(4, ref('sos_inventory.sos_management_user')), (4, ref('sos_inventory.sos_management_user')),
(4, ref('sos_inventory.sos_finance_user')) (4, ref('sos_inventory.sos_finance_user')),
(4, ref('sos_inventory.sos_sales_reviewer'))
]"/> ]"/>
<field name="perm_read" eval="1"/> <field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/> <field name="perm_write" eval="1"/>
@ -55,44 +59,64 @@
<field name="perm_unlink" eval="0"/> <field name="perm_unlink" eval="0"/>
</record> </record>
<!-- sales_action RECORD RULE--> <!-- sales_action RECORD RULE-->
<record id="sos_sales_action_plan_own_records_rule" model="ir.rule"> <!-- 1) Full visibility for management/finance/sales reviewer -->
<field name="name">Sos sales action plan: Own Records - Read Access</field> <record id="sos_sales_action_plan_full_access_rule" model="ir.rule">
<field name="name">Sos Action Plan: Full Access (Mgmt/Finance/Reviewer)</field>
<field name="model_id" ref="model_sos_sales_action_plan"/> <field name="model_id" ref="model_sos_sales_action_plan"/>
<field name="domain_force">[(1, '=', 1)]</field> <!-- Always true -->
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[ <field name="groups" eval="[
(4, ref('sos_inventory.sos_management_user')), (4, ref('sos_inventory.sos_management_user')),
(4, ref('sos_inventory.sos_finance_user')) (4, ref('sos_inventory.sos_finance_user')),
(4, ref('sos_inventory.sos_sales_reviewer'))
]"/> ]"/>
<field name="perm_read" eval="1"/> <field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/> <field name="perm_write" eval="1"/>
<field name="perm_create" eval="1"/> <field name="perm_create" eval="1"/>
<field name="perm_unlink" eval="0"/> <field name="perm_unlink" eval="0"/>
</record> </record>
<record id="sos_sales_action_plan_ce_head_read_ce_user_rule" model="ir.rule">
<field name="name">Sales Action Plan: CE Head Reads CE User Records</field>
<field name="model_id" ref="model_sos_sales_action_plan"/>
<field name="domain_force" eval="[('create_uid.groups_id', 'in', [ref('sos_inventory.sos_ce_user')])]"/>
<field name="groups" eval="[(4, ref('sos_inventory.sos_ce_head'))]"/>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="0"/>
<field name="perm_create" eval="0"/>
<field name="perm_unlink" eval="0"/>
</record>
<record id="sos_sales_action_plan_all_records_rule" model="ir.rule"> <!-- 2) Own / Team for all internal users -->
<field name="name">Sos sales action plan: All Records - Read Access</field> <record id="sos_sales_action_plan_restricted_rule" model="ir.rule">
<field name="name">Sos Action Plan: Own and Team (Internal Users)</field>
<field name="model_id" ref="model_sos_sales_action_plan"/> <field name="model_id" ref="model_sos_sales_action_plan"/>
<field name="domain_force">[ <field name="domain_force">
'|', [
('create_uid', '=', user.id), '|','|',
('sales_executive', '=', user.id) ('create_uid', '=', user.id),
]</field> ('sales_executive', '=', user.id),
('reporting_to', '=', user.id)
]
</field>
<!-- Apply to all internal users -->
<field name="groups" eval="[(4, ref('base.group_user'))]"/> <field name="groups" eval="[(4, ref('base.group_user'))]"/>
<field name="perm_read" eval="1"/> <field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/> <field name="perm_write" eval="1"/>
<field name="perm_create" eval="0"/> <field name="perm_create" eval="1"/>
<field name="perm_unlink" eval="0"/> <field name="perm_unlink" eval="0"/>
</record> </record>
<record id="sos_sales_action_plan_ce_team_rule" model="ir.rule">
<field name="name">Sales Action Plan: CE Team View CE Records</field>
<field name="model_id" ref="model_sos_sales_action_plan"/>
<field name="domain_force">[('is_ce_user_created', '=', True)]</field>
<field name="groups" eval="[(4, ref('sos_inventory.sos_ce_user'))]"/>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/>
<field name="perm_create" eval="1"/>
<field name="perm_unlink" eval="0"/>
</record>
<record id="sos_sales_action_plan_ce_head_rule" model="ir.rule">
<field name="name">Sales Action Plan: CE Head View CE Records</field>
<field name="model_id" ref="model_sos_sales_action_plan"/>
<field name="domain_force">[('is_ce_user_created', '=', True)]</field>
<field name="groups" eval="[(4, ref('sos_inventory.sos_ce_head'))]"/>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/>
<field name="perm_create" eval="1"/>
<field name="perm_unlink" eval="0"/>
</record>
<!-- customers RECORD RULE--> <!-- customers RECORD RULE-->
<record id="sos_customers_own_records_rule" model="ir.rule"> <record id="sos_customers_own_records_rule" model="ir.rule">
<field name="name">Sos customers: Own Records - Read Access</field> <field name="name">Sos customers: Own Records - Read Access</field>
@ -101,14 +125,24 @@
<field name="groups" eval="[ <field name="groups" eval="[
(4, ref('sos_inventory.sos_management_user')), (4, ref('sos_inventory.sos_management_user')),
(4, ref('sos_inventory.sos_finance_user')), (4, ref('sos_inventory.sos_finance_user')),
(4, ref('sos_inventory.sos_ce_head')) (4, ref('sos_inventory.sos_ce_head')),
(4, ref('sos_inventory.sos_sales_reviewer'))
]"/> ]"/>
<field name="perm_read" eval="1"/> <field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/> <field name="perm_write" eval="1"/>
<field name="perm_create" eval="1"/> <field name="perm_create" eval="1"/>
<field name="perm_unlink" eval="0"/> <field name="perm_unlink" eval="0"/>
</record> </record>
<record id="sos_customers_ce_team_rule" model="ir.rule">
<field name="name">Customers: CE Team View CE customers Records</field>
<field name="model_id" ref="model_sos_customers"/>
<field name="domain_force">[('is_ce_user_created', '=', True)]</field>
<field name="groups" eval="[(4, ref('sos_inventory.sos_ce_user'))]"/>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="0"/>
<field name="perm_create" eval="0"/>
<field name="perm_unlink" eval="0"/>
</record>
<record id="sos_customers_all_records_rule" model="ir.rule"> <record id="sos_customers_all_records_rule" model="ir.rule">
<field name="name">Sos customers: All Records - Read Access</field> <field name="name">Sos customers: All Records - Read Access</field>
<field name="model_id" ref="model_sos_customers"/> <field name="model_id" ref="model_sos_customers"/>
@ -125,55 +159,39 @@
<field name="perm_unlink" eval="0"/> <field name="perm_unlink" eval="0"/>
</record> </record>
<!-- case_diary RECORD RULE--> <record id="sos_case_diary_ce_team_rule" model="ir.rule">
<record id="sos_case_diary_own_records_rule" model="ir.rule"> <field name="name">Case Diary: CE Team View CE Records</field>
<field name="name">Sos Case Diary: Own Records - Read Access</field>
<field name="model_id" ref="model_sos_case_diary"/> <field name="model_id" ref="model_sos_case_diary"/>
<field name="domain_force">[(1, '=', 1)]</field> <field name="domain_force">[('is_ce_user_created', '=', True)]</field>
<field name="groups" eval="[ <field name="groups" eval="[(4, ref('sos_inventory.sos_ce_user'))]"/>
(4, ref('sos_inventory.sos_management_user')),
(4, ref('sos_inventory.sos_finance_user'))
]"/>
<field name="perm_read" eval="1"/> <field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/> <field name="perm_write" eval="0"/>
<field name="perm_create" eval="1"/> <field name="perm_create" eval="0"/>
<field name="perm_unlink" eval="0"/> <field name="perm_unlink" eval="0"/>
</record> </record>
<record id="sos_case_diary_ce_head_read_ce_user_rule" model="ir.rule">
<field name="name">Case Diary: CE Head Reads CE User Records</field> <record id="sos_case_diary_ce_head_rule" model="ir.rule">
<field name="name">Case Diary: CE Head View CE Records</field>
<field name="model_id" ref="model_sos_case_diary"/> <field name="model_id" ref="model_sos_case_diary"/>
<field name="domain_force" eval="[('create_uid.groups_id', 'in', [ref('sos_inventory.sos_ce_user')])]"/> <field name="domain_force">[('is_ce_user_created', '=', True)]</field>
<field name="groups" eval="[(4, ref('sos_inventory.sos_ce_head'))]"/> <field name="groups" eval="[(4, ref('sos_inventory.sos_ce_head'))]"/>
<field name="perm_read" eval="1"/> <field name="perm_read" eval="1"/>
<field name="perm_write" eval="0"/> <field name="perm_write" eval="0"/>
<field name="perm_create" eval="0"/> <field name="perm_create" eval="0"/>
<field name="perm_unlink" eval="0"/> <field name="perm_unlink" eval="0"/>
</record> </record>
<record id="sos_case_diary_all_records_rule" model="ir.rule">
<field name="name">Sos Case Diary: All Records - Read Access</field>
<field name="model_id" ref="model_sos_case_diary"/>
<field name="domain_force">
[
'|', '|',
('create_uid', '=', user.id),
('reporting_to', '=', user.id),
('sales_person', '=', user.id)
]
</field>
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/>
<field name="perm_create" eval="0"/>
<field name="perm_unlink" eval="0"/>
</record>
<!-- Case Diary Report RECORD RULE--> <!-- Case Diary Report RECORD RULE-->
<record id="sos_case_diary_report_own_records_rule" model="ir.rule"> <!-- 1) Full visibility for management/finance/sales reviewer -->
<field name="name">Sos Case Diary Report: Own Records - Read Access</field> <record id="sos_case_diary_full_access_rule" model="ir.rule">
<field name="model_id" ref="model_sos_case_diary_report"/> <field name="name">Sos Case Diary: Full Access (Mgmt/Finance/Reviewer)</field>
<field name="domain_force">[(1, '=', 1)]</field> <field name="model_id" ref="model_sos_case_diary"/>
<!-- Always true -->
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[ <field name="groups" eval="[
(4, ref('sos_inventory.sos_management_user')) (4, ref('sos_inventory.sos_management_user')),
(4, ref('sos_inventory.sos_finance_user')),
(4, ref('sos_inventory.sos_sales_reviewer'))
]"/> ]"/>
<field name="perm_read" eval="1"/> <field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/> <field name="perm_write" eval="1"/>
@ -181,20 +199,26 @@
<field name="perm_unlink" eval="0"/> <field name="perm_unlink" eval="0"/>
</record> </record>
<record id="sos_case_diary_report_all_records_rule" model="ir.rule"> <!-- 2) Own / Team for all internal users -->
<field name="name">Sos Case Diary Report: All Records - Read Access</field> <record id="sos_case_diary_restricted_rule" model="ir.rule">
<field name="model_id" ref="model_sos_case_diary_report"/> <field name="name">Sos Case Diary: Own and Team (Internal Users)</field>
<field name="domain_force">[ <field name="model_id" ref="model_sos_case_diary"/>
'|', <field name="domain_force">
[
'|','|',
('create_uid', '=', user.id), ('create_uid', '=', user.id),
('reporting_to', '=', user.id) ('reporting_to', '=', user.id),
]</field> ('sales_person', '=', user.id)
]
</field>
<!-- Apply to all internal users -->
<field name="groups" eval="[(4, ref('base.group_user'))]"/> <field name="groups" eval="[(4, ref('base.group_user'))]"/>
<field name="perm_read" eval="1"/> <field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/> <field name="perm_write" eval="1"/>
<field name="perm_create" eval="0"/> <field name="perm_create" eval="1"/>
<field name="perm_unlink" eval="0"/> <field name="perm_unlink" eval="0"/>
</record> </record>
<!-- Leads RECORD RULE--> <!-- Leads RECORD RULE-->
<record id="sos_sales_leads_own_records_rule" model="ir.rule"> <record id="sos_sales_leads_own_records_rule" model="ir.rule">
<field name="name">Sos Leads: Own Records - Read Access</field> <field name="name">Sos Leads: Own Records - Read Access</field>
@ -214,14 +238,57 @@
<field name="name">Sos Leads: All Records - Read Access</field> <field name="name">Sos Leads: All Records - Read Access</field>
<field name="model_id" ref="model_sos_sales_leads"/> <field name="model_id" ref="model_sos_sales_leads"/>
<field name="domain_force">[ <field name="domain_force">[
'|', '|','|',
('create_uid', '=', user.id), ('create_uid', '=', user.id),
('lead_generated_by', '=', user.id) ('lead_generated_by', '=', user.id),
('responsible_sales_persons', 'in', [user.id])
]</field> ]</field>
<field name="groups" eval="[(4, ref('base.group_user'))]"/> <field name="groups" eval="[(4, ref('base.group_user'))]"/>
<field name="perm_read" eval="1"/> <field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/> <field name="perm_write" eval="1"/>
<field name="perm_create" eval="0"/> <field name="perm_create" eval="0"/>
<field name="perm_unlink" eval="0"/> <field name="perm_unlink" eval="0"/>
</record>
<record id="sos_proposal_boq_all_records_rule" model="ir.rule">
<field name="name">Sos Proposal BOQ: All Records - Read Access</field>
<field name="model_id" ref="model_sos_proposal_boq"/>
<field name="domain_force">[
'|',
('create_uid', '=', user.id),
('sales_executive', '=', user.id)
]</field>
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/>
<field name="perm_create" eval="1"/>
<field name="perm_unlink" eval="1"/>
</record>
<record id="sos_proposal_builder_all_records_rule" model="ir.rule">
<field name="name">Sos Proposal Builder: All Records - Read Access</field>
<field name="model_id" ref="model_sos_proposal_builder"/>
<field name="domain_force">[
'|',
('create_uid', '=', user.id),
('sales_executive', '=', user.id)
]</field>
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/>
<field name="perm_create" eval="1"/>
<field name="perm_unlink" eval="1"/>
</record>
<record id="sos_proposal_customer_requirement_all_records_rule" model="ir.rule">
<field name="name">Sos Proposal Requirement: All Records - Read Access</field>
<field name="model_id" ref="model_sos_proposal_customer_requirement"/>
<field name="domain_force">[
('create_uid', '=', user.id)
]</field>
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/>
<field name="perm_create" eval="1"/>
<field name="perm_unlink" eval="1"/>
</record> </record>
</odoo> </odoo>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<odoo> <odoo>
<menuitem id="sos_sales_menu_root" name="Sales" groups="sos_inventory.sos_sales_user,sos_inventory.sos_management_user,sos_inventory.sos_finance_user,sos_inventory.sos_ce_user"/> <menuitem id="sos_sales_menu_root" name="Sales" groups="sos_inventory.sos_sales_user,sos_inventory.sos_management_user,sos_inventory.sos_finance_user,sos_inventory.sos_ce_user,sos_inventory.sos_sales_reviewer,sos_inventory.sos_sales_sapl_user"/>
<menuitem id="sos_sales_report" name="REPORTS" parent="sos_sales_menu_root" groups="sos_inventory.sos_finance_user,sos_inventory.sos_sales_user,sos_inventory.sos_management_user,sos_inventory.sos_ce_head"/> <menuitem id="sos_sales_report" name="REPORTS" parent="sos_sales_menu_root" groups="sos_inventory.sos_finance_user,sos_inventory.sos_sales_user,sos_inventory.sos_management_user,sos_inventory.sos_ce_head,sos_inventory.sos_sales_reviewer,sos_inventory.sos_sales_sapl_user"/>
<menuitem id="sos_top_sales_report" name="MANAGEMENT REPORTS" parent="sos_sales_menu_root" groups="sos_inventory.sos_management_user"/> <menuitem id="sos_top_sales_report" name="MANAGEMENT REPORTS" parent="sos_sales_menu_root" groups="sos_inventory.sos_management_user,sos_inventory.sos_finance_user,sos_inventory.sos_sales_reviewer"/>
<menuitem id="sos_proposal_system" name="PROPOSAL SYSTEM" parent="sos_sales_menu_root" groups="sos_inventory.sos_management_user,sos_inventory.sos_finance_user,sos_inventory.sos_sales_user,sos_inventory.sos_ce_head,sos_inventory.sos_ce_user,sos_inventory.sos_inside_sales_user"/> <menuitem id="sos_proposal_system" name="PROPOSAL SYSTEM" parent="sos_sales_menu_root" groups="sos_inventory.sos_management_user,sos_inventory.sos_finance_user,sos_inventory.sos_sales_user,sos_inventory.sos_ce_head,sos_inventory.sos_ce_user,sos_inventory.sos_inside_sales_user,sos_inventory.sos_sales_sapl_user"/>
</odoo> </odoo>

View File

@ -62,6 +62,8 @@
<group> <group>
<group> <group>
<field name="status"/> <field name="status"/>
<field name="sales_type"/>
<field name="country" invisible="sales_type != 'International'"/>
<field name="quote_no"/> <field name="quote_no"/>
<field name="customer_name"/> <field name="customer_name"/>
<field name="end_customer_name"/> <field name="end_customer_name"/>
@ -133,7 +135,7 @@
<div class="col-4"> <div class="col-4">
<h5>Witness For Commercial Order</h5> <h5>Witness For Commercial Order</h5>
<table class="table_custom" style="box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;background-color: #fff;border: solid 4px #9689c1;"> <tr style="border-bottom: solid 1px #ccc;"> <table class="table_custom" style="box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;background-color: #fff;border: solid 4px #9689c1;"> <tr style="border-bottom: solid 1px #ccc;">
<td style="padding: 8px;" class="column"><b>Department In-Charge</b> <td style="padding: 8px;" class="column"><b>Top Management Sign</b>
<br></br><br></br> <br></br><br></br>
<button string="Approve" invisible="dept_incharge_approval_image" class="btn-primary custom_btn" type="object" name="action_deptincharge_esign_btn"></button> <button string="Approve" invisible="dept_incharge_approval_image" class="btn-primary custom_btn" type="object" name="action_deptincharge_esign_btn"></button>
</td> </td>
@ -281,7 +283,7 @@
<!-- Menu --> <!-- Menu -->
<menuitem id="menu_sos_case_diary" name="CASE DIARY" parent="sos_sales_menu_root" action="action_sos_case_diary" sequence="6" groups="sos_inventory.sos_finance_user,sos_inventory.sos_sales_user,sos_inventory.sos_management_user,sos_inventory.sos_ce_head,sos_inventory.sos_ce_user"/> <menuitem id="menu_sos_case_diary" name="CASE DIARY" parent="sos_sales_menu_root" action="action_sos_case_diary" sequence="6" groups="sos_inventory.sos_finance_user,sos_inventory.sos_sales_user,sos_inventory.sos_management_user,sos_inventory.sos_ce_head,sos_inventory.sos_ce_user,sos_inventory.sos_sales_reviewer,sos_inventory.sos_sales_sapl_user"/>
<menuitem id="menu_sos_spenco_report" <menuitem id="menu_sos_spenco_report"
name=" SPENCO Report" name=" SPENCO Report"
parent="sos_sales_report" parent="sos_sales_report"
@ -307,17 +309,17 @@
name="Action Plan Summary Report" name="Action Plan Summary Report"
parent="sos_top_sales_report" parent="sos_top_sales_report"
action="action_plan_summary_wizard" action="action_plan_summary_wizard"
sequence="8"/> sequence="8" groups="sos_inventory.sos_sales_user,sos_inventory.sos_management_user,sos_inventory.sos_finance_user,sos_inventory.sos_ce_user,sos_inventory.sos_sales_reviewer,sos_inventory.sos_sales_sapl_user"/>
<menuitem id="menu_billing_target_report" <menuitem id="menu_billing_target_report"
name="Billing Target Report" name="Billing Target Report"
parent="sos_top_sales_report" parent="sos_top_sales_report"
action="action_billing_target_report" action="action_billing_target_report"
sequence="9"/> sequence="9" groups="sos_inventory.sos_sales_user,sos_inventory.sos_management_user,sos_inventory.sos_finance_user,sos_inventory.sos_ce_user,sos_inventory.sos_sales_reviewer,sos_inventory.sos_sales_sapl_user"/>
<menuitem id="menu_business_performance_report" <menuitem id="menu_business_performance_report"
name="Business Performance Report" name="Business Performance Report"
parent="sos_top_sales_report" parent="sos_top_sales_report"
action="action_open_business_performance_wizard" action="action_open_business_performance_wizard"
sequence="10"/> sequence="10" groups="sos_inventory.sos_sales_user,sos_inventory.sos_management_user,sos_inventory.sos_finance_user,sos_inventory.sos_ce_user,sos_inventory.sos_sales_reviewer,sos_inventory.sos_sales_sapl_user"/>
<menuitem id="menu_sos_all_suspects" name="Suspects Report" parent="sos_sales_report" action="action_sos_suspects_report_wizard"/> <menuitem id="menu_sos_all_suspects" name="Suspects Report" parent="sos_sales_report" action="action_sos_suspects_report_wizard"/>
<menuitem id="sos_case_diary_report" name="Case Diary Report" <menuitem id="sos_case_diary_report" name="Case Diary Report"
parent="sos_sales_report" parent="sos_sales_report"

View File

@ -81,6 +81,7 @@
</searchpanel> </searchpanel>
<!-- Add fields to search on --> <!-- Add fields to search on -->
<field name="responsible" string="Sales Executive"/>
<field name="customer_name" string="Customer Name"/> <field name="customer_name" string="Customer Name"/>
<field name="vertical_domain" string="Domain/Vertical"/> <field name="vertical_domain" string="Domain/Vertical"/>
@ -89,5 +90,5 @@
</field> </field>
</record> </record>
<!-- Menu --> <!-- Menu -->
<menuitem id="menu_sos_customers" name="CUSTOMERS" parent="sos_sales_menu_root" action="action_sos_customers" sequence="2" groups="sos_inventory.sos_finance_user,sos_inventory.sos_sales_user,sos_inventory.sos_management_user,sos_inventory.sos_ce_head,sos_inventory.sos_ce_user"/> <menuitem id="menu_sos_customers" name="CUSTOMERS" parent="sos_sales_menu_root" action="action_sos_customers" sequence="2" groups="sos_inventory.sos_finance_user,sos_inventory.sos_sales_user,sos_inventory.sos_management_user,sos_inventory.sos_ce_head,sos_inventory.sos_ce_user,sos_inventory.sos_sales_reviewer,sos_inventory.sos_sales_sapl_user"/>
</odoo> </odoo>

View File

@ -19,6 +19,7 @@
<group> <group>
<field name="location" readonly="acc_approved_by_name"/> <field name="location" readonly="acc_approved_by_name"/>
<field name="products" readonly="acc_approved_by_name"/> <field name="products" readonly="acc_approved_by_name"/>
<field name="slave_type" invisible="products != 'BHMS 1.2V'"/>
</group> </group>
</group> </group>
<br></br> <br></br>
@ -1655,6 +1656,35 @@
</div> </div>
</div> </div>
</page> </page>
<page string="Installation &amp; Commissioning" invisible="proposal_id == False">
<group><field name="engineers_nos"/></group>
<group><field name="no_of_days"/></group>
<group><field name="iandc_travel_cost"/></group>
<br></br>
<table class="table_custom" groups="sos_inventory.sos_management_user,sos_inventory.sos_finance_user">
<thead><td></td><td><b>No of Persons</b></td><td><b>Cost per Day</b></td></thead>
<tbody>
<tr><td><b>Man Month( 2 to 3 Yrs)</b></td><td><field name="man_month_1to2_yrs_persons" readonly="acc_approved_by_name"/></td><td><field name="man_month_1to2_yrs_cost" readonly="acc_approved_by_name"/></td></tr>
<tr><td><b>Man Month( 3 to 5 Yrs)</b></td><td><field name="man_month_2to3_yrs_persons" readonly="acc_approved_by_name"/></td><td><field name="man_month_2to3_yrs_cost" readonly="acc_approved_by_name"/></td></tr>
<tr><td><b>Man Month(Manager)</b></td><td><field name="man_month_manager_persons" readonly="acc_approved_by_name"/></td><td><field name="man_month_manager_cost" readonly="acc_approved_by_name"/></td></tr>
<tr><td><b>Total Cost(Man Month+Travel)</b></td><td colspan="2"><field name="iandc_costing" readonly="acc_approved_by_name"/></td></tr>
</tbody>
</table>
</page>
<page string="Miscellaneous">
<field name="extra_cost_line_ids" readonly="acc_approved_by_name">
<tree editable="bottom">
<field name="field_name"/>
<field name="cost"/>
</tree>
</field>
</page>
<page string="Summary" groups="sos_inventory.sos_management_user,sos_inventory.sos_finance_user"> <page string="Summary" groups="sos_inventory.sos_management_user,sos_inventory.sos_finance_user">
<h3 style="text-transform: uppercase; <h3 style="text-transform: uppercase;
text-decoration: underline;">Finished Goods</h3> text-decoration: underline;">Finished Goods</h3>
@ -1676,27 +1706,24 @@
text-decoration: underline;">Miscellaneous</h3> text-decoration: underline;">Miscellaneous</h3>
<field name="merged_miscellaneous_html" nolabel="1"/> <field name="merged_miscellaneous_html" nolabel="1"/>
</page> <div class="oe_subtotal_footer" style="float: right;
<page string="Installation &amp; Commissioning" invisible="proposal_id == False"> padding: 20px;
border: solid 1px #ccc;
font-weight: bold;
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;">
<group><field name="engineers_nos"/></group> <!-- Gross Value Field -->
<group><field name="no_of_days"/></group> <div style="margin-bottom: 5px;">
<br></br> <label for="total_cost" style="font-weight: bold; margin-right: 10px;">Product Cost</label>
<table class="table_custom" groups="sos_inventory.sos_management_user,sos_inventory.sos_finance_user"> <field name="total_cost" widget="monetary" options="{'currency_field': 'currency_id'}" class="oe_inline"/>
<thead><td></td><td><b>No of Persons</b></td><td><b>Cost per Day</b></td></thead>
<tbody> </div></div>
<tr><td><b>Man Month( 2 to 3 Yrs)</b></td><td><field name="man_month_1to2_yrs_persons"/></td><td><field name="man_month_1to2_yrs_cost"/></td></tr>
<tr><td><b>Man Month( 3 to 5 Yrs)</b></td><td><field name="man_month_2to3_yrs_persons"/></td><td><field name="man_month_2to3_yrs_cost"/></td></tr>
<tr><td><b>Man Month(Manager)</b></td><td><field name="man_month_manager_persons"/></td><td><field name="man_month_manager_cost"/></td></tr>
<tr><td><b>Total</b></td><td colspan="2"><field name="iandc_costing"/></td></tr>
</tbody>
</table>
</page> </page>
<page string="Costing By Accounts" invisible="proposal_id == False" groups="sos_inventory.sos_management_user,sos_inventory.sos_finance_user"> <page string="Costing By Accounts" invisible="proposal_id == False" groups="sos_inventory.sos_management_user,sos_inventory.sos_finance_user">
<div class="row"> <div class="row">
<br></br> <br></br>
<div class="col-md-3" style="border-right: solid 1px #ccc;"> <div class="col-md-4" style="border-right: solid 1px #ccc;">
<table class="table"> <table class="table">
<h3 style="text-transform: uppercase; <h3 style="text-transform: uppercase;
text-decoration: underline;">Product Cost</h3> text-decoration: underline;">Product Cost</h3>
@ -1721,20 +1748,8 @@
</table> </table>
</div> </div>
<div class="col-md-3" style="border-right: solid 1px #ccc;">
<table class="table">
<h3 style="text-transform: uppercase;
text-decoration: underline;">Miscellaneous Cost</h3>
<field name="extra_cost_line_ids" readonly="acc_approved_by_name">
<tree editable="bottom">
<field name="field_name"/>
<field name="cost"/>
</tree> <div class="col-md-8">
</field>
</table>
</div>
<div class="col-md-6">
<table class="table"> <table class="table">
<h3 style="text-transform: uppercase; <h3 style="text-transform: uppercase;
@ -1744,15 +1759,28 @@
<tr><td class="column">Opreational Cost</td><td><field name="margin" readonly="acc_approved_by_name"/></td></tr> <tr><td class="column">Opreational Cost</td><td><field name="margin" readonly="acc_approved_by_name"/></td></tr>
<tr><td class="column">Packing &amp; Forwarding</td><td><field name="packing_and_forwarding" readonly="acc_approved_by_name"/></td></tr> <tr><td class="column">Packing &amp; Forwarding</td><td><field name="packing_and_forwarding" readonly="acc_approved_by_name"/></td></tr>
<tr><td class="column">Installation &amp; Commissioning</td><td><field name="iandc_costing" readonly="acc_approved_by_name"/></td></tr> <tr><td class="column">I &amp; C Cost</td><td><field name="iandc_costing" readonly="acc_approved_by_name"/></td></tr>
<tr><td class="column">Warranty (%)</td><td><field name="warranty_percentage" readonly="acc_approved_by_name"/></td></tr> <tr><td class="column">Warranty (%)</td><td><field name="warranty_percentage" readonly="acc_approved_by_name"/></td></tr>
<tr><td class="column">Warranty Cost</td><td><field name="warranty_cost" readonly="acc_approved_by_name"/></td></tr> <tr><td class="column">Warranty Cost</td><td><field name="warranty_cost" readonly="acc_approved_by_name"/></td></tr>
<tr><td class="column">Additional Warranty</td><td><field name="additional_warranty" readonly="acc_approved_by_name"/></td></tr> <tr><td class="column">Additional Warranty</td><td><field name="additional_warranty" readonly="acc_approved_by_name"/></td></tr>
<tr style="background-color: aliceblue;"><td class="column">MSP Per Battery</td><td><field style="font-weight: bold;font-size: 16px;" name="final_cost_per_battery" readonly="acc_approved_by_name"/></td></tr> <tr><td class="column">MSP Per Battery</td><td><field style="font-weight: bold;font-size: 16px;" name="final_cost_per_battery" readonly="acc_approved_by_name"/></td></tr>
<tr><td class="column">Proposal Value</td><td><field style="font-weight: bold;font-size: 18px;" name="final_cost" readonly="acc_approved_by_name"/></td></tr>
</table>
<table class="table_custom">
<thead>
<tr>
<th colspan="2" style="background-color: #504e4e;
color: #fff;
font-weight: bold;">Accounts Costing</th>
</tr>
</thead>
<tr style="background-color: #f2f9ff;"><td class="column">MSP(Per Battery)</td><td><field style="font-weight: bold;font-size: 18px;" name="final_cost_by_acc" readonly="acc_approved_by_name"/></td></tr>
<tr style="background-color: #f2f9ff;"><td class="column">Final MSP</td><td><field style="font-weight: bold;font-size: 18px;" name="final_total" readonly="acc_approved_by_name"/></td></tr>
<tr style="background-color: aliceblue;"><td class="column">Final MSP</td><td><field style="font-weight: bold;font-size: 18px;" name="final_cost" readonly="acc_approved_by_name"/></td></tr>
</table> </table>
</div> </div>
@ -1788,7 +1816,7 @@
<tr><td colspan="2" class="table_custom_header">To Be Filled By <span style="font-size: 18px;padding: 0px; color: #ffcc00;">Finance Team</span></td></tr> <tr><td colspan="2" class="table_custom_header">To Be Filled By <span style="font-size: 18px;padding: 0px; color: #ffcc00;">Finance Team</span></td></tr>
<tr> <tr>
<td style="padding: 8px;" class="column"><b>Approved By</b> <td style="padding: 8px;" class="column"><b>Approved By</b>
<button string="Approve" invisible="acc_approved_by_image" class="btn-primary custom_btn" type="object" name="action_acc_esign_btn"></button> <button string="Approve" confirm="Approve this costing?" invisible="acc_approved_by_image" class="btn-primary custom_btn" type="object" name="action_acc_esign_btn"></button>
</td> </td>
<td><field name="acc_approved_by_image" widget="image"/></td> <td><field name="acc_approved_by_image" widget="image"/></td>
</tr> </tr>

View File

@ -28,6 +28,8 @@
<field invisible="products != 'BHMS 1.2V'" name="master_type"/> <field invisible="products != 'BHMS 1.2V'" name="master_type"/>
<field invisible="products != 'BHMS 1.2V'" name="slave_type"/> <field invisible="products != 'BHMS 1.2V'" name="slave_type"/>
<field invisible="products != 'BHMS 1.2V'" name="ntc"/> <field invisible="products != 'BHMS 1.2V'" name="ntc"/>
<field invisible="products != 'BHMS 1.2V'" name="spare_count"/>
</group> </group>
</group> </group>
@ -37,7 +39,7 @@
<group> <group>
<field name="type_of_source"/> <field name="type_of_source"/>
<field name="number_of_ups" string="Number of UPS"/> <field name="number_of_ups" string="Number of UPS"/>
<field name="no_of_electrical_panel"/> <field name="no_of_electrical_panel" invisible="products != 'BHMS 12V'"/>
<field name="ups_line_ids"> <field name="ups_line_ids">
<tree editable="bottom"> <tree editable="bottom">
<field name="ups_index" column_invisible="1"/> <field name="ups_index" column_invisible="1"/>

View File

@ -15,10 +15,11 @@ name="action_report_achievement_btn"><i class="fa fa-print"></i> Print Report</b
<group> <group>
<group><field name="financial_year" style="font-size: 20px; pointer-events: none; color: #793595;"/> <group><field name="financial_year" style="font-size: 20px; pointer-events: none; color: #793595;"/>
</group> </group>
<group><field name="sales_person" /></group> <group><field name="category" /></group>
<group><field name="overall_target" /></group> <group><field name="overall_target" /></group>
<table style="margin-left: 15px;"><tr> <group><field name="sales_person" invisible="category == 'export'"/></group>
<td><group><field name="opening_balance" groups="sos_inventory.sos_finance_user,sos_inventory.sos_management_user"/> <table groups="sos_inventory.sos_finance_user,sos_inventory.sos_management_user" style="margin-left: 15px;"><tr>
<td><group><field name="opening_balance"/>
</group></td> </group></td>
<td><button name="action_view_brief_lines_acc" <td><button name="action_view_brief_lines_acc"
type="object" type="object"
@ -27,10 +28,15 @@ name="action_report_achievement_btn"><i class="fa fa-print"></i> Print Report</b
context="{'month': 0}" context="{'month': 0}"
style="padding: 0; border: none; background: none; font-size: 18px; box-shadow: 4px 5px 5px #e3e2e2;"/> style="padding: 0; border: none; background: none; font-size: 18px; box-shadow: 4px 5px 5px #e3e2e2;"/>
</td> </td>
</tr></table> </tr>
</table>
</group> </group>
<button groups="sos_inventory.sos_finance_user,sos_inventory.sos_management_user" name="action_yet_to_bill"
<br></br> type="object"
string="📝 Yet To Bill"
class="btn-primary"
style="padding: 0; border: none; background: none; font-size: 18px; box-shadow: 4px 5px 5px #e3e2e2;"/>
<br></br><br></br>
<table class="table_custom"> <table class="table_custom">
<thead> <thead>
<tr style="background-color: lavender;"> <tr style="background-color: lavender;">
@ -227,9 +233,9 @@ name="action_report_achievement_btn"><i class="fa fa-print"></i> Print Report</b
<td><field name="achievement_percentage_total" /></td> <td><field name="achievement_percentage_total" /></td>
<td><field name="ytd_sales_percentage" /></td> <td><field name="ytd_sales_percentage" /></td>
</tr> </tr>
<tr style="background-color: lavender;"><td class="column" colspan="15" style="text-align: center; <tr groups="sos_inventory.sos_finance_user,sos_inventory.sos_management_user" style="background-color: lavender;"><td class="column" colspan="15" style="text-align: center;
color: #000;text-transform: capitalize;">To be filled by Accounts team</td></tr> color: #000;text-transform: capitalize;">To be filled by Accounts team</td></tr>
<tr> <tr groups="sos_inventory.sos_finance_user,sos_inventory.sos_management_user">
<field name="can_edit_billed_target" invisible="1"/> <field name="can_edit_billed_target" invisible="1"/>
<td class="column" style="background-color: lavender;">Billed</td> <td class="column" style="background-color: lavender;">Billed</td>
<td> <td>
@ -368,7 +374,7 @@ name="action_report_achievement_btn"><i class="fa fa-print"></i> Print Report</b
<td><field readonly="not can_edit_billed_target" name="ytd_billed" /></td> <td><field readonly="not can_edit_billed_target" name="ytd_billed" /></td>
</tr> </tr>
<tr> <tr groups="sos_inventory.sos_finance_user,sos_inventory.sos_management_user">
<td class="column" style="background-color: lavender;">Collected</td> <td class="column" style="background-color: lavender;">Collected</td>
<td> <td>
<div style="display: flex; align-items: center;"> <div style="display: flex; align-items: center;">
@ -505,7 +511,7 @@ name="action_report_achievement_btn"><i class="fa fa-print"></i> Print Report</b
<td><field readonly="not can_edit_billed_target" name="collected_target_total" /></td> <td><field readonly="not can_edit_billed_target" name="collected_target_total" /></td>
<td><field readonly="not can_edit_billed_target" name="ytd_collected" /></td> <td><field readonly="not can_edit_billed_target" name="ytd_collected" /></td>
</tr> </tr>
<tr> <tr groups="sos_inventory.sos_finance_user,sos_inventory.sos_management_user">
<field name="can_edit_billed_target" invisible="1"/> <field name="can_edit_billed_target" invisible="1"/>
<td class="column" style="background-color: lavender;">Yet to Bill</td> <td class="column" style="background-color: lavender;">Yet to Bill</td>
<td><field readonly="not can_edit_billed_target" name="yet_to_billed_target_april" /></td> <td><field readonly="not can_edit_billed_target" name="yet_to_billed_target_april" /></td>
@ -539,6 +545,7 @@ name="action_report_achievement_btn"><i class="fa fa-print"></i> Print Report</b
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="Sales Achievement Reports"> <tree string="Sales Achievement Reports">
<field name="financial_year" /> <field name="financial_year" />
<field name="category"/>
<field name="sales_person" /> <field name="sales_person" />
<field name="overall_target" /> <field name="overall_target" />
</tree> </tree>

View File

@ -63,16 +63,21 @@
<group> <group>
<field name="update_done" invisible="1"/> <field name="update_done" invisible="1"/>
<field name="status"/> <field name="status"/>
<field name="sales_type"/>
<field name="country" invisible="sales_type != 'International'"/>
<field name="sales_executive" readonly="state == 'confirmed'"/> <field name="sales_executive" readonly="state == 'confirmed'"/>
<field name="date" readonly="state == 'confirmed'"/> <field name="interested_in"/>
<field name="action_type" readonly="state == 'confirmed'"/> <field name="project_name" invisible="interested_in == 'Product'"/>
<field name="product" required="interested_in == 'Product'" invisible="interested_in == 'Project'" readonly="state == 'confirmed'"/>
<field name="customer_name" readonly="state == 'confirmed'"/> <field name="customer_name" readonly="state == 'confirmed'"/>
<field name="quote_no_selector" readonly="state == 'confirmed'" options="{'no_create': True}"/> <field name="quote_no_selector" readonly="state == 'confirmed'" options="{'no_create': True}"/>
<field name="quote_no" readonly="state == 'confirmed'" placeholder="Or type new Quote/W.O No"/> <field name="quote_no" readonly="state == 'confirmed'" placeholder="Or type new Quote/W.O No"/>
<field name="end_customer_name" readonly="state == 'confirmed'" placeholder="Or type new End Customer Name"/> <field name="end_customer_name" readonly="state == 'confirmed'" placeholder="Or type new End Customer Name"/>
</group> </group>
<group> <group>
<field name="product" readonly="state == 'confirmed'"/>
<field name="date" readonly="state == 'confirmed'"/>
<field name="action_type" readonly="state == 'confirmed'"/>
<field name="ce_product_type" groups="sos_inventory.sos_ce_user,sos_inventory.sos_ce_head,sos_inventory.sos_finance_user,sos_inventory.sos_management_user"/> <field name="ce_product_type" groups="sos_inventory.sos_ce_user,sos_inventory.sos_ce_head,sos_inventory.sos_finance_user,sos_inventory.sos_management_user"/>
<field name="location" readonly="state == 'confirmed'"/> <field name="location" readonly="state == 'confirmed'"/>
@ -130,5 +135,5 @@
</record> </record>
<!-- Menu --> <!-- Menu -->
<menuitem id="menu_sos_sales_action_plan" name="ACTION PLAN" sequence="6" parent="sos_sales_menu_root" action="action_sos_sales_action_plan" groups="sos_inventory.sos_finance_user,sos_inventory.sos_sales_user,sos_inventory.sos_management_user,sos_inventory.sos_ce_head,sos_inventory.sos_ce_user"/> <menuitem id="menu_sos_sales_action_plan" name="ACTION PLAN" sequence="6" parent="sos_sales_menu_root" action="action_sos_sales_action_plan" groups="sos_inventory.sos_finance_user,sos_inventory.sos_sales_user,sos_inventory.sos_management_user,sos_inventory.sos_ce_head,sos_inventory.sos_ce_user,sos_inventory.sos_sales_reviewer,sos_inventory.sos_sales_sapl_user"/>
</odoo> </odoo>

View File

@ -54,7 +54,7 @@
<group> <group>
<group> <group>
<field name="sales_type"/> <field name="sales_type"/>
<field name="lead_generated_by"/> <field name="lead_generated_by" readonly="source == 'inside_sales'"/>
<field name="company_name"/> <field name="company_name"/>
<field name="convert_to_customer_btn_display" invisible="1"/> <field name="convert_to_customer_btn_display" invisible="1"/>
<field name="transferred_on" invisible="1"/> <field name="transferred_on" invisible="1"/>
@ -106,5 +106,5 @@
</record> </record>
<!-- Menu --> <!-- Menu -->
<menuitem id="menu_sos_sales_leads" name="LEADS" parent="sos_sales_menu_root" action="action_sos_sales_leads" sequence="1" groups="sos_inventory.sos_finance_user,sos_inventory.sos_sales_user,sos_inventory.sos_management_user,sos_inventory.sos_ce_head"/> <menuitem id="menu_sos_sales_leads" name="LEADS" parent="sos_sales_menu_root" action="action_sos_sales_leads" sequence="1" groups="sos_inventory.sos_finance_user,sos_inventory.sos_sales_user,sos_inventory.sos_management_user,sos_inventory.sos_ce_head,sos_inventory.sos_sales_reviewer,sos_inventory.sos_sales_sapl_user"/>
</odoo> </odoo>

View File

@ -257,5 +257,5 @@ name="action_report_sales_plan_btn"><i class="fa fa-print"></i> Print Report</bu
</record> </record>
<!-- Menu --> <!-- Menu -->
<menuitem id="menu_sos_sales_plan_target" name="SALES TARGET" sequence="7" parent="sos_sales_menu_root" action="action_sos_sales_plan_target" groups="sos_inventory.sos_finance_user,sos_inventory.sos_sales_user,sos_inventory.sos_management_user,sos_inventory.sos_ce_head"/> <menuitem id="menu_sos_sales_plan_target" name="SALES TARGET" sequence="7" parent="sos_sales_menu_root" action="action_sos_sales_plan_target" groups="sos_inventory.sos_finance_user,sos_inventory.sos_sales_user,sos_inventory.sos_management_user,sos_inventory.sos_ce_head,sos_inventory.sos_sales_reviewer,sos_inventory.sos_sales_sapl_user"/>
</odoo> </odoo>

View File

@ -39,5 +39,5 @@
</record> </record>
<!-- Menu --> <!-- Menu -->
<menuitem id="menu_sos_vertical_domain" name="CONFIGURATION" parent="sos_sales_menu_root" action="action_sos_vertical_domain" sequence="4" groups="sos_inventory.sos_finance_user,sos_inventory.sos_sales_user,sos_inventory.sos_management_user,sos_inventory.sos_ce_head"/> <menuitem id="menu_sos_vertical_domain" name="CONFIGURATION" parent="sos_sales_menu_root" action="action_sos_vertical_domain" sequence="4" groups="sos_inventory.sos_finance_user,sos_inventory.sos_sales_user,sos_inventory.sos_management_user,sos_inventory.sos_ce_head,sos_inventory.sos_sales_reviewer,sos_inventory.sos_sales_sapl_user"/>
</odoo> </odoo>

View File

@ -8,3 +8,4 @@ from .import sales_action_plan_report_wizard
from .import week_summary_wizard from .import week_summary_wizard
from .import action_plan_summary_wizard from .import action_plan_summary_wizard
from .import sos_business_performance_wizard from .import sos_business_performance_wizard
from .import yet_to_bill_wizard

View File

@ -4,6 +4,10 @@ class Business_performanceWizard(models.TransientModel):
_name = 'sos_business_performance_wizard' _name = 'sos_business_performance_wizard'
_description = 'Business Performance Wizard' _description = 'Business Performance Wizard'
category = fields.Selection([
('sales', 'Sales'),
('export', 'Export')
], string="Category", required=True, default='sales')
sales_person_id = fields.Many2one( sales_person_id = fields.Many2one(
'res.users', 'res.users',
string='Sales Executive', string='Sales Executive',
@ -13,6 +17,7 @@ class Business_performanceWizard(models.TransientModel):
def print_report(self): def print_report(self):
return self.env.ref('sos_sales.action_business_performance_report_custom').report_action(self, data={ return self.env.ref('sos_sales.action_business_performance_report_custom').report_action(self, data={
'category':self.category,
'sales_person_id': self.sales_person_id.id if self.sales_person_id else False 'sales_person_id': self.sales_person_id.id if self.sales_person_id else False
}) })

View File

@ -14,7 +14,8 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Business Performance Report"> <form string="Business Performance Report">
<group> <group>
<field name="sales_person_id"/> <field name="category"/>
<field name="sales_person_id" invisible="category == 'export'"/>
</group> </group>
<footer> <footer>
<button name="print_report" type="object" string="Generate Report" class="btn-primary"/> <button name="print_report" type="object" string="Generate Report" class="btn-primary"/>

Some files were not shown because too many files have changed in this diff Show More