mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[FIX] stock_secondary_unit: Fix key error in vals
This commit is contained in:
committed by
Rocío Vega
parent
ade4acc4d7
commit
4c84b5d72c
@@ -3,7 +3,7 @@
|
||||
{
|
||||
'name': 'Stock Secondary Unit',
|
||||
'summary': 'Get product quantities in a secondary unit',
|
||||
'version': '12.0.1.0.0',
|
||||
'version': '12.0.1.0.1',
|
||||
'development_status': 'Beta',
|
||||
'category': 'stock',
|
||||
'website': 'https://github.com/OCA/stock-logistics-warehouse',
|
||||
|
||||
@@ -35,7 +35,7 @@ class StockMoveLine(models.Model):
|
||||
|
||||
@api.model
|
||||
def create(self, vals):
|
||||
move = self.env['stock.move'].browse(vals['move_id'])
|
||||
move = self.env['stock.move'].browse(vals.get('move_id', False))
|
||||
if move.secondary_uom_id:
|
||||
uom = self.env['uom.uom'].browse(vals['product_uom_id'])
|
||||
factor = move.secondary_uom_id.factor * uom.factor
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
|
||||
<title>Stock Secondary Unit</title>
|
||||
<style type="text/css">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user