mirror of
https://github.com/bringout/oca-purchase.git
synced 2026-04-23 11:02:00 +02:00
Add oca-purchase submodule with 96 purchase modules moved from oca-workflow-process
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
b0628ee8ea
commit
7378b233e9
3994 changed files with 334316 additions and 0 deletions
|
|
@ -0,0 +1,20 @@
|
|||
<odoo>
|
||||
<record model="ir.ui.view" id="product_supplierinfo_form_view">
|
||||
<field name="model">product.supplierinfo</field>
|
||||
<field name="inherit_id" ref="product.product_supplierinfo_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[field[@name='price']]" position="after">
|
||||
<field name="discount" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="product_supplierinfo_tree_view">
|
||||
<field name="model">product.supplierinfo</field>
|
||||
<field name="inherit_id" ref="product.product_supplierinfo_tree_view" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="price" position="after">
|
||||
<field name="discount" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record model="ir.ui.view" id="purchase_order_line_form2">
|
||||
<field name="name">purchase_discount.order.line.form2</field>
|
||||
<field name="model">purchase.order.line</field>
|
||||
<field name="inherit_id" ref="purchase.purchase_order_line_form2" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="price_unit" position="after">
|
||||
<field name="discount" optional="show" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="purchase_order_line_tree">
|
||||
<field name="name">purchase_discount.order.line.tree</field>
|
||||
<field name="model">purchase.order.line</field>
|
||||
<field name="inherit_id" ref="purchase.purchase_order_line_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="price_unit" position="after">
|
||||
<field name="discount" optional="show" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="purchase_order_form">
|
||||
<field name="name">purchase_discount.purchase.order.form</field>
|
||||
<field name="model">purchase.order</field>
|
||||
<field name="inherit_id" ref="purchase.purchase_order_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath
|
||||
expr="//field[@name='order_line']/tree/field[@name='price_unit']"
|
||||
position="after"
|
||||
>
|
||||
<field
|
||||
name="discount"
|
||||
optional="show"
|
||||
attrs="{'readonly': [('qty_invoiced', '!=', 0)]}"
|
||||
/>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//field[@name='order_line']/form//field[@name='price_unit']"
|
||||
position="after"
|
||||
>
|
||||
<field
|
||||
name="discount"
|
||||
optional="show"
|
||||
attrs="{'readonly': [('qty_invoiced', '!=', 0)]}"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="purchase_history_tree">
|
||||
<field name="name">purchase_discount.history.tree</field>
|
||||
<field name="model">purchase.order.line</field>
|
||||
<field name="inherit_id" ref="purchase.purchase_history_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="price_unit" position="after">
|
||||
<field name="discount" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<template
|
||||
id="report_purchaseorder_document"
|
||||
inherit_id="purchase.report_purchaseorder_document"
|
||||
>
|
||||
<xpath expr="//table[1]/thead/tr//th[last()]" position="before">
|
||||
<th name="th_discount" class="text-right">
|
||||
<strong>Disc. (%)</strong>
|
||||
</th>
|
||||
</xpath>
|
||||
<xpath expr="//td[span[@t-field='line.price_subtotal']]" position="before">
|
||||
<td class="text-right">
|
||||
<span t-field="line.discount" />
|
||||
</td>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<odoo>
|
||||
<record model="ir.ui.view" id="res_partner_form_view">
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='purchase']" position="inside">
|
||||
<field
|
||||
name="default_supplierinfo_discount"
|
||||
attrs="{'invisible': [('is_company', '=', False), ('parent_id', '!=', False)]}"
|
||||
/>
|
||||
<div
|
||||
name="supplierinfo_discount_disabled"
|
||||
colspan="2"
|
||||
attrs="{'invisible': ['|',('is_company', '=', True), ('parent_id', '=', False)]}"
|
||||
>
|
||||
<p>Discount-related settings are managed on <button
|
||||
name="open_commercial_entity"
|
||||
type="object"
|
||||
string="the parent company"
|
||||
class="oe_link"
|
||||
/></p>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue