Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
finacoop_template_facture
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Le Filament
Finacoop
finacoop_template_facture
Commits
82436ebf
Commit
82436ebf
authored
5 years ago
by
Benjamin - Le Filament
Browse files
Options
Downloads
Patches
Plain Diff
[add] gestion adresse établissement secondaire
parent
0dbf5422
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
models/res_company.py
+5
-0
5 additions, 0 deletions
models/res_company.py
views/report_templates.xml
+14
-4
14 additions, 4 deletions
views/report_templates.xml
views/res_company_views.xml
+7
-0
7 additions, 0 deletions
views/res_company_views.xml
with
26 additions
and
4 deletions
models/res_company.py
+
5
−
0
View file @
82436ebf
...
@@ -10,3 +10,8 @@ class ResCompanyInvoice(models.Model):
...
@@ -10,3 +10,8 @@ class ResCompanyInvoice(models.Model):
cgv
=
fields
.
Html
(
'
CGV
'
)
cgv
=
fields
.
Html
(
'
CGV
'
)
oec
=
fields
.
Char
(
'
OEC
'
)
oec
=
fields
.
Char
(
'
OEC
'
)
forme_juridique
=
fields
.
Char
(
'
Forme Juridique
'
)
forme_juridique
=
fields
.
Char
(
'
Forme Juridique
'
)
has_facility
=
fields
.
Boolean
(
'
Etablissement secondaire ?
'
,
default
=
False
)
facility_street
=
fields
.
Char
(
'
Rue
'
)
facility_street2
=
fields
.
Char
(
'
Rue 2
'
)
facility_zip
=
fields
.
Char
(
'
Code Postal
'
)
facility_city
=
fields
.
Char
(
'
Ville
'
)
This diff is collapsed.
Click to expand it.
views/report_templates.xml
+
14
−
4
View file @
82436ebf
...
@@ -11,10 +11,20 @@
...
@@ -11,10 +11,20 @@
</div>
</div>
<div
class=
"col-6 text-right mb4"
>
<div
class=
"col-6 text-right mb4"
>
<h4
class=
"mt0"
t-field=
"company.report_header"
/>
<h4
class=
"mt0"
t-field=
"company.report_header"
/>
<div
name=
"company_address"
class=
"mb4"
>
<t
t-if=
"company.has_facility"
>
<span
class=
"company_address"
t-field=
"company.partner_id"
<div
name=
"facility_address"
class=
"mb4"
>
t-options=
'{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'
/>
<span
t-field=
"company.partner_id.name"
/><br/>
</div>
<span
t-field=
"company.facility_street"
/><br/>
<t
t-if=
"company.facility_street2"
><span
t-field=
"company.facility_street2"
/><br/></t>
<span
t-field=
"company.facility_zip"
/>
<span
t-field=
"company.facility_city"
/>
</div>
</t>
<t
t-else=
""
>
<div
name=
"company_address"
class=
"mb4"
>
<span
class=
"company_address"
t-field=
"company.partner_id"
t-options=
'{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'
/>
</div>
</t>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
views/res_company_views.xml
+
7
−
0
View file @
82436ebf
...
@@ -7,6 +7,13 @@
...
@@ -7,6 +7,13 @@
<field
name=
"model"
>
res.company
</field>
<field
name=
"model"
>
res.company
</field>
<field
name=
"inherit_id"
ref=
"base.view_company_form"
/>
<field
name=
"inherit_id"
ref=
"base.view_company_form"
/>
<field
name=
"arch"
type=
"xml"
>
<field
name=
"arch"
type=
"xml"
>
<xpath
expr=
"//notebook/page/group/group"
position=
"inside"
>
<field
name=
"has_facility"
widget=
"boolean_toggle"
/>
<field
name=
"facility_street"
attrs=
"{'invisible': [('has_facility', '!=', True)]}"
/>
<field
name=
"facility_street2"
attrs=
"{'invisible': [('has_facility', '!=', True)]}"
/>
<field
name=
"facility_zip"
attrs=
"{'invisible': [('has_facility', '!=', True)]}"
/>
<field
name=
"facility_city"
attrs=
"{'invisible': [('has_facility', '!=', True)]}"
/>
</xpath>
<xpath
expr=
"//field[@name='website']"
position=
"after"
>
<xpath
expr=
"//field[@name='website']"
position=
"after"
>
<field
name=
"forme_juridique"
/>
<field
name=
"forme_juridique"
/>
<field
name=
"cgv"
/>
<field
name=
"cgv"
/>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment