[NEW] Addons creation - product_rental_bookings

This commit is contained in:
Stéphan Sainléger
2022-04-19 11:54:03 +02:00
parent 73749bcfb6
commit 8e2973526a
55 changed files with 10183 additions and 0 deletions

View File

@@ -0,0 +1,134 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="rental_product_operation_form_id" model="ir.ui.view">
<field name="name">Operation Type</field>
<field name="model">rental.product.operation</field>
<field name="arch" type="xml">
<form>
<sheet>
<div class="oe_title">
<label class="oe_edit_only" for="name" string="Operation Type Name" />
<h1>
<field name="name" />
</h1>
</div>
<group>
<group>
<field name="rental_move_type" />
<field name="location_id" />
</group>
<group>
<field name="source_location" />
<field name="destination_location" />
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="rental_product_type_kanban" model="ir.ui.view">
<field name="name">rental.product.operation.kanban</field>
<field name="model">rental.product.operation</field>
<field name="arch" type="xml">
<kanban class="oe_background_grey o_kanban_dashboard o_emphasize_colors o_stock_kanban" create="0">
<field name="color" />
<field name="rental_move_type" />
<field name="state" />
<field name="count_operation_ready" />
<field name="count_operation_on_rent" />
<field name="count_operation_service" />
<templates>
<t t-name="kanban-box">
<div t-attf-class="#{kanban_color(record.color.raw_value)}">
<div>
<div t-attf-class="o_kanban_card_header">
<div class="o_kanban_card_header_title">
<div class="o_primary">
<field name="name" />
</div>
<div class="o_secondary">
<field class="o_secondary" name="location_id" />
</div>
</div>
<div class="o_kanban_manage_button_section">
<a class="o_kanban_manage_toggle_button" href="#">
<i class="fa fa-ellipsis-v" role="img" aria-label="Manage" title="Manage" />
</a>
</div>
</div>
<div class="container o_kanban_card_content">
<div class="row">
<div class="col-xs-6 o_kanban_primary_left" style="margin-left: 16px;">
<button class="btn btn-primary" name="get_action_operation" type="object">
<span t-if="record.rental_move_type.raw_value =='outgoing'">
<t t-esc="record.count_operation_ready.value" />
Deliveries of Product
</span>
<span t-if="record.rental_move_type.raw_value =='incoming'">
<t t-esc="record.count_operation_on_rent.value" />
Incoming Products
</span>
<span t-if="record.rental_move_type.raw_value =='internal'">
<t t-esc="record.count_operation_service.value" />
Internal Moves
</span>
</button>
</div>
</div>
</div>
<div class="container o_kanban_card_manage_pane dropdown-menu" role="menu">
<div t-if="widget.editable" class="o_kanban_card_manage_settings row">
<div class="col-xs-8">
<ul class="oe_kanban_colorpicker" data-field="color" />
</div>
<div class="col-xs-4 text-right">
<a type="edit">Settings</a>
</div>
</div>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="rental_product_operation_tree_id" model="ir.ui.view">
<field name="name">Operation type</field>
<field name="model">rental.product.operation</field>
<field name="arch" type="xml">
<tree>
<field name="name" />
<field name="location_id" />
<field name="rental_move_type" />
</tree>
</field>
</record>
<record id="action_picking_type_list" model="ir.actions.act_window">
<field name="name">Operation Type</field>
<field name="res_model">rental.product.operation</field>
<field name="type">ir.actions.act_window</field>
<field name="view_mode">list,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">Click to define a new transfer.</p>
</field>
</record>
<record id="action_product_operation_type" model="ir.actions.act_window">
<field name="name">Operation Type</field>
<field name="res_model">rental.product.operation</field>
<field name="type">ir.actions.act_window</field>
<field name="view_mode">kanban,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">Click to create a new operation type.</p>
</field>
</record>
</data>
</odoo>