Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
3
3adentaire_account
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
3A Dentaire
3adentaire_account
Commits
6d7c14bd
Commit
6d7c14bd
authored
2 months ago
by
Hugo Trentesaux
Committed by
Rémi - Le Filament
2 months ago
Browse files
Options
Downloads
Patches
Plain Diff
[UPD] add partner tags on invoice and sale order
parent
5f71899b
Branches
Branches containing commit
No related tags found
1 merge request
!1
[UPD] add partner tags on invoice and sale order
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
models/account.py
+5
-0
5 additions, 0 deletions
models/account.py
models/sale.py
+5
-0
5 additions, 0 deletions
models/sale.py
views/account_views.xml
+23
-11
23 additions, 11 deletions
views/account_views.xml
views/sale_views.xml
+34
-19
34 additions, 19 deletions
views/sale_views.xml
with
67 additions
and
30 deletions
models/account.py
+
5
−
0
View file @
6d7c14bd
...
...
@@ -22,6 +22,11 @@ class AccountInvoice(models.Model):
"
res.partner
"
,
string
=
"
Apporteur
"
,
tracking
=
True
,
copy
=
False
)
# add partner tags
partner_category_ids
=
fields
.
Many2many
(
related
=
"
partner_id.category_id
"
,
string
=
"
Etiquettes du contact
"
)
# ------------------------------------------------------
# SQL Constraints
# ------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
models/sale.py
+
5
−
0
View file @
6d7c14bd
...
...
@@ -22,6 +22,11 @@ class SaleOrder(models.Model):
"
res.partner
"
,
string
=
"
Apporteur
"
,
tracking
=
True
,
copy
=
False
)
# add partner tags
partner_category_ids
=
fields
.
Many2many
(
related
=
"
partner_id.category_id
"
,
string
=
"
Etiquettes du client
"
)
# ------------------------------------------------------
# SQL Constraints
# ------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
views/account_views.xml
+
23
−
11
View file @
6d7c14bd
...
...
@@ -7,13 +7,25 @@
<field
name=
"model"
>
account.move
</field>
<field
name=
"inherit_id"
ref=
"account.view_move_form"
/>
<field
name=
"arch"
type=
"xml"
>
<!-- add user second id in other info -->
<field
name=
"invoice_user_id"
position=
"after"
>
<field
name=
"user_second_ids"
options=
"{'no_create_edit': 1}"
widget=
"many2many_tags"
/>
<field
name=
"user_provider_id"
options=
"{'no_create_edit': 1}"
/>
<field
name=
"user_provider_id"
options=
"{'no_create_edit': 1}"
/>
</field>
<!-- add partner tags -->
<field
name=
"partner_id"
position=
"after"
>
<field
name=
"partner_category_ids"
widget=
"many2many_tags"
options=
"{'color_field': 'color'}"
/>
</field>
</field>
</record>
...
...
This diff is collapsed.
Click to expand it.
views/sale_views.xml
+
34
−
19
View file @
6d7c14bd
...
...
@@ -33,4 +33,19 @@
</field>
</field>
</record>
<record
id=
"sale_order_3ad_form"
model=
"ir.ui.view"
>
<field
name=
"name"
>
sale.order.3a.form
</field>
<field
name=
"model"
>
sale.order
</field>
<field
name=
"inherit_id"
ref=
"sale.view_order_form"
/>
<field
name=
"arch"
type=
"xml"
>
<!-- add partner tags -->
<field
name=
"partner_id"
position=
"after"
>
<field
name=
"partner_category_ids"
widget=
"many2many_tags"
options=
"{'color_field': 'color'}"
/>
</field>
</field>
</record>
</odoo>
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