[16.0] contract: Show discount lines for users with the group 'Discount on lines'

This commit is contained in:
fkantelberg
2024-02-09 13:59:46 +01:00
committed by jaydeep32
parent 58a91960c0
commit 54353c07a1
7 changed files with 3 additions and 71 deletions

View File

@@ -7,7 +7,7 @@ Contract from Sale
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7937ac7a03ecb10eef8665f3f53791a83903d2dd80c6e204b62d13009fb6949e
!! source digest: sha256:00fb3cdc565442ffcd3351e97d0516ce6f4ceb55402981b183f7e717a1e23173
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png

View File

@@ -3,7 +3,7 @@
{
"name": "Contract from Sale",
"version": "16.0.1.1.0",
"version": "16.0.1.2.0",
"category": "Sales",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/contract",
@@ -12,10 +12,7 @@
"data": [
"security/ir.model.access.csv",
"security/contract_security.xml",
"views/abstract_contract_line.xml",
"views/contract.xml",
"views/contract_line.xml",
"views/contract_template.xml",
"views/res_partner_view.xml",
],
"license": "AGPL-3",

View File

@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
@@ -367,7 +366,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7937ac7a03ecb10eef8665f3f53791a83903d2dd80c6e204b62d13009fb6949e
!! source digest: sha256:00fb3cdc565442ffcd3351e97d0516ce6f4ceb55402981b183f7e717a1e23173
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/contract/tree/16.0/contract_sale"><img alt="OCA/contract" src="https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-contract_sale"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/contract&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows access to contracts for sale employees without account

View File

@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!--FORM view-->
<record id="contract_abstract_contract_line_form_view" model="ir.ui.view">
<field
name="name"
>contract.abstract.contract.line form view (in contract_sale)</field>
<field name="model">contract.abstract.contract.line</field>
<field
name="inherit_id"
ref="contract.contract_abstract_contract_line_form_view"
/>
<field name="arch" type="xml">
<field name="discount" position="attributes">
<attribute name="groups">product.group_discount_per_so_line</attribute>
</field>
</field>
</record>
</odoo>

View File

@@ -8,21 +8,4 @@
sequence="21"
groups="sales_team.group_sale_salesman"
/>
<record id="contract_contract_form_view" model="ir.ui.view">
<field name="name">contract.contract.form.contract.sale</field>
<field name="model">contract.contract</field>
<field name="inherit_id" ref="contract.contract_contract_form_view" />
<field name="arch" type="xml">
<xpath
expr="//field[@name='contract_line_ids']/tree/field[@name='discount']"
position="attributes"
>
<attribute
name="groups"
add="product.group_discount_per_so_line"
separator=","
/>
</xpath>
</field>
</record>
</odoo>

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!--TREE view-->
<record id="contract_line_tree_view" model="ir.ui.view">
<field name="name">contract.template.line tree view (in contract_sale)</field>
<field name="model">contract.line</field>
<field name="inherit_id" ref="contract.contract_line_tree_view" />
<field name="arch" type="xml">
<field name="discount" position="attributes">
<attribute name="groups">product.group_discount_per_so_line</attribute>
</field>
</field>
</record>
</odoo>

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!--FORM view-->
<record id="contract_template_form_view" model="ir.ui.view">
<field name="name">contract.template form view (in contract_sale)</field>
<field name="model">contract.template</field>
<field name="inherit_id" ref="contract.contract_template_form_view" />
<field name="arch" type="xml">
<field name="discount" position="attributes">
<attribute name="groups">product.group_discount_per_so_line</attribute>
</field>
</field>
</record>
</odoo>