Skip to content

Commit

Permalink
Merge pull request #32 from adhoc-dev/9.0-mig-product_replenishment_cost
Browse files Browse the repository at this point in the history
migrate product_replenishment_cost to v9
  • Loading branch information
gurneyalex committed May 29, 2017
2 parents d84f2a9 + cfee842 commit 10322cf
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 20 deletions.
59 changes: 49 additions & 10 deletions product_replenishment_cost/README.rst
@@ -1,32 +1,71 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

==========================
Product Replenishment Cost
==========================

Provides an overridable method on product which compute the Replenishment cost
of a product. By default it just returns the value of "Cost price" field, but
using the product_cost_incl_bom module, it will return the costing from the
bom.
Provides an overridable method on product which compute the Replenishment cost of a product. By default it just returns the value of "Cost price" field, but using the product_cost_incl_bom module, it will return the costing from the bom.

As it is a generic module, you can also setup your own way of computing the replenishment_cost for your product.

All OCA modules to compute margins are based on it, so you'll be able to use them in your own way.


Installation
============

To install this module, you need to:

#. Just install module.

Configuration
=============

To configure this module, you need to:

As it is a generic module, you can also setup your own way of computing the
replenishment_cost for your product.
#. No configuration needed.

All OCA modules to compute margins are based on it, so you'll be able to use
them in your own way.
.. figure:: path/to/local/image.png
:alt: alternative description
:width: 600 px

Usage
=====

To use this module, you need to:

#. Go to ...

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/{repo_id}/{branch}

.. repo_id is available in https://github.com/OCA/maintainer-tools/blob/master/tools/repos_with_ids.txt
.. branch is "8.0" for example
Known issues / Roadmap
======================

* ...

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
Bugs are tracked on `GitHub Issues <https://github.com/OCA/margin-analysis/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
`here <https://github.com/OCA/margin-analysis/issues/new?body=module:%20product_replenishment_cost%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Credits
=======

Images
------

* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.

Contributors
------------

Expand Down
10 changes: 5 additions & 5 deletions product_replenishment_cost/__openerp__.py
Expand Up @@ -19,21 +19,21 @@
#
##############################################################################
{
'name': 'Replenishment cost',
'version': '8.0.2.0.0',
'name': 'Replenishment Cost',
'version': '9.0.1.0.0',
'author': "Camptocamp,GRAP,Odoo Community Association (OCA)",
'license': 'AGPL-3',
'category': 'Products',
'depends': [
'product',
],
'website': 'http://www.camptocamp.com/',
'data': [
'views/view.xml',
'views/product_view.xml',
'demo/res_groups.yml',
],
'test': [
'test/cost_price_update.yml',
],
'license': 'AGPL-3',
'installable': False,
'installable': True,
}
2 changes: 1 addition & 1 deletion product_replenishment_cost/models/product_product.py
Expand Up @@ -29,7 +29,7 @@ class ProductProduct(Model):
_inherit = 'product.product'

@api.one
@api.depends('product_tmpl_id.standard_price')
@api.depends('product_tmpl_id.standard_price', 'standard_price')
def _get_replenishment_cost(self):
self.replenishment_cost = self.standard_price

Expand Down
Expand Up @@ -5,11 +5,10 @@
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view" />
<field name="arch" type="xml">
<field name="standard_price" position="after">
<xpath expr='//div[@name="standard_price_uom"]' position="after">
<field name="replenishment_cost"/>
</field>
</xpath>
</field>
</record>

</data>
</openerp>
</openerp>

0 comments on commit 10322cf

Please sign in to comment.