diff --git a/stock_last_purchase_price/README.rst b/stock_last_purchase_price/README.rst new file mode 100644 index 000000000..26b591099 --- /dev/null +++ b/stock_last_purchase_price/README.rst @@ -0,0 +1,51 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Costing Method: Last Purchase Price +=================================== +This module introduces a new costing method to Odoo. That will update a product's cost price when a new purchase +happens with the purchasing rate. if you enables automatic stock valuation and provided a price difference account, +this module will generate stock journal entry to update the stock value according to the price change. + +Configuration +============= +- www.odoo.com/documentation/17.0/setup/install.html +- Install our custom addon + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developers: (V16) Sruthi Renjith, + (V17) Fathima Mazlin AM, +Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +License +------- +GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/stock_last_purchase_price/__init__.py b/stock_last_purchase_price/__init__.py new file mode 100644 index 000000000..3f54a1ccd --- /dev/null +++ b/stock_last_purchase_price/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Fathima Mazlin AM (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import models + diff --git a/stock_last_purchase_price/__manifest__.py b/stock_last_purchase_price/__manifest__.py new file mode 100644 index 000000000..cc91eb02e --- /dev/null +++ b/stock_last_purchase_price/__manifest__.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Fathima Mazlin AM (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +{ + 'name': 'Costing Method: Last Purchase Price', + 'version': '17.0.1.0.0', + 'category': 'Warehouse', + 'summary': "Introducing new costing method in Odoo 'last purchase price'", + 'description': """Introducing new costing method in Odoo + 'last purchase price'.The cost of the product changed based on the last + purchase order.""", + 'author': 'Cybrosys Techno solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.openhrms.com', + 'depends': ['stock_account', 'purchase', 'account_accountant'], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/stock_last_purchase_price/doc/RELEASE_NOTES.md b/stock_last_purchase_price/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..85278f253 --- /dev/null +++ b/stock_last_purchase_price/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 14.02.2024 +#### Version 17.0.1.0.0 +#### ADD +- Initial commit for Costing Method: Last Purchase Price diff --git a/stock_last_purchase_price/models/__init__.py b/stock_last_purchase_price/models/__init__.py new file mode 100644 index 000000000..18b925cbd --- /dev/null +++ b/stock_last_purchase_price/models/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Fathima Mazlin AM (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import product_category +from . import product_product +from . import product_template +from . import stock_move +from . import stock_move_line diff --git a/stock_last_purchase_price/models/product_category.py b/stock_last_purchase_price/models/product_category.py new file mode 100644 index 000000000..c335459a8 --- /dev/null +++ b/stock_last_purchase_price/models/product_category.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Fathima Mazlin AM (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import fields, models + + +class ProductCategory(models.Model): + """ Class to inherit product_category to add costing method """ + _inherit = "product.category" + + property_cost_method = fields.Selection([ + ('standard', 'Standard Price'), + ('last', 'Last Purchase Price'), + ('fifo', 'First In First Out (FIFO)'), + ('average', 'Average Cost (AVCO)')], string='Costing Method', + company_dependent=True, copy=True, + help="""Standard Price: The products are valued at their standard cost + defined on the product. Average Cost (AVCO): The products are + valued at weighted average cost. First In First Out (FIFO): The + products are valued supposing those that enter the company first + will also leave it first. Last Purchase Price: The products are + valued same as 'Standard Price' Method, But standard price defined + on the product will updated automatically with last purchase + price.""") diff --git a/stock_last_purchase_price/models/product_product.py b/stock_last_purchase_price/models/product_product.py new file mode 100644 index 000000000..92f104d70 --- /dev/null +++ b/stock_last_purchase_price/models/product_product.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Fathima Mazlin(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import api, models, _ +from odoo.exceptions import UserError +from odoo.tools import float_is_zero + + +class ProductProduct(models.Model): + """ Class to inherit product_product to add some functionalities """ + _inherit = 'product.product' + + def create_price_change_account_move(self, new_price, account_id, + company_id, origin): + """ Function to compute and updated the change in price """ + account_move = self.env['account.move'] + product_accounts = { + product.id: product.product_tmpl_id.get_product_accounts() for + product in self} + for product in self.with_context().filtered( + lambda r: r.valuation == 'real_time'): + diff = product.standard_price - new_price + if not float_is_zero( + diff, precision_rounding=product.currency_id.rounding): + if not product_accounts[product.id].get('stock_valuation', + False): + raise UserError( + _('You don\'t have any stock valuation account ' + 'defined on your product category. You must define ' + 'one before processing this operation.')) + qty_available = product.qty_available + if qty_available: + # Accounting Entries + if diff * qty_available > 0: + debit_account_id = account_id + credit_account_id = product_accounts[product.id][ + 'stock_valuation'].id + else: + debit_account_id = product_accounts[product.id][ + 'stock_valuation'].id + credit_account_id = account_id + move_vals = { + 'journal_id': product_accounts[product.id][ + 'stock_journal'].id, + 'company_id': company_id, + 'ref': product.default_code, + 'line_ids': [(0, 0, { + 'name': _('%s changed cost from %s to %s - %s') % ( + origin, product.standard_price, new_price, + product.display_name), + 'account_id': debit_account_id, + 'debit': abs(diff * qty_available), + 'credit': 0, + 'product_id': product.id, + }), (0, 0, { + 'name': _('%s changed cost from %s to %s - %s') % ( + origin, product.standard_price, new_price, + product.display_name), + 'account_id': credit_account_id, + 'debit': 0, + 'credit': abs(diff * qty_available), + 'product_id': product.id, + })], + } + move = account_move.create(move_vals) + move.action_post() + return True + + @api.depends('stock_move_ids.product_qty', 'stock_move_ids.state', + 'stock_move_ids.remaining_value', + 'product_tmpl_id.cost_method', + 'product_tmpl_id.standard_price', + 'product_tmpl_id.property_valuation', + 'product_tmpl_id.categ_id.property_valuation') + def _compute_stock_value(self): + """ Function to compute the stock moves and update the values """ + stock_move = self.env['stock.move'] + to_date = self.env.context.get('to_date') + self.env['account.move.line'].check_access_rights('read') + fifo_automated_values = {} + query = """SELECT aml.product_id, aml.account_id, + sum(aml.debit) - sum(aml.credit), sum(quantity), + array_agg(aml.id) FROM account_move_line AS aml + WHERE aml.product_id IS NOT NULL AND aml.company_id=%%s %s + GROUP BY aml.product_id, aml.account_id""" + params = (self.env.user.company_id.id,) + if to_date: + query = query % ('AND aml.date <= %s',) + params = params + (to_date,) + else: + query = query % ('',) + self.env.cr.execute(query, params=params) + res = self.env.cr.fetchall() + for row in res: + fifo_automated_values[(row[0], row[1])] = ( + row[2], row[3], list(row[4])) + for product in self: + if product.cost_method in ['standard', 'average', 'last']: + qty_available = product.with_context( + company_owned=True, owner_id=False).qty_available + price_used = product.standard_price + if to_date: + price_used = product.get_history_price( + self.env.user.company_id.id, date=to_date) + product.stock_value = price_used * qty_available + product.qty_at_date = qty_available + elif product.cost_method == 'fifo': + if to_date: + if product.product_tmpl_id.valuation == 'manual_periodic': + domain = [('product_id', '=', product.id), + ('date', '<=', + to_date)] + stock_move._get_all_base_domain() + moves = stock_move.search(domain) + product.stock_value = sum(moves.mapped('value')) + product.qty_at_date = product.with_context( + company_owned=True, owner_id=False).qty_available + product.stock_fifo_manual_move_ids = stock_move.browse( + moves.ids) + elif product.product_tmpl_id.valuation == 'real_time': + valuation_account_id = product.categ_id.property_stock_valuation_account_id.id + value, quantity, aml_ids = fifo_automated_values.get( + (product.id, valuation_account_id)) or ( + 0, 0, []) + product.stock_value = value + product.qty_at_date = quantity + product.stock_fifo_real_time_aml_ids = self.env[ + 'account.move.line'].browse(aml_ids) + else: + product.stock_value, moves = product._sum_remaining_values() + product.qty_at_date = product.with_context( + company_owned=True, owner_id=False).qty_available + if product.product_tmpl_id.valuation == 'manual_periodic': + product.stock_fifo_manual_move_ids = moves + elif product.product_tmpl_id.valuation == 'real_time': + valuation_account_id = product.categ_id.property_stock_valuation_account_id.id + value, quantity, aml_ids = fifo_automated_values.get( + (product.id, valuation_account_id)) or ( + 0, 0, []) + product.stock_fifo_real_time_aml_ids = self.env[ + 'account.move.line'].browse(aml_ids) diff --git a/stock_last_purchase_price/models/product_template.py b/stock_last_purchase_price/models/product_template.py new file mode 100644 index 000000000..1cde4f619 --- /dev/null +++ b/stock_last_purchase_price/models/product_template.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Fathima Mazlin AM (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import fields, models + + +class ProductTemplate(models.Model): + """ Class to inherit product.template to add costing method """ + _inherit = 'product.template' + + property_cost_method = fields.Selection([ + ('standard', 'Standard Price'), + ('last', 'Last Purchase Price'), + ('fifo', 'First In First Out (FIFO)'), + ('average', 'Average Cost (AVCO)')], string='Costing Method', + company_dependent=True, copy=True, + help="""Standard Price: The products are valued + at their standard cost defined on the product. + Average Cost (AVCO): The products are valued at weighted average cost. + First In First Out (FIFO): The products are valued supposing + those that enter the company first will also leave it first. + Last Purchase Price: The products are valued same as 'Standard + Price' Method, But standard price defined on the product will + be updated automatically with last purchase price.""") + + def _set_cost_method(self): + """ When going from FIFO to AVCO or to standard, we update the standard + price with the average value in stock """ + if (self.property_cost_method == 'fifo' and + self.cost_method in ['average', 'standard', 'last']): + # Cannot use the `stock_value` computed field as it's already + # invalidated when entering this method. + valuation = sum([variant._sum_remaining_values()[0] for variant in + self.product_variant_ids]) + qty_available = self.with_context(company_owned=True).qty_available + if qty_available: + self.standard_price = valuation / qty_available + return self.write({'property_cost_method': self.cost_method}) diff --git a/stock_last_purchase_price/models/stock_move.py b/stock_last_purchase_price/models/stock_move.py new file mode 100644 index 000000000..8fdbd763b --- /dev/null +++ b/stock_last_purchase_price/models/stock_move.py @@ -0,0 +1,91 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Fathima Mazlin AM (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from collections import defaultdict +from odoo import models, _ +from odoo.exceptions import UserError +from odoo.tools import float_is_zero + + +class StockMove(models.Model): + """ Class to inherit stock_move to update the product price """ + _inherit = "stock.move" + + def product_price_update_before_done(self, forced_qty=None): + """ Function to update the price of the product """ + tmpl_dict = defaultdict(lambda: 0.0) + # Adapt standard price on incoming moves if the product cost_method + # is 'average' + std_price_update = {} + for move in self.filtered(lambda move: move.location_id.usage in ( + 'supplier', 'production') and move.product_id.cost_method in ( + 'average', 'last')): + product_tot_qty_available = move.product_id.qty_available + \ + tmpl_dict[move.product_id.id] + rounding = move.product_id.uom_id.rounding + qty_done = 0.0 + if float_is_zero(product_tot_qty_available, + precision_rounding=rounding): + new_std_price = move._get_price_unit() + elif float_is_zero(product_tot_qty_available + move.product_qty, + precision_rounding=rounding) or \ + float_is_zero(product_tot_qty_available + qty_done, + precision_rounding=rounding): + new_std_price = move._get_price_unit() + else: + # Get the standard price + if move.product_id.cost_method == 'average': + amount_unit = std_price_update.get( + (move.company_id.id, + move.product_id.id)) or move.product_id.standard_price + qty_done = move.product_uom._compute_quantity( + move.quantity_done, move.product_id.uom_id) + qty = forced_qty or qty_done + new_std_price = ((amount_unit * product_tot_qty_available) + + (move._get_price_unit() * qty)) / ( + product_tot_qty_available + + qty_done) + if (move.product_id.cost_method == 'last' and + move.product_id.valuation == 'real_time' or + move.product_id.valuation == 'manual_periodic'): + new_std_price = move._get_price_unit() + products = self.env['product.product'].browse( + move.product_id.id) + account_id = ( + products.property_account_creditor_price_difference.id + or products.categ_id.property_account_creditor_price_difference_categ.id) + if not account_id: + raise UserError( + _('Configuration error. Please configure the price ' + 'difference account on the product or its category ' + 'to process this operation.')) + products.create_price_change_account_move(new_std_price, + account_id, + move.company_id.id, + move.origin) + tmpl_dict[move.product_id.id] += qty_done + # Write the standard price, as SUPERUSER_ID because a warehouse + # manager may not have the right to write on products + move.product_id.with_context( + force_company=move.company_id.id).sudo().write( + {'standard_price': new_std_price}) + std_price_update[ + move.company_id.id, move.product_id.id] = new_std_price diff --git a/stock_last_purchase_price/models/stock_move_line.py b/stock_last_purchase_price/models/stock_move_line.py new file mode 100644 index 000000000..bfb821f60 --- /dev/null +++ b/stock_last_purchase_price/models/stock_move_line.py @@ -0,0 +1,100 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Fathima Mazlin AM (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import models + + +class StockMoveLine(models.Model): + """ Class to inherit the model stock.move.line to override the create + function """ + _inherit = 'stock.move.line' + + def write(self, vals): + """ When editing a done stock.move.line, we impact the valuation. + Users may increase or decrease the `qty_done` field. There are three + cost method available: standard, average and fifo. We implement the + logic in a similar way for standard and average: increase or decrease + the original value with the standard or average price of today. In + fifo, we have a different logic whether the move is incoming or + outgoing. If the move is incoming, we update the value and + remaining_value/qty with the unit price of the move. If the move is + outgoing and the user increases qty_done, we call _run_fifo, and it'll + consume layer(s) in the stack the same way a new outgoing move would + have done. If the move is outgoing and the user decreases qty_done, we + either increase the last receipt candidate if one is found or we + decrease the value with the last fifo price. + """ + if 'qty_done' in vals: + moves_to_update = {} + for move_line in self.filtered( + lambda ml: ml.state == 'done' and ( + ml.move_id._is_in() or ml.move_id._is_out())): + moves_to_update[move_line.move_id] = ( + vals['qty_done'] - move_line.qty_done) + for move_id, qty_difference in moves_to_update.items(): + move_vals = {} + if move_id.product_id.cost_method in ['standard', 'average', + 'last']: + correction_value = (qty_difference * + move_id.product_id.standard_price) + if move_id._is_in(): + move_vals['value'] = move_id.value + correction_value + elif move_id._is_out(): + move_vals['value'] = move_id.value - correction_value + else: + if move_id._is_in(): + correction_value = qty_difference * move_id.price_unit + move_vals['value'] = move_id.value + correction_value + move_vals['remaining_qty'] = (move_id.remaining_qty + + qty_difference) + move_vals['remaining_value'] = (move_id.remaining_value + + correction_value) + elif move_id._is_out() and qty_difference > 0: + correction_value = self.env['stock.move']._run_fifo( + move_id, quantity=qty_difference) + # No need to adapt `remaining_qty` and + # `remaining_value` as `_run_fifo` took care of it + move_vals['value'] = move_id.value - correction_value + elif move_id._is_out() and qty_difference < 0: + candidates_receipt = self.env['stock.move'].search( + move_id._get_in_domain(), order='date, id desc', + limit=1) + if candidates_receipt: + candidates_receipt.write({ + 'remaining_qty': candidates_receipt.remaining_qty + -qty_difference, + 'remaining_value': candidates_receipt.remaining_value + ( + -qty_difference * candidates_receipt.price_unit), + }) + correction_value = (qty_difference * + candidates_receipt.price_unit) + else: + correction_value = (qty_difference * + move_id.product_id.standard_price) + move_vals['value'] = move_id.value - correction_value + move_id.write(move_vals) + if move_id.product_id.valuation == 'real_time': + move_id.with_context( + force_valuation_amount=correction_value, + forced_quantity=qty_difference)._account_entry_move() + if qty_difference > 0: + move_id.product_price_update_before_done( + forced_qty=qty_difference) + return super(StockMoveLine, self).write(vals) diff --git a/stock_last_purchase_price/static/description/assets/icons/check.png b/stock_last_purchase_price/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/icons/check.png differ diff --git a/stock_last_purchase_price/static/description/assets/icons/chevron.png b/stock_last_purchase_price/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/icons/chevron.png differ diff --git a/stock_last_purchase_price/static/description/assets/icons/cogs.png b/stock_last_purchase_price/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/icons/cogs.png differ diff --git a/stock_last_purchase_price/static/description/assets/icons/consultation.png b/stock_last_purchase_price/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/icons/consultation.png differ diff --git a/stock_last_purchase_price/static/description/assets/icons/ecom-black.png b/stock_last_purchase_price/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/icons/ecom-black.png differ diff --git a/stock_last_purchase_price/static/description/assets/icons/education-black.png b/stock_last_purchase_price/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/icons/education-black.png differ diff --git a/stock_last_purchase_price/static/description/assets/icons/hotel-black.png b/stock_last_purchase_price/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/icons/hotel-black.png differ diff --git a/stock_last_purchase_price/static/description/assets/icons/license.png b/stock_last_purchase_price/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/icons/license.png differ diff --git a/stock_last_purchase_price/static/description/assets/icons/lifebuoy.png b/stock_last_purchase_price/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/icons/lifebuoy.png differ diff --git a/stock_last_purchase_price/static/description/assets/icons/manufacturing-black.png b/stock_last_purchase_price/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/icons/manufacturing-black.png differ diff --git a/stock_last_purchase_price/static/description/assets/icons/pos-black.png b/stock_last_purchase_price/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/icons/pos-black.png differ diff --git a/stock_last_purchase_price/static/description/assets/icons/puzzle.png b/stock_last_purchase_price/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/icons/puzzle.png differ diff --git a/stock_last_purchase_price/static/description/assets/icons/restaurant-black.png b/stock_last_purchase_price/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/icons/restaurant-black.png differ diff --git a/stock_last_purchase_price/static/description/assets/icons/service-black.png b/stock_last_purchase_price/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/icons/service-black.png differ diff --git a/stock_last_purchase_price/static/description/assets/icons/trading-black.png b/stock_last_purchase_price/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/icons/trading-black.png differ diff --git a/stock_last_purchase_price/static/description/assets/icons/training.png b/stock_last_purchase_price/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/icons/training.png differ diff --git a/stock_last_purchase_price/static/description/assets/icons/update.png b/stock_last_purchase_price/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/icons/update.png differ diff --git a/stock_last_purchase_price/static/description/assets/icons/user.png b/stock_last_purchase_price/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/icons/user.png differ diff --git a/stock_last_purchase_price/static/description/assets/icons/wrench.png b/stock_last_purchase_price/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/icons/wrench.png differ diff --git a/stock_last_purchase_price/static/description/assets/misc/categories.png b/stock_last_purchase_price/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/misc/categories.png differ diff --git a/stock_last_purchase_price/static/description/assets/misc/check-box.png b/stock_last_purchase_price/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/misc/check-box.png differ diff --git a/stock_last_purchase_price/static/description/assets/misc/compass.png b/stock_last_purchase_price/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/misc/compass.png differ diff --git a/stock_last_purchase_price/static/description/assets/misc/corporate.png b/stock_last_purchase_price/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/misc/corporate.png differ diff --git a/stock_last_purchase_price/static/description/assets/misc/customer-support.png b/stock_last_purchase_price/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/misc/customer-support.png differ diff --git a/stock_last_purchase_price/static/description/assets/misc/cybrosys-logo.png b/stock_last_purchase_price/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/misc/cybrosys-logo.png differ diff --git a/stock_last_purchase_price/static/description/assets/misc/features.png b/stock_last_purchase_price/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/misc/features.png differ diff --git a/stock_last_purchase_price/static/description/assets/misc/logo.png b/stock_last_purchase_price/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/misc/logo.png differ diff --git a/stock_last_purchase_price/static/description/assets/misc/pictures.png b/stock_last_purchase_price/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/misc/pictures.png differ diff --git a/stock_last_purchase_price/static/description/assets/misc/pie-chart.png b/stock_last_purchase_price/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/misc/pie-chart.png differ diff --git a/stock_last_purchase_price/static/description/assets/misc/right-arrow.png b/stock_last_purchase_price/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/misc/right-arrow.png differ diff --git a/stock_last_purchase_price/static/description/assets/misc/star.png b/stock_last_purchase_price/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/misc/star.png differ diff --git a/stock_last_purchase_price/static/description/assets/misc/support.png b/stock_last_purchase_price/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/misc/support.png differ diff --git a/stock_last_purchase_price/static/description/assets/misc/whatsapp.png b/stock_last_purchase_price/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/misc/whatsapp.png differ diff --git a/stock_last_purchase_price/static/description/assets/modules/1.png b/stock_last_purchase_price/static/description/assets/modules/1.png new file mode 100644 index 000000000..0e311ca87 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/modules/1.png differ diff --git a/stock_last_purchase_price/static/description/assets/modules/2.png b/stock_last_purchase_price/static/description/assets/modules/2.png new file mode 100644 index 000000000..a0ac2d840 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/modules/2.png differ diff --git a/stock_last_purchase_price/static/description/assets/modules/3.png b/stock_last_purchase_price/static/description/assets/modules/3.png new file mode 100644 index 000000000..cb17cf612 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/modules/3.png differ diff --git a/stock_last_purchase_price/static/description/assets/modules/4.jpg b/stock_last_purchase_price/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/modules/4.jpg differ diff --git a/stock_last_purchase_price/static/description/assets/modules/5.png b/stock_last_purchase_price/static/description/assets/modules/5.png new file mode 100644 index 000000000..8513873ea Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/modules/5.png differ diff --git a/stock_last_purchase_price/static/description/assets/modules/6.jpg b/stock_last_purchase_price/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..73781cf50 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/modules/6.jpg differ diff --git a/stock_last_purchase_price/static/description/assets/screenshots/1.png b/stock_last_purchase_price/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..cfca8b226 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/screenshots/1.png differ diff --git a/stock_last_purchase_price/static/description/assets/screenshots/2.png b/stock_last_purchase_price/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..81454fe38 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/screenshots/2.png differ diff --git a/stock_last_purchase_price/static/description/assets/screenshots/3.png b/stock_last_purchase_price/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..2509d5164 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/screenshots/3.png differ diff --git a/stock_last_purchase_price/static/description/assets/screenshots/4.png b/stock_last_purchase_price/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..4cf9ec150 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/screenshots/4.png differ diff --git a/stock_last_purchase_price/static/description/assets/screenshots/5.png b/stock_last_purchase_price/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..cc95e051d Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/screenshots/5.png differ diff --git a/stock_last_purchase_price/static/description/assets/screenshots/hero.gif b/stock_last_purchase_price/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..5e82851bf Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/screenshots/hero.gif differ diff --git a/stock_last_purchase_price/static/description/banner.jpg b/stock_last_purchase_price/static/description/banner.jpg new file mode 100644 index 000000000..ec81e6ad2 Binary files /dev/null and b/stock_last_purchase_price/static/description/banner.jpg differ diff --git a/stock_last_purchase_price/static/description/icon.png b/stock_last_purchase_price/static/description/icon.png new file mode 100644 index 000000000..fa2d0a431 Binary files /dev/null and b/stock_last_purchase_price/static/description/icon.png differ diff --git a/stock_last_purchase_price/static/description/index.html b/stock_last_purchase_price/static/description/index.html new file mode 100644 index 000000000..de97aec9b --- /dev/null +++ b/stock_last_purchase_price/static/description/index.html @@ -0,0 +1,740 @@ + + + + + + + Costing Method: Last Purchase Price + + + + + + + + +
+
+
+
+
+ +
+
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Costing Method: Last Purchase Price

