diff options
| author | Victor Feyens <vfe@odoo.com> | 2019-07-12 11:39:31 +0000 |
|---|---|---|
| committer | Victor Feyens <vfe@odoo.com> | 2019-07-16 08:38:30 +0000 |
| commit | 8f137f66bc4a43a43da111cfde04d4fd27e455ea (patch) | |
| tree | f3d61ace300ef41fd46385ca9b5c944cf13fb508 | |
| parent | 561829849f2c354136390bf9da2c487c4bddcac7 (diff) | |
[IMP] purchase: responsiveness (+mobile)
> support kanban view for order lines in puchase form view.
closes odoo/odoo#34737
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
| -rw-r--r-- | addons/purchase/views/purchase_views.xml | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/addons/purchase/views/purchase_views.xml b/addons/purchase/views/purchase_views.xml index 04735497d18..90f6b9d9aa5 100644 --- a/addons/purchase/views/purchase_views.xml +++ b/addons/purchase/views/purchase_views.xml @@ -183,6 +183,7 @@ <page string="Products"> <field name="order_line" widget="section_and_note_one2many" + mode="tree,kanban" attrs="{'readonly': [('state', 'in', ('done', 'cancel'))]}"> <tree string="Purchase Order Lines" editable="bottom"> <control> @@ -267,6 +268,62 @@ <label for="name" string="Note" attrs="{'invisible': [('display_type', '!=', 'line_note')]}"/> <field name="name" nolabel="1" attrs="{'invisible': [('display_type', '=', False)]}"/> </form> + <kanban class="o_kanban_mobile"> + <field name="name"/> + <field name="product_id"/> + <field name="product_qty"/> + <field name="product_uom" groups="uom.group_uom"/> + <field name="price_subtotal"/> + <field name="price_tax" invisible="1"/> + <field name="price_total" invisible="1"/> + <field name="price_unit"/> + <field name="display_type"/> + <field name="taxes_id" invisible="1"/> + <templates> + <t t-name="kanban-box"> + <div t-attf-class="oe_kanban_card oe_kanban_global_click {{ record.display_type.raw_value ? 'o_is_' + record.display_type.raw_value : '' }}"> + <t t-if="!record.display_type.raw_value"> + <div class="row"> + <div class="col-8"> + <strong> + <span t-esc="record.product_id.value"/> + </strong> + </div> + <div class="col-4"> + <strong> + <span t-esc="record.price_subtotal.value" class="float-right text-right"/> + </strong> + </div> + </div> + <div class="row"> + <div class="col-12 text-muted"> + <span> + Quantity: + <t t-esc="record.product_qty.value"/> + <t t-esc="record.product_uom.value"/> + </span> + </div> + </div> + <div class="row"> + <div class="col-12 text-muted"> + <span> + Unit Price: + <t t-esc="record.price_unit.value"/> + </span> + </div> + </div> + </t> + <div + t-elif="record.display_type.raw_value === 'line_section' || record.display_type.raw_value === 'line_note'" + class="row"> + <div class="col-12"> + <span t-esc="record.name.value"/> + </div> + </div> + </div> + </t> + </templates> + </kanban> </field> <group class="oe_subtotal_footer oe_right"> <field name="amount_untaxed" widget="monetary" options="{'currency_field': 'currency_id'}"/> |
