Browse Source

Aug 14: [FIX] Bug Fixed 'stock_last_purchase_price'

pull/331/head
Cybrosys Technologies 9 months ago
parent
commit
43bd939c65
  1. 10
      stock_last_purchase_price/README.rst
  2. 29
      stock_last_purchase_price/__init__.py
  3. 33
      stock_last_purchase_price/__manifest__.py
  4. 5
      stock_last_purchase_price/doc/RELEASE_NOTES.md
  5. 29
      stock_last_purchase_price/models/__init__.py
  6. 29
      stock_last_purchase_price/models/product_category.py
  7. 29
      stock_last_purchase_price/models/product_product.py
  8. 29
      stock_last_purchase_price/models/product_template.py
  9. 29
      stock_last_purchase_price/models/stock_move.py
  10. 29
      stock_last_purchase_price/models/stock_move_line.py
  11. 4
      stock_last_purchase_price/static/description/index.html

10
stock_last_purchase_price/README.rst

@ -1,6 +1,6 @@
.. image:: https://img.shields.io/badge/license-OPL--1-red.svg .. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg
:target: https://www.odoo.com/documentation/17.0/legal/licenses.html#odoo-apps :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: OPL-1 :alt: License: AGPL-3
Costing Method: Last Purchase Price Costing Method: Last Purchase Price
=================================== ===================================
@ -30,8 +30,8 @@ Contacts
License License
------- -------
Odoo Proprietary License v1.0 (OPL-1) General Public License, Version 3 (AGPL v3).
(https://www.odoo.com/documentation/17.0/legal/licenses.html#odoo-apps) (https://www.gnu.org/licenses/agpl-3.0-standalone.html)
Bug Tracker Bug Tracker
----------- -----------

29
stock_last_purchase_price/__init__.py

@ -1,24 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################### ################################################################################
# #
# Cybrosys Technologies Pvt. Ltd. # Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Fathima Mazlin AM(odoo@cybrosys.com)
# #
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # This program is free software: you can modify
# Author: Cybrosys Techno Solutions (<https://www.cybrosys.com>) # it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# #
# This program is under the terms of the Odoo Proprietary License v1.0 # This program is distributed in the hope that it will be useful,
# (OPL-1) # but WITHOUT ANY WARRANTY; without even the implied warranty of
# It is forbidden to publish, distribute, sublicense, or sell copies of the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# Software or modified copies of the Software. # GNU Affero General Public License for more details.
# #
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # You should have received a copy of the GNU Affero General Public License
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # along with this program. If not, see <https://www.gnu.org/licenses/>.
# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
# #
############################################################################### ################################################################################
from . import models from . import models

33
stock_last_purchase_price/__manifest__.py

@ -1,25 +1,24 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################### ################################################################################
# #
# Cybrosys Technologies Pvt. Ltd. # Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Fathima Mazlin AM(odoo@cybrosys.com)
# #
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # This program is free software: you can modify
# Author: Cybrosys Techno Solutions (<https://www.cybrosys.com>) # it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# #
# This program is under the terms of the Odoo Proprietary License v1.0 # This program is distributed in the hope that it will be useful,
# (OPL-1) # but WITHOUT ANY WARRANTY; without even the implied warranty of
# It is forbidden to publish, distribute, sublicense, or sell copies of the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# Software or modified copies of the Software. # GNU Affero General Public License for more details.
# #
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # You should have received a copy of the GNU Affero General Public License
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # along with this program. If not, see <https://www.gnu.org/licenses/>.
# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
# #
############################################################################### ################################################################################
{ {
'name': 'Costing Method: Last Purchase Price', 'name': 'Costing Method: Last Purchase Price',
'version': '17.0.1.0.0', 'version': '17.0.1.0.0',
@ -32,9 +31,9 @@
'company': 'Cybrosys Techno Solutions', 'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions', 'maintainer': 'Cybrosys Techno Solutions',
'website': 'https://www.openhrms.com', 'website': 'https://www.openhrms.com',
'depends': ['stock_account', 'purchase', 'account_accountant'], 'depends': ['stock_account', 'purchase_stock'],
'images': ['static/description/banner.jpg'], 'images': ['static/description/banner.jpg'],
'license': 'OPL-1', 'license': 'AGPL-3',
'installable': True, 'installable': True,
'auto_install': False, 'auto_install': False,
'application': False, 'application': False,

5
stock_last_purchase_price/doc/RELEASE_NOTES.md

@ -4,3 +4,8 @@
#### Version 17.0.1.0.0 #### Version 17.0.1.0.0
#### ADD #### ADD
- Initial commit for Costing Method: Last Purchase Price - Initial commit for Costing Method: Last Purchase Price
#### 14.08.2024
#### Version 17.0.1.0.0
#### ADD
- BUG FIX

29
stock_last_purchase_price/models/__init__.py

@ -1,25 +1,24 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################### ################################################################################
# #
# Cybrosys Technologies Pvt. Ltd. # Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Fathima Mazlin AM(odoo@cybrosys.com)
# #
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # This program is free software: you can modify
# Author: Cybrosys Techno Solutions (<https://www.cybrosys.com>) # it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# #
# This program is under the terms of the Odoo Proprietary License v1.0 # This program is distributed in the hope that it will be useful,
# (OPL-1) # but WITHOUT ANY WARRANTY; without even the implied warranty of
# It is forbidden to publish, distribute, sublicense, or sell copies of the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# Software or modified copies of the Software. # GNU Affero General Public License for more details.
# #
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # You should have received a copy of the GNU Affero General Public License
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # along with this program. If not, see <https://www.gnu.org/licenses/>.
# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
# #
############################################################################### ################################################################################
from . import product_category from . import product_category
from . import product_product from . import product_product
from . import product_template from . import product_template

29
stock_last_purchase_price/models/product_category.py

@ -1,25 +1,24 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################### ################################################################################
# #
# Cybrosys Technologies Pvt. Ltd. # Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Fathima Mazlin AM(odoo@cybrosys.com)
# #
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # This program is free software: you can modify
# Author: Cybrosys Techno Solutions (<https://www.cybrosys.com>) # it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# #
# This program is under the terms of the Odoo Proprietary License v1.0 # This program is distributed in the hope that it will be useful,
# (OPL-1) # but WITHOUT ANY WARRANTY; without even the implied warranty of
# It is forbidden to publish, distribute, sublicense, or sell copies of the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# Software or modified copies of the Software. # GNU Affero General Public License for more details.
# #
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # You should have received a copy of the GNU Affero General Public License
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # along with this program. If not, see <https://www.gnu.org/licenses/>.
# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
# #
############################################################################### ################################################################################
from odoo import fields, models from odoo import fields, models

29
stock_last_purchase_price/models/product_product.py

@ -1,25 +1,24 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################### ################################################################################
# #
# Cybrosys Technologies Pvt. Ltd. # Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Fathima Mazlin AM(odoo@cybrosys.com)
# #
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # This program is free software: you can modify
# Author: Cybrosys Techno Solutions (<https://www.cybrosys.com>) # it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# #
# This program is under the terms of the Odoo Proprietary License v1.0 # This program is distributed in the hope that it will be useful,
# (OPL-1) # but WITHOUT ANY WARRANTY; without even the implied warranty of
# It is forbidden to publish, distribute, sublicense, or sell copies of the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# Software or modified copies of the Software. # GNU Affero General Public License for more details.
# #
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # You should have received a copy of the GNU Affero General Public License
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # along with this program. If not, see <https://www.gnu.org/licenses/>.
# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
# #
############################################################################### ################################################################################
from odoo import api, models, _ from odoo import api, models, _
from odoo.exceptions import UserError from odoo.exceptions import UserError
from odoo.tools import float_is_zero from odoo.tools import float_is_zero

29
stock_last_purchase_price/models/product_template.py

@ -1,25 +1,24 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################### ################################################################################
# #
# Cybrosys Technologies Pvt. Ltd. # Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Fathima Mazlin AM(odoo@cybrosys.com)
# #
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # This program is free software: you can modify
# Author: Cybrosys Techno Solutions (<https://www.cybrosys.com>) # it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# #
# This program is under the terms of the Odoo Proprietary License v1.0 # This program is distributed in the hope that it will be useful,
# (OPL-1) # but WITHOUT ANY WARRANTY; without even the implied warranty of
# It is forbidden to publish, distribute, sublicense, or sell copies of the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# Software or modified copies of the Software. # GNU Affero General Public License for more details.
# #
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # You should have received a copy of the GNU Affero General Public License
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # along with this program. If not, see <https://www.gnu.org/licenses/>.
# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
# #
############################################################################### ################################################################################
from odoo import fields, models from odoo import fields, models

29
stock_last_purchase_price/models/stock_move.py

@ -1,25 +1,24 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################### ################################################################################
# #
# Cybrosys Technologies Pvt. Ltd. # Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Fathima Mazlin AM(odoo@cybrosys.com)
# #
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # This program is free software: you can modify
# Author: Cybrosys Techno Solutions (<https://www.cybrosys.com>) # it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# #
# This program is under the terms of the Odoo Proprietary License v1.0 # This program is distributed in the hope that it will be useful,
# (OPL-1) # but WITHOUT ANY WARRANTY; without even the implied warranty of
# It is forbidden to publish, distribute, sublicense, or sell copies of the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# Software or modified copies of the Software. # GNU Affero General Public License for more details.
# #
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # You should have received a copy of the GNU Affero General Public License
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # along with this program. If not, see <https://www.gnu.org/licenses/>.
# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
# #
############################################################################### ################################################################################
from collections import defaultdict from collections import defaultdict
from odoo import models, _ from odoo import models, _
from odoo.exceptions import UserError from odoo.exceptions import UserError

29
stock_last_purchase_price/models/stock_move_line.py

@ -1,25 +1,24 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################### ################################################################################
# #
# Cybrosys Technologies Pvt. Ltd. # Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Fathima Mazlin AM(odoo@cybrosys.com)
# #
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # This program is free software: you can modify
# Author: Cybrosys Techno Solutions (<https://www.cybrosys.com>) # it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# #
# This program is under the terms of the Odoo Proprietary License v1.0 # This program is distributed in the hope that it will be useful,
# (OPL-1) # but WITHOUT ANY WARRANTY; without even the implied warranty of
# It is forbidden to publish, distribute, sublicense, or sell copies of the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# Software or modified copies of the Software. # GNU Affero General Public License for more details.
# #
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # You should have received a copy of the GNU Affero General Public License
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # along with this program. If not, see <https://www.gnu.org/licenses/>.
# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
# #
############################################################################### ################################################################################
from odoo import models from odoo import models

4
stock_last_purchase_price/static/description/index.html

@ -29,6 +29,10 @@
style="width:auto !important; height:40px !important"> style="width:auto !important; height:40px !important">
</div> </div>
<div class="my-3 d-flex align-items-center"> <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" <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;"> 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 Enterprise

Loading…
Cancel
Save