Comments (1)
- Éste es el código que se llama para actualizar el precio del quant:
https://github.com/odoo/odoo/blob/8.0/addons/stock_account/stock_account.py#L77
A este mismo método lo llamo yo, por lo que cualquier cosa que haga éste o heredados, lo replico.- Este método actualiza el precio del producto:
https://github.com/odoo/odoo/blob/8.0/addons/stock_account/stock_account.py#L291
Que sólo actúa sobre el campo standard_price y cuando el método es precio medio- Y por último, éste es el que actualiza el precio del movimiento cuando el método es real:
https://github.com/odoo/odoo/blob/8.0/addons/stock_account/stock_account.py#L315Originally posted by @pedrobaeza in #410 (comment)
Hola, @pedrobaeza como te va?
Te escribo para ver si puedes colaborarme con una duda, tengo una gran inquietud con un desarrollo que estoy haciendo para Odoo 10 versión OCA, yo cree la siguiente clase rescribiendo un método para pasar por parametro el precio_unit en la sección Pedidos de Compra:
`class PurchaseOrderLine(models.Model):
_inherit = "purchase.order.line"
def _prepare_stock_moves(self, picking):
res = super(PurchaseOrderLine,self)._prepare_stock_moves(picking)
diccionary_add = {
'price_unit_without_costs': self.env['res.currency.rate']._currency_date_rate(self.order_id.date_order, self.order_id.currency_id, self.order_id.company_id.currency_id, self.price_unit, True),
}
res[0]['price_unit'] = self._landing_costs_price_unit_with_costs()
res[0].update(diccionary_add)
return res`
Reescribí la función original def _prepare_stock_moves(self, picking) y le paso el precio_unit, para cuando confirme el pedido, este se me refleje el precio nuevo que lo estoy generando con la funcion _landing_costs_price_unit_with_costs(), me lo muestra muy bien en la sección de Stock Move como te muestro a continuación:
El problema se refleja es cuando le doy a Validar, este pone el precio original y no el precio nuevo que estoy calculando.
Gracias por tu valioso tiempo,
from odoomrp-wip.
Related Issues (20)
- [V8] Product_Variant_Default_Code Can not Duplicate Product Template with variants
- ProgrammingError: can't adapt type 'stock.location' HOT 5
- [8.0 sale_order_taxes] sale order amount_tax field should be computed like taxes HOT 5
- [8.0-migrated][mrp_subcontracting] WH/IN created not received when MO is closed. Used with serial number
- Purchase_landed_cost ...update cost...price
- [9.0] migrating 'procurement_service' HOT 1
- Actualización de Precios Odoo 8 con Purchase cost Distribution
- Error de Real a Medio
- [8.0][purchase_landed_cost] Generate accounting entries on action_done HOT 3
- [8.0][mrp_final_product_lot]Possible bug when used with mrp_byproducts HOT 2
- [8.0][mrp_final_product_lot]When used with mrp_byproducts doesn't create subproducts lots. HOT 1
- field "Manufacturer", Machine" and "Operation" - Material" are not editable HOT 1
- [8] procurement plan mrp-wrong PO date generated by plan
- 11.0 branch HOT 5
- [Product variants no automatic creation] Product configurator HOT 1
- Error en stock_picking_taxes [Version 9.0] HOT 8
- [8] when run procurement plan, does not take into account the stocks before making procurement HOT 2
- psycopg2.ProgrammingError: can't adapt type 'event.model'
- Is this project closed? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from odoomrp-wip.