Skip to content

Commit

Permalink
[IMP] l10n_fr_chorus_account: backport view improvements from v18
Browse files Browse the repository at this point in the history
Fix accounting config view for boolean options
  • Loading branch information
alexis-via committed Jan 6, 2025
1 parent 7ee93f2 commit cc96869
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 36 deletions.
4 changes: 4 additions & 0 deletions l10n_fr_chorus_account/security/group.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
<field name="name">Chorus API</field>
<field name="category_id" ref="base.module_category_hidden" />
</record>
<record id="group_chorus_api_debug" model="res.groups">
<field name="name">Chorus API Debugging</field>
<field name="category_id" ref="base.module_category_hidden" />
</record>
</data>
<data noupdate="1">
<record id="chorus_flow_rule" model="ir.rule">
Expand Down
1 change: 1 addition & 0 deletions l10n_fr_chorus_account/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_chorus_flow_readonly,Read-only access on chorus.flow to account viewer,model_chorus_flow,account.group_account_readonly,1,0,0,0
access_chorus_flow_user,Read/Write/Create access on chorus.flow to invoicing grp,model_chorus_flow,account.group_account_invoice,1,1,1,0
access_chorus_flow_full,Full access on chorus.flow to system grp,model_chorus_flow,base.group_system,1,1,1,1
access_chorus_partner_service_full,Full access on chorus.partner.service to system grp,model_chorus_partner_service,base.group_system,1,1,1,1
Expand Down
28 changes: 18 additions & 10 deletions l10n_fr_chorus_account/views/account_move.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,25 @@
<group name="chorus-tab">
<group name="chorus-main">
<field name="chorus_flow_id" />
<field name="chorus_identifier" />
<field name="chorus_status" />
<field name="chorus_status_date" />
<button
name="chorus_update_invoice_status"
type="object"
string="Update Chorus Invoice Status"
attrs="{'invisible': [('chorus_identifier', 'in', (False, 0))]}"
colspan="2"
class="btn-default"
<field name="chorus_identifier" invisible="1" />
<field
name="chorus_identifier"
groups="l10n_fr_chorus_account.group_chorus_api_debug"
/>
<field name="chorus_status" />
<label for="chorus_status_date" />
<div name="chorus_status_date" class="o_row">
<field name="chorus_status_date" />
<button
name="chorus_update_invoice_status"
type="object"
string="Update"
help="Update Chorus Invoice Status"
class="btn-link mb-1 px-0"
icon="fa-refresh"
attrs="{'invisible': [('chorus_identifier', '=', False)]}"
/>
</div>
</group>
<group name="chorus-attachments" string="Attachments">
<field
Expand Down
7 changes: 6 additions & 1 deletion l10n_fr_chorus_account/views/chorus_flow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@
<field name="currency_id" invisible="1" />
<field name="state" invisible="1" />
<field name="payment_state" />
<field name="chorus_identifier" />
<field
name="chorus_identifier"
groups="l10n_fr_chorus_account.group_chorus_api_debug"
/>
<field name="chorus_status" />
<field name="chorus_status_date" />
</tree>
Expand Down Expand Up @@ -92,6 +95,8 @@
<field name="arch" type="xml">
<search>
<field name="name" />
<separator />
<filter string="Date" name="date" date="date" />
<group string="Group By" name="groupby">
<filter
name="status_groupby"
Expand Down
4 changes: 2 additions & 2 deletions l10n_fr_chorus_account/views/chorus_partner_service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<field name="active" />
<field
name="chorus_identifier"
groups="l10n_fr_chorus_account.group_chorus_api"
groups="l10n_fr_chorus_account.group_chorus_api_debug"
/>
</group>
</form>
Expand All @@ -41,7 +41,7 @@
<field name="engagement_required" />
<field
name="chorus_identifier"
groups="l10n_fr_chorus_account.group_chorus_api"
groups="l10n_fr_chorus_account.group_chorus_api_debug"
/>
</tree>
</field>
Expand Down
60 changes: 40 additions & 20 deletions l10n_fr_chorus_account/views/config_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,33 @@
>
<div class="o_setting_left_pane" />
<div class="o_setting_right_pane">
<div class="row">
<label
for="fr_chorus_invoice_format"
class="col-md-5 o_light_label"
/>
<field name="fr_chorus_invoice_format" />
</div>
<div class="row">
<label
for="fr_chorus_invoice_format"
class="col-md-5 o_light_label"
/>
<field name="fr_chorus_invoice_format" />
</div>
</div>
<div
class="col-xs-12 col-md-12 o_setting_box"
attrs="{'invisible': [('group_chorus_api', '=', False)]}"
>
<div class="o_setting_left_pane">
<field name="fr_chorus_check_commitment_number" />
</div>
<div class="o_setting_right_pane">
<label
for="fr_chorus_check_commitment_number"
class="col-md-5 o_light_label"
/>
<field name="fr_chorus_check_commitment_number" />
</div>
for="fr_chorus_check_commitment_number"
class="col-md-5 o_light_label"
/>
</div>
</div>
<div
class="col-xs-12 col-md-12 o_setting_box"
attrs="{'invisible': [('group_chorus_api', '=', False)]}"
>
<div class="o_setting_left_pane" />
<div class="o_setting_right_pane">
<div class="row">
<label
for="fr_chorus_api_login"
Expand Down Expand Up @@ -76,13 +89,20 @@
widget="many2many_tags"
/>
</div>
<div class="row">
<label
for="fr_chorus_qualif"
class="col-md-5 o_light_label"
/>
<field name="fr_chorus_qualif" />
</div>
</div>
</div>
<div
class="col-xs-12 col-md-12 o_setting_box"
attrs="{'invisible': [('group_chorus_api', '=', False)]}"
>
<div class="o_setting_left_pane">
<field name="fr_chorus_qualif" />
</div>
<div class="o_setting_right_pane">
<label
for="fr_chorus_qualif"
class="col-md-5 o_light_label"
/>
</div>
</div>
</div>
Expand Down
22 changes: 19 additions & 3 deletions l10n_fr_chorus_account/views/res_partner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,37 @@
<button
name="fr_chorus_identifier_and_required_button"
type="object"
string="Update Chorus Info and Services"
string="Get Chorus Info and Services"
colspan="2"
class="btn-primary"
groups="l10n_fr_chorus_account.group_chorus_api"
attrs="{'invisible': [('fr_chorus_required', '!=', False)]}"
/>
<field name="fr_chorus_required" />

<label for="fr_chorus_required" />
<div name="fr_chorus_required" class="o_row">
<field name="fr_chorus_required" />
<button
name="fr_chorus_identifier_and_required_button"
type="object"
string="Update"
class="btn-link mb-1 px-0"
icon="fa-refresh"
groups="l10n_fr_chorus_account.group_chorus_api"
attrs="{'invisible': [('fr_chorus_required', '=', False)]}"
help="Update Info Required for Chorus and Chorus Services"
/>
</div>
<field
name="fr_chorus_identifier"
groups="l10n_fr_chorus_account.group_chorus_api"
groups="l10n_fr_chorus_account.group_chorus_api_debug"
/>
<button
type="action"
class="btn-link"
name="%(chorus_partner_service_action)d"
context="{'search_default_partner_id': active_id, 'default_partner_id': active_id}"
colspan="2"
>
<field
name="fr_chorus_service_count"
Expand Down

0 comments on commit cc96869

Please sign in to comment.