[12.0][MIG] stock_request_kanban

This commit is contained in:
Kitti U
2019-06-27 17:21:46 +07:00
committed by hveficent
parent 73f1ee0d4b
commit 7747600fc1
6 changed files with 13 additions and 11 deletions

View File

@@ -3,7 +3,7 @@
{
'name': 'Stock Request kanban',
'version': '11.0.1.2.0',
'version': '12.0.1.0.0',
'category': 'Reporting',
'website': 'https://github.com/OCA/stock-logistics-warehouse',
'author': 'Creu Blanca, Eficent, Odoo Community Association (OCA)',

View File

@@ -1 +1,2 @@
* Enric Tobella <etobella@creublanca.es>
* Kitti Upariphutthiphong <kittiu@ecosoft.co.th>

View File

@@ -12,7 +12,7 @@ class TestKanban(TestBaseKanban):
super().setUp()
self.main_company = self.env.ref('base.main_company')
self.warehouse = self.env.ref('stock.warehouse0')
self.categ_unit = self.env.ref('product.product_uom_categ_unit')
self.categ_unit = self.env.ref('uom.product_uom_categ_unit')
# common data
self.company_2 = self.env['res.company'].create({
@@ -42,19 +42,19 @@ class TestKanban(TestBaseKanban):
'route_ids': [(4, self.route.id)],
'company_id': False,
})
self.uom_dozen = self.env['product.uom'].create({
self.uom_dozen = self.env['uom.uom'].create({
'name': 'Test-DozenA',
'category_id': self.categ_unit.id,
'factor_inv': 12,
'uom_type': 'bigger',
'rounding': 0.001})
self.env['procurement.rule'].create({
self.env['stock.rule'].create({
'name': 'Transfer',
'route_id': self.route.id,
'location_src_id': self.ressuply_loc.id,
'location_id': self.warehouse.lot_stock_id.id,
'action': 'move',
'action': 'pull_push',
'picking_type_id': self.warehouse.int_type_id.id,
'procure_method': 'make_to_stock',
'warehouse_id': self.warehouse.id,

View File

@@ -50,7 +50,7 @@
/>
</div>
<div class="oe_title">
<label string="Inventory Kanban" />
<label for="name" string="Inventory Kanban" />
<h1>
<field name="name" readonly="1"/>
</h1>

View File

@@ -34,8 +34,8 @@
<field name="product_id"/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
<group expand="0" string="Group By">
<filter string="Warehouse" domain="[]" context="{'group_by':'warehouse_id'}"/>
<filter string="Location" domain="[]" context="{'group_by':'location_id'}"/>
<filter name="warehouse" string="Warehouse" domain="[]" context="{'group_by':'warehouse_id'}"/>
<filter name="location" string="Location" domain="[]" context="{'group_by':'location_id'}"/>
</group>
</search>
</field>
@@ -50,7 +50,7 @@
<sheet>
<div class="oe_button_box" name="button_box"/>
<div class="oe_title">
<label string="Stock Request Kanban" />
<label for="name" string="Stock Request Kanban" />
<h1>
<field name="name" readonly="1"/>
</h1>
@@ -109,7 +109,7 @@
<div class="oe_kanban_global_click o_res_partner_kanban">
<div class="o_kanban_image">
<img t-att-src="kanban_image('product.product', 'image_small', record.product_id.raw_value)"/>
<img t-att-src="kanban_image('product.product', 'image_small', record.product_id.raw_value)" alt="Kanban Image"/>
</div>
<div class="oe_kanban_details">
<strong class="o_kanban_record_title"><field name="display_name"/></strong>

View File

@@ -45,7 +45,8 @@ class WizardStockRequestOrderKanban(models.TransientModel):
def stock_request_kanban_values(self):
res = super().stock_request_kanban_values()
res['order_id'] = self.order_id.id,
res['expected_date'] = self.order_id.expected_date,
res['expected_date'] = \
fields.Datetime.to_string(self.order_id.expected_date),
return res
def stock_request_ending(self):