Browse Source

[WIP] beesdoo_purchase: better button in purchase order form

12.0-beesdoo_purchase-adapt-product-purchase-selling-price
Vincent Van Rossem 4 years ago
parent
commit
ae7c3cda51
  1. 2
      .isort.cfg
  2. 17
      beesdoo_purchase/views/purchase_order.xml

2
.isort.cfg

@ -9,4 +9,4 @@ line_length = 79
known_odoo = odoo known_odoo = odoo
known_odoo_addons = odoo.addons known_odoo_addons = odoo.addons
sections = FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER sections = FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER
known_third_party = pytz
known_third_party = pytz,setuptools

17
beesdoo_purchase/views/purchase_order.xml

@ -5,14 +5,21 @@
<field name="model">purchase.order</field> <field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_form"/> <field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="date_order" position="after">
<field name="supervisor_id"/>
<xpath expr="//div[hasclass('oe_button_box')]" position="inside">
<button name="action_toggle_adapt_purchase_price" type="object" <button name="action_toggle_adapt_purchase_price" type="object"
string="Toggle To Purchase Price"
string="Adapt Purchase Price"
icon="fa-check-square"
class="oe_stat_button"
help="TODO"/> help="TODO"/>
<button name="action_toggle_adapt_purchase_price" type="object"
<button name="action_toggle_adapt_selling_price" type="object"
string="Toggle To Selling Price" string="Toggle To Selling Price"
icon="fa-toggle-on"
class="oe_stat_button"
attrs="{'invisible': True}"
help="TODO"/> help="TODO"/>
</xpath>
<field name="date_order" position="after">
<field name="supervisor_id"/>
</field> </field>
<field name="product_id" position="attributes"> <field name="product_id" position="attributes">
<attribute name="domain">[ <attribute name="domain">[
@ -22,7 +29,7 @@
</field> </field>
<field name="price_subtotal" position="after"> <field name="price_subtotal" position="after">
<field name="adapt_purchase_price" string="To purchase price"/> <field name="adapt_purchase_price" string="To purchase price"/>
<field name="adapt_selling_price" string="To selling price"/>
<field name="adapt_selling_price" string="To selling price" invisible="True"/>
</field> </field>
</field> </field>
</record> </record>

Loading…
Cancel
Save