Skip to content

Commit 20e4daa

Browse files
author
Michael Michot
committed
[ADD] module res_partner_mandatory_field
1 parent 9f1fce5 commit 20e4daa

File tree

5 files changed

+74
-0
lines changed

5 files changed

+74
-0
lines changed

res_partner_mandatory_field/__init__.py

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2020 Pharmasimple (https://www.pharmasimple.be)
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
{
4+
"name": "Res Partner Mandatory Field",
5+
"category": "Tools",
6+
"summary": "",
7+
"version": "14.0.1.0.0",
8+
"author": "Pharmasimple",
9+
"license": "AGPL-3",
10+
"website": "https://github.com/akretion/phs-addons",
11+
"depends": [],
12+
"data": [
13+
"views/res_partner_view.xml",
14+
],
15+
"installable": True,
16+
"application": False,
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo>
3+
<record id="res_partner_form_view" model="ir.ui.view">
4+
<field name="name">res.partner.view.form</field>
5+
<field name="model">res.partner</field>
6+
<field name="inherit_id" ref="base.view_partner_form" />
7+
<field name="arch" type="xml">
8+
<field name="street" position="attributes">
9+
<attribute
10+
name="attrs"
11+
>{'required': [('company_type', '=', 'company')]}</attribute>
12+
</field>
13+
<field name="ref" position="attributes">
14+
<attribute
15+
name="attrs"
16+
>{'required': [('company_type', '=', 'company')]}</attribute>
17+
</field>
18+
<field name="city" position="attributes">
19+
<attribute
20+
name="attrs"
21+
>{'required': [('company_type', '=', 'company')]}</attribute>
22+
</field>
23+
<field name="state_id" position="attributes">
24+
<attribute
25+
name="attrs"
26+
>{'required': [('company_type', '=', 'company')]}</attribute>
27+
</field>
28+
<field name="zip" position="attributes">
29+
<attribute
30+
name="attrs"
31+
>{'required': [('company_type', '=', 'company')]}</attribute>
32+
</field>
33+
<field name="vat" position="attributes">
34+
<attribute
35+
name="attrs"
36+
>{'required': [('company_type', '=', 'company')]}</attribute>
37+
</field>
38+
<field name="lang" position="attributes">
39+
<attribute
40+
name="attrs"
41+
>{'required': [('company_type', '=', 'company')]}</attribute>
42+
</field>
43+
<field name="country_id" position="attributes">
44+
<attribute
45+
name="attrs"
46+
>{'required': [('company_type', '=', 'company')]}</attribute>
47+
</field>
48+
</field>
49+
</record>
50+
</odoo>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../res_partner_mandatory_field
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import setuptools
2+
3+
setuptools.setup(
4+
setup_requires=['setuptools-odoo'],
5+
odoo_addon=True,
6+
)

0 commit comments

Comments
 (0)