Skip to content

Commit

Permalink
feat: more devs for Producers (#13)
Browse files Browse the repository at this point in the history
* The latest data synced
* Display country in res.partner.form, needed by @manon-corneille
  • Loading branch information
4nt0ineB authored Sep 2, 2024
1 parent db8c108 commit b355bf7
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 4 deletions.
6 changes: 4 additions & 2 deletions producers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
- x_off_last_template_download_date
- x_off_last_import_type
- x_off_user_login_date
- x_off_public_products
- x_off_pro_products

- Inherited view:

- res.partner :
- res.partner.form > res.partner.form_off_pro:
- button to open org in pro platform (when partner is 'company')
- new custom off fields, see ir_model_fields.yml

Expand All @@ -29,7 +31,7 @@

- Open in pro plateform as org (res.partner)

- Tags (crm.tag): onboarding
- Tags (crm.tag): onboarding, Producer

- Category (res.partner.category): Producer, AGENA3000, EQUADIS, CSV, Manual import, BAYARD, SFTP

Expand Down
37 changes: 35 additions & 2 deletions producers/ir_model_fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,41 @@
Required:
On Delete: Set NULL
ID: "9457"
Domain: '[]'
Domain: "[]"
Field Help: Typology of last import
Related Field:
Selectable: True

- Field Name: x_off_pro_products
Field Label: Pro platform products
Model: Contact
Field Type: integer
Indexed:
Stored: True
Readonly:
Related Model:
Blacklisted in web forms: True
Dependencies:
Domain: "[]"
Enable Ordered Tracking: "0"
Field Help: Number of products in pro platform
Required:
Selectable: True
Size: "0"
Translatable:
- Field Name: x_off_public_products
Field Label: Public products
Model: Contact
Field Type: integer
Indexed:
Stored: True
Readonly:
Related Model:
Blacklisted in web forms: True
Dependencies:
Domain: "[]"
Enable Ordered Tracking: "0"
Field Help: Number of products on public database
Required:
Selectable: True
Size: "0"
Translatable:
5 changes: 5 additions & 0 deletions producers/ir_ui_view.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
<field name="x_off_last_import_type" widget="many2one" options="{'invisible': [('x_off_org_id', '=', False)], 'no_create': True, 'no_open': True, 'no_quick_create': True}"/>
<field name="x_off_last_export_date" readonly="1" attrs="{'invisible': [('x_off_org_id', '=', False)]}"/>
<field name="x_off_last_template_download_date" readonly="1" attrs="{'invisible': [('x_off_org_id', '=', False)]}"/>
<field name="x_off_public_products" readonly="1" attrs="{'invisible': [('x_off_org_id', '=', False)]}"/>
<field name="x_off_pro_products" readonly="1" attrs="{'invisible': [('x_off_org_id', '=', False)]}"/>
<field name="x_off_user_login_date" readonly="1" attrs="{'invisible': [('x_off_username', '=', False)]}"/>
</xpath>
<xpath expr="//field[@name='website']" position="after">
<field name="country_id" placeholder="Country" class="o_address_country" options="{'no_open': True, 'no_create': True}"/>
</xpath>
Active: True
View inheritance mode: Extension View

0 comments on commit b355bf7

Please sign in to comment.