diff --git a/stock_last_purchase_price/README.rst b/stock_last_purchase_price/README.rst new file mode 100644 index 000000000..d3a3e9475 --- /dev/null +++ b/stock_last_purchase_price/README.rst @@ -0,0 +1,26 @@ +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. + +Installation +============ +- www.odoo.com/documentation/14.0/setup/install.html +- Install our custom addon + + +Bug Tracker +=========== +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Credits +======= +* Cybrosys Techno Solutions + +Author +------ +* Fasluca +* Sreenath +* Shijin diff --git a/stock_last_purchase_price/__init__.py b/stock_last_purchase_price/__init__.py new file mode 100644 index 000000000..ebbc8a50c --- /dev/null +++ b/stock_last_purchase_price/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Author: fasluca() +# +# This program is free software: you can modify +# 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 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# 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..6506d574f --- /dev/null +++ b/stock_last_purchase_price/__manifest__.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2018-TODAY Cybrosys Technologies(). +# Author: fasluca() +# +# This program is free software: you can modify +# 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 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +{ + 'name': 'Costing method: Last Purchase Price', + 'version': '14.0.1.0.1', + 'category': 'Inventory', + 'summary': "Introducing new costing method in Odoo 'last purchase price'", + 'author': 'Cybrosys Techno solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': 'https://www.openhrms.com', + 'description': """Introducing new costing method in Odoo 'last purchase price'""", + 'depends': ['stock', + 'stock_account', + 'purchase' + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'application': False, + 'installable': True, + 'auto_install': False, +} diff --git a/stock_last_purchase_price/models/__init__.py b/stock_last_purchase_price/models/__init__.py new file mode 100644 index 000000000..ade783c24 --- /dev/null +++ b/stock_last_purchase_price/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- +from . import stock +from . import product diff --git a/stock_last_purchase_price/models/product.py b/stock_last_purchase_price/models/product.py new file mode 100644 index 000000000..11fd510ee --- /dev/null +++ b/stock_last_purchase_price/models/product.py @@ -0,0 +1,156 @@ +# -*- coding: utf-8 -*- +from odoo import api, fields, models, _ +from odoo.exceptions import UserError +from odoo.tools import float_is_zero + + +class ProductCategory(models.Model): + _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.""") + + +class ProductTemplate(models.Model): + _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}) + + +class ProductProduct(models.Model): + _inherit = 'product.product' + + def create_price_change_account_move(self, new_price, account_id, company_id, origin): + """ + """ + AccountMove = 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 = AccountMove.create(move_vals) + move.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): + StockMove = 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)] + StockMove._get_all_base_domain() + moves = StockMove.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 = StockMove.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/stock.py b/stock_last_purchase_price/models/stock.py new file mode 100644 index 000000000..c0a2651e1 --- /dev/null +++ b/stock_last_purchase_price/models/stock.py @@ -0,0 +1,107 @@ +# -*- coding: utf-8 -*- +from collections import defaultdict + +from odoo import api, models +from odoo.exceptions import UserError +from odoo.tools import float_is_zero + + +class StockMove(models.Model): + _inherit = "stock.move" + + + def product_price_update_before_done(self, forced_qty=None): + tmpl_dict = defaultdict(lambda: 0.0) + # adapt standard price on incomming 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': + 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 + + +class StockMoveLine(models.Model): + _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 wheter 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 outoing 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 + new_remaining_value = move_id.remaining_value + correction_value + 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/logo.png b/stock_last_purchase_price/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/icons/logo.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/modules/approval_image.png b/stock_last_purchase_price/static/description/assets/modules/approval_image.png new file mode 100644 index 000000000..84fe94e80 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/modules/approval_image.png differ diff --git a/stock_last_purchase_price/static/description/assets/modules/budget_image.png b/stock_last_purchase_price/static/description/assets/modules/budget_image.png new file mode 100644 index 000000000..fe6aa6fe4 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/modules/budget_image.png differ diff --git a/stock_last_purchase_price/static/description/assets/modules/export_image.png b/stock_last_purchase_price/static/description/assets/modules/export_image.png new file mode 100644 index 000000000..4e4ea0e51 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/modules/export_image.png differ diff --git a/stock_last_purchase_price/static/description/assets/modules/magento_image.png b/stock_last_purchase_price/static/description/assets/modules/magento_image.png new file mode 100644 index 000000000..39de0820f Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/modules/magento_image.png differ diff --git a/stock_last_purchase_price/static/description/assets/modules/pos_image.png b/stock_last_purchase_price/static/description/assets/modules/pos_image.png new file mode 100644 index 000000000..c5932894b Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/modules/pos_image.png differ diff --git a/stock_last_purchase_price/static/description/assets/modules/shopify_image.png b/stock_last_purchase_price/static/description/assets/modules/shopify_image.png new file mode 100644 index 000000000..c6d92c16d Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/modules/shopify_image.png differ diff --git a/stock_last_purchase_price/static/description/assets/screenshots/costing-1.png b/stock_last_purchase_price/static/description/assets/screenshots/costing-1.png new file mode 100644 index 000000000..6f8f1bf75 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/screenshots/costing-1.png differ diff --git a/stock_last_purchase_price/static/description/assets/screenshots/costing-2.png b/stock_last_purchase_price/static/description/assets/screenshots/costing-2.png new file mode 100644 index 000000000..5e893a908 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/screenshots/costing-2.png differ diff --git a/stock_last_purchase_price/static/description/assets/screenshots/costing-3.png b/stock_last_purchase_price/static/description/assets/screenshots/costing-3.png new file mode 100644 index 000000000..2f65be489 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/screenshots/costing-3.png differ diff --git a/stock_last_purchase_price/static/description/assets/screenshots/costing-4.png b/stock_last_purchase_price/static/description/assets/screenshots/costing-4.png new file mode 100644 index 000000000..e90e77db6 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/screenshots/costing-4.png differ diff --git a/stock_last_purchase_price/static/description/assets/screenshots/costing-5.png b/stock_last_purchase_price/static/description/assets/screenshots/costing-5.png new file mode 100644 index 000000000..a8b7c27b3 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/screenshots/costing-5.png differ diff --git a/stock_last_purchase_price/static/description/assets/screenshots/hero.png b/stock_last_purchase_price/static/description/assets/screenshots/hero.png new file mode 100644 index 000000000..45ffb8a27 Binary files /dev/null and b/stock_last_purchase_price/static/description/assets/screenshots/hero.png differ diff --git a/stock_last_purchase_price/static/description/banner.png b/stock_last_purchase_price/static/description/banner.png new file mode 100644 index 000000000..8c4425bce Binary files /dev/null and b/stock_last_purchase_price/static/description/banner.png 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..ff5f14491 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..24b188dbd --- /dev/null +++ b/stock_last_purchase_price/static/description/index.html @@ -0,0 +1,649 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ +
+
+
+
+ +
+
+
+

+ Costing method: Last Purchase Price

+

+ Introducing new costing method 'Last Purchase Price' in Odoo +

+ +
+
+ + + + +
+
+

+ Overview +

+
+ +
+

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

+ +
+
+
+
+

+ Configuration +

+
+ +
+

+ After installing the module, Select the newly added costing method in product category. Provide 'Price + Difference Account' too if you are following automated inventory valuation.

+ +
+
+ + +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ New Costing Method

+

+ A New Costing Method Is Added To The List And Can Be Chosen From Product Category Form

+
+
+
+
+ +
+
+

+ Last Purchase Price

+

+ Cost Price Of Products Will Be Updated With Their Last Purchase Price

+
+
+ +
+
+ +
+
+

+ Stock Valuation Report

+

+ Takes Last Purchase Price In Stock Valuation Report

+
+
+ +
+
+ +
+
+

+ Price Difference Account

+

+ Automatically Posting Price Difference Related Accounting Entries To The 'Price Difference Account' + When We Use Automated Inventory Valuation

+
+
+ + +
+ +
+
+

+ Screenshots +

+
+
+

+ Product form

+ + +
+
+

+ Product category

+ + +
+
+

+ Purchase order created with new cost

+ + +
+
+

+ Cost updated in product form

+ + +
+ +
+

+ Journal Item generated by the price change

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

Suggested Products

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

Our Services

+
+
+ +
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ 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

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

Need Help?

+
+
+
+ + +
+ +
+ +
+ +
+ WhatsApp +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
\ No newline at end of file