[14.0][MIG] stock_request_kanban: Migration to 14.0

This commit is contained in:
Bernat Puig Font
2022-01-12 16:35:45 +01:00
parent 4603326c43
commit 6742d5f1e6
10 changed files with 44 additions and 40 deletions

View File

@@ -3,7 +3,7 @@
{ {
"name": "Stock Request kanban", "name": "Stock Request kanban",
"version": "13.0.1.0.1", "version": "14.0.1.0.0",
"category": "Warehouse Management", "category": "Warehouse Management",
"website": "https://github.com/OCA/stock-logistics-warehouse", "website": "https://github.com/OCA/stock-logistics-warehouse",
"author": "Creu Blanca, ForgeFlow, Odoo Community Association (OCA)", "author": "Creu Blanca, ForgeFlow, Odoo Community Association (OCA)",

View File

@@ -1,4 +1,4 @@
On most companies there is products that must be purchased often but cannot be On most companies there are products that must be purchased often but cannot be
stored as a usual product because no consumption moves are made. stored as a usual product because no consumption moves are made.
Usually, they are stored as consumables or putaway rules are defined. Usually, they are stored as consumables or putaway rules are defined.
In both cases, reordering rules cannot be used. In both cases, reordering rules cannot be used.

View File

@@ -90,14 +90,14 @@
</t> </t>
</t> </t>
</template> </template>
<report <record id="action_report_kanban" model="ir.actions.report">
id="action_report_kanban" <field name="name">Print kanban</field>
string="Print kanban" <field name="model">stock.request.kanban</field>
model="stock.request.kanban" <field name="report_type">qweb-pdf</field>
report_type="qweb-pdf" <field name="report_name">stock_request_kanban.report_kanban_label</field>
name="stock_request_kanban.report_kanban_label" <field name="report_file">stock_request_kanban.report_kanban_label</field>
file="stock_request_kanban.report_kanban_label" <field name="paperformat_id" ref="stock_request_kanban.kanban_paper_format" />
paperformat="stock_request_kanban.kanban_paper_format" <field name="binding_model_id" ref="model_stock_request_kanban" />
menu="True" <field name="binding_type">report</field>
/> </record>
</odoo> </odoo>

View File

@@ -3,3 +3,9 @@ access_stock_request_kanban_user,stock request kanban user,model_stock_request_k
access_stock_request_kanban_manager,stock request kanban manager,model_stock_request_kanban,stock_request.group_stock_request_manager,1,1,1,1 access_stock_request_kanban_manager,stock request kanban manager,model_stock_request_kanban,stock_request.group_stock_request_manager,1,1,1,1
access_stock_inventory_kanban_user,stock inventory kanban user,model_stock_inventory_kanban,stock_request.group_stock_request_user,1,1,1, access_stock_inventory_kanban_user,stock inventory kanban user,model_stock_inventory_kanban,stock_request.group_stock_request_user,1,1,1,
access_stock_inventory_kanban_manager,stock inventory kanban manager,model_stock_inventory_kanban,stock_request.group_stock_request_manager,1,1,1,1 access_stock_inventory_kanban_manager,stock inventory kanban manager,model_stock_inventory_kanban,stock_request.group_stock_request_manager,1,1,1,1
access_wizard_stock_request_kanban_user,wizard stock request kanban user,model_wizard_stock_request_kanban,stock_request.group_stock_request_user,1,1,1,
access_wizard_stock_request_kanban_manager,wizard stock request kanban manager,model_wizard_stock_request_kanban,stock_request.group_stock_request_manager,1,1,1,1
access_wizard_stock_inventory_kanban_user,wizard stock inventory kanban user,model_wizard_stock_inventory_kanban,stock_request.group_stock_request_user,1,1,1,
access_wizard_stock_inventory_kanban_manager,wizard stock inventory kanban manager,model_wizard_stock_inventory_kanban,stock_request.group_stock_request_manager,1,1,1,1
access_wizard_stock_request_order_kanban_user,wizard stock request order kanban user,model_wizard_stock_request_order_kanban,stock_request.group_stock_request_user,1,1,1,
access_wizard_stock_request_order_kanban_manager,wizard stock request order kanban manager,model_wizard_stock_request_order_kanban,stock_request.group_stock_request_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
3 access_stock_request_kanban_manager stock request kanban manager model_stock_request_kanban stock_request.group_stock_request_manager 1 1 1 1
4 access_stock_inventory_kanban_user stock inventory kanban user model_stock_inventory_kanban stock_request.group_stock_request_user 1 1 1
5 access_stock_inventory_kanban_manager stock inventory kanban manager model_stock_inventory_kanban stock_request.group_stock_request_manager 1 1 1 1
6 access_wizard_stock_request_kanban_user wizard stock request kanban user model_wizard_stock_request_kanban stock_request.group_stock_request_user 1 1 1
7 access_wizard_stock_request_kanban_manager wizard stock request kanban manager model_wizard_stock_request_kanban stock_request.group_stock_request_manager 1 1 1 1
8 access_wizard_stock_inventory_kanban_user wizard stock inventory kanban user model_wizard_stock_inventory_kanban stock_request.group_stock_request_user 1 1 1
9 access_wizard_stock_inventory_kanban_manager wizard stock inventory kanban manager model_wizard_stock_inventory_kanban stock_request.group_stock_request_manager 1 1 1 1
10 access_wizard_stock_request_order_kanban_user wizard stock request order kanban user model_wizard_stock_request_order_kanban stock_request.group_stock_request_user 1 1 1
11 access_wizard_stock_request_order_kanban_manager wizard stock request order kanban manager model_wizard_stock_request_order_kanban stock_request.group_stock_request_manager 1 1 1 1

View File

@@ -19,12 +19,13 @@ odoo.define("stock_request_kanban.StockRequestKanbanController", function (requi
/** /**
* @override * @override
*/ */
renderButtons: function ($node) {
renderButtons: function () {
this._super.apply(this, arguments); this._super.apply(this, arguments);
var $buttonScan = $(qweb.render("StockRequestKanban.Buttons")); var $buttonScan = $(qweb.render("StockRequestKanban.Buttons"));
$buttonScan.on("click", this._onOpenWizard.bind(this)); $buttonScan.on("click", this._onOpenWizard.bind(this));
$buttonScan.prependTo($node.find(".o_list_buttons")); this.$buttons.prepend($buttonScan);
}, },
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<templates id="template" xml:space="preserve"> <templates id="template" xml:space="preserve">
<button t-name="StockRequestKanban.Buttons" class="btn-primary btn" type="button"> <button t-name="StockRequestKanban.Buttons" class="btn-primary btn" type="button">
Scan Kanban Scan Kanban
</button> </button>
</templates> </templates>

View File

@@ -89,7 +89,7 @@ class TestKanban(TestBaseKanban):
kanban.product_uom_qty = 1 kanban.product_uom_qty = 1
kanban = kanban.create(kanban._convert_to_write(kanban._cache)) kanban = kanban.create(kanban._convert_to_write(kanban._cache))
self.assertTrue(kanban.company_id) self.assertTrue(kanban.company_id)
self.assertEqual(kanban.route_ids, self.route) self.assertIn(self.route, kanban.route_ids)
def test_order_barcodes(self): def test_order_barcodes(self):
kanban_1 = self.env["stock.request.kanban"].create( kanban_1 = self.env["stock.request.kanban"].create(

View File

@@ -45,12 +45,11 @@
</form> </form>
</field> </field>
</record> </record>
<act_window <record id="wizard_stock_inventory_kanban_action" model="ir.actions.act_window">
id="wizard_stock_inventory_kanban_action" <field name="name">Add Kanban</field>
name="Add Kanban" <field name="res_model">wizard.stock.inventory.kanban</field>
res_model="wizard.stock.inventory.kanban" <field name="view_mode">form</field>
view_mode="form" <field name="context">{'default_inventory_kanban_id': active_id}</field>
context="{'default_inventory_kanban_id': active_id}" <field name="target">new</field>
target="new" </record>
/>
</odoo> </odoo>

View File

@@ -45,11 +45,10 @@
</form> </form>
</field> </field>
</record> </record>
<act_window <record id="wizard_stock_request_kanban_action" model="ir.actions.act_window">
id="wizard_stock_request_kanban_action" <field name="name">Add Kanban</field>
name="Add Kanban" <field name="res_model">wizard.stock.request.kanban</field>
res_model="wizard.stock.request.kanban" <field name="view_mode">form</field>
view_mode="form" <field name="target">new</field>
target="new" </record>
/>
</odoo> </odoo>

View File

@@ -16,12 +16,11 @@
</field> </field>
</field> </field>
</record> </record>
<act_window <record id="wizard_stock_request_order_kanban_action" model="ir.actions.act_window">
id="wizard_stock_request_order_kanban_action" <field name="name">Add Kanban</field>
name="Add Kanban" <field name="res_model">wizard.stock.request.order.kanban</field>
res_model="wizard.stock.request.order.kanban" <field name="view_mode">form</field>
view_mode="form" <field name="context">{'default_order_id': active_id}</field>
context="{'default_order_id': active_id}" <field name="target">new</field>
target="new" </record>
/>
</odoo> </odoo>