Commit 372d6bea authored by Arthur Emynon's avatar Arthur Emynon
Browse files

Added css style for addresses; still a bit of work needed

parent 3a507c3b
......@@ -18,4 +18,9 @@
'views/site_views.xml',
'views/customer_relationship_menus.xml',
],
'assets': {
'web.assets_backend': [
'customer_relationship/static/scss/address.scss',
]
}
}
// TODO: Maybe this file should be part of module l10n_fr_department
.o_form_view {
.o_address_format {
// TODO: Does o_city_zip_department and o_state_country work independently?
// TODO: Is the default behaviour of o_address_department OK without o_city_zip_department?
&.o_city_zip_department {
.o_address_city {
clear: left;
margin-right: 2%;
}
.o_address_zip {
margin-right: 2%;
}
.o_address_department {
clear: right;
margin-right: 0;
}
}
&.o_state_country {
.o_address_state {
clear: left;
margin-right: 2%;
}
.o_address_country {
display: inline;
clear: right;
margin-right: 0;
}
}
}
&.o_form_editable .o_address_format {
// TODO: Does o_city_zip_department and o_state_country work independently?
// TODO: Is the default behaviour of o_address_department OK without o_city_zip_department?
&.o_city_zip_department {
.o_address_city {
width: 40%;
}
.o_address_zip {
width: 18%;
}
.o_address_department {
width: 38%;
}
}
&.o_state_country {
.o_address_state {
width: 60%;
}
.o_address_country {
width: 38%;
}
}
}
}
......@@ -26,27 +26,35 @@
<button class="btn-warning" icon="fa-exclamation-triangle" />
<field name="warning_messages" nolabel="1"/>
</div>
<group col="4">
<field name="partner_id"/>
<field name="contact_id"/>
</group>
<group>
<group string="Adresse" col="3">
<field name="street" placeholder="Rue" colspan="3" nolabel="1"/>
<field name="street2" placeholder="Rue 2" colspan="3" nolabel="1"/>
<field name="city" placeholder="Ville" colspan="1" nolabel="1"/>
<field name="zip" placeholder="Code postal" colspan="1" nolabel="1"/>
<field name="department_id" placeholder="Département" colspan="1" nolabel="1"
context="{'state_id': state_id, 'country_id': country_id}"/>
<field name="state_id" placeholder="Région" colspan="2" nolabel="1"
context="{'country_id': country_id}"/>
<field name="country_id" placeholder="Pays" colspan="1" nolabel="1"/>
<group string="Contact et Adresse">
<group col="1">
<group name="partner" col="3">
<field name="partner_id"/>
<button string="Copier adresse" class="oe_edit_only"
name="action_copy_address_from_partner" type="object"/>
</group>
<group name="partner" col="3">
<field name="contact_id"/>
<button string="Copier adresse" class="oe_edit_only"
name="action_copy_address_from_contact" type="object"/>
</group>
</group>
<group>
<button string="Copier adresse du Compte"
name="action_copy_address_from_partner" type="object"/>
<button string="Copier adresse du Contact"
name="action_copy_address_from_contact" type="object"/>
<label for="street" string="Adresse"/>
<div class="o_address_format o_city_zip_department o_state_country">
<field name="street" placeholder="Rue" class="o_address_street"/>
<field name="street2" placeholder="Rue 2" class="o_address_street"/>
<field name="city" placeholder="Ville" class="o_address_city"/>
<field name="zip" placeholder="Code postal" class="o_address_zip"/>
<field name="department_id" placeholder="Département" class="o_address_department"
options="{'no_quick_create': True}"
context="{'state_id': state_id, 'country_id': country_id}"/>
<field name="state_id" placeholder="Région" class="o_address_state"
options="{'no_quick_create': True}"
context="{'country_id': country_id}"/>
<field name="country_id" placeholder="Pays" class="o_address_country"
options="{'no_quick_create': True}"/>
</div>
</group>
</group>
<group string="Maintenance" col="4">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment