Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Tryton
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tryton
Tryton
Commits
7d1e483a
Commit
7d1e483a
authored
3 years ago
by
Maxime Richez
Browse files
Options
Downloads
Patches
Plain Diff
Add field access on referential document
issue10269 review332861003
parent
520c5e98
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!114
Return an empty list when the treeview has no selection
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
CHANGELOG
+2
-0
2 additions, 0 deletions
CHANGELOG
account.xml
+9
-0
9 additions, 0 deletions
account.xml
product.py
+12
-0
12 additions, 0 deletions
product.py
product.xml
+13
-2
13 additions, 2 deletions
product.xml
tryton.cfg
+1
-1
1 addition, 1 deletion
tryton.cfg
with
37 additions
and
3 deletions
CHANGELOG
+
2
−
0
View file @
7d1e483a
* Add group to edit accounting of products
Version 6.0.0 - 2021-05-03
* Bug fixes (see mercurial logs for details)
* Add deductible rate for supplier taxes
...
...
This diff is collapsed.
Click to expand it.
account.xml
+
9
−
0
View file @
7d1e483a
...
...
@@ -3,6 +3,15 @@
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record
model=
"res.group"
id=
"group_account_product_admin"
>
<field
name=
"name"
>
Account Product Administration
</field>
<field
name=
"parent"
ref=
"product.group_product_admin"
/>
</record>
<record
model=
"res.user-res.group"
id=
"user_admin_group_account_product_admin"
>
<field
name=
"user"
ref=
"res.user_admin"
/>
<field
name=
"group"
ref=
"group_account_product_admin"
/>
</record>
<record
model=
"ir.ui.view"
id=
"create_chart_properties_view_form"
>
<field
name=
"model"
>
account.create_chart.properties
</field>
<field
name=
"inherit"
...
...
This diff is collapsed.
Click to expand it.
product.py
+
12
−
0
View file @
7d1e483a
...
...
@@ -399,6 +399,18 @@
def
supplier_taxes_deductible_rate_used
(
self
):
return
self
.
get_taxes
(
'
supplier_taxes_deductible_rate_used
'
)
@classmethod
def
copy
(
cls
,
templates
,
default
=
None
):
context
=
Transaction
().
context
default
=
default
.
copy
()
if
default
else
{}
if
context
.
get
(
'
_check_access
'
):
default
.
setdefault
(
'
account_category
'
,
cls
.
default_get
(
[
'
account_category
'
],
with_rec_name
=
False
).
get
(
'
account_category
'
))
return
super
().
copy
(
templates
,
default
=
default
)
class
Product
(
metaclass
=
PoolMeta
):
__name__
=
'
product.product
'
...
...
This diff is collapsed.
Click to expand it.
product.xml
+
13
−
2
View file @
7d1e483a
...
...
@@ -28,5 +28,5 @@
<field
name=
"global_p"
eval=
"False"
/>
<field
name=
"perm_read"
eval=
"False"
/>
</record>
<record
model=
"ir.rule.group-res.group"
id=
"rule_group_category_account
ing
-account_admin"
>
<record
model=
"ir.rule.group-res.group"
id=
"rule_group_category_account-account_
product_
admin"
>
<field
name=
"rule_group"
ref=
"rule_group_category_accounting"
/>
...
...
@@ -32,5 +32,5 @@
<field
name=
"rule_group"
ref=
"rule_group_category_accounting"
/>
<field
name=
"group"
ref=
"
account.
group_account_admin"
/>
<field
name=
"group"
ref=
"group_account_
product_
admin"
/>
</record>
<record
model=
"ir.rule"
id=
"rule_category_accounting_accounting"
>
<field
name=
"domain"
eval=
"[('accounting', '=', True)]"
pyson=
"1"
/>
...
...
@@ -49,5 +49,16 @@
<field
name=
"name"
>
template_tree
</field>
</record>
<record
model=
"ir.model.field.access"
id=
"access_template_account_category"
>
<field
name=
"field"
search=
"[('model.model', '=', 'product.template'), ('name', '=', 'account_category')]"
/>
<field
name=
"perm_read"
eval=
"True"
/>
<field
name=
"perm_write"
eval=
"False"
/>
</record>
<record
model=
"ir.model.field.access"
id=
"access_template_account_category_account_product_admin"
>
<field
name=
"field"
search=
"[('model.model', '=', 'product.template'), ('name', '=', 'account_category')]"
/>
<field
name=
"group"
ref=
"group_account_product_admin"
/>
<field
name=
"perm_read"
eval=
"True"
/>
<field
name=
"perm_write"
eval=
"True"
/>
</record>
</data>
</tryton>
This diff is collapsed.
Click to expand it.
tryton.cfg
+
1
−
1
View file @
7d1e483a
...
...
@@ -8,5 +8,6 @@
extras_depend:
analytic_account
xml:
account.xml
product.xml
configuration.xml
...
...
@@ -11,5 +12,4 @@
product.xml
configuration.xml
account.xml
message.xml
analytic_account.xml
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