+

Introducing New Costing Method 'Last Purchase Price' in Odoo. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ This module allows you to update your product's cost as your last purchase price and changes the stock + valuation based on that.

+
+
+
+
+
+
+ +
+
+

+ A new costing method is added to the list and can be chosen from product category form.

+
+
+
+
+
+
+ +
+
+

+ Cost price of products will be updated with their last purchase price.

+
+
+
+
+
+
+ +
+
+

+ Takes last purchase price in stock valuation report.

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

+ Product form showing the cost.

+
+
+
+
+
+
+ +
+
+

+ Product category form showing the costing method and price difference account.

+
+
+
+
+
+
+ +
+
+

+ Purchase order created with new cost.

+
+
+
+
+
+
+ +
+
+

+ Cost updated in the product form with the new cost.

+
+
+
+
+
+
+ +
+
+

+ Journal item generated by the price change.

+
+
+
+
+
+
+
    +
  • + A new costing method is added to the list and can be chosen from product category form. +
  • +
  • + Cost price of products will be updated with their last purchase price. +
  • +
  • + Takes last purchase price in stock valuation report. +
  • +
  • + + Automatically posting price difference related accounting entries to the 'Price Difference Account' + when we use automated inventory valuation. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:17 January 2024 +
+

+ Initial commit for All In One Hide Print + Button

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Licensing Consultancy

+
+
+
+
+
+
+

+ Our Industries

+ +
+
+
+
+
+
+ +

Trading

+

Easily procure and sell your products

+
+
+
+
+ +

POS

+

Easy configuration and convivial experience

+
+
+
+
+ +

+ Education

+

A platform for educational management

+
+
+
+
+ +

+ Manufacturing

+

Plan, track and schedule your operations

+
+
+
+
+ +

E-commerce + & Website

+

Mobile friendly, awe-inspiring product pages

+
+
+
+
+ +

Service + Management

+

Keep track of services and invoice

+
+
+
+
+ +

+ Restaurant

+

Run your bar or restaurant methodically

+
+
+
+
+ +

Hotel + Management

+

An all-inclusive hotel management application

+
+
+
+
+
+
+

+ Support

+
+
+
+
+
+
+
+ +
+ Need + Help? +

Got + questions or need help? Get in touch.

+
odoo@cybrosys.com +
+
+
+
+
+
+
+
+ +
+ WhatsApp +

Say hi to + us on WhatsApp!

+
+91 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + +