Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Sith
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
59
Issues
59
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AE
Sith
Commits
423313f0
Commit
423313f0
authored
Apr 25, 2017
by
Skia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update stock translations
parent
df20bf6d
Pipeline
#900
failed with stage
in 55 seconds
Changes
5
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
745 additions
and
524 deletions
+745
-524
counter/views.py
counter/views.py
+4
-4
locale/fr/LC_MESSAGES/django.mo
locale/fr/LC_MESSAGES/django.mo
+0
-0
locale/fr/LC_MESSAGES/django.po
locale/fr/LC_MESSAGES/django.po
+739
-519
sith/settings.py
sith/settings.py
+1
-0
stock/views.py
stock/views.py
+1
-1
No files found.
counter/views.py
View file @
423313f0
...
...
@@ -118,7 +118,7 @@ class RefillForm(forms.ModelForm):
class
CounterTabsMixin
(
TabedViewMixin
):
def
get_tabs_title
(
self
):
if
hasattr
(
self
.
object
,
'stock_owner'
)
:
if
hasattr
(
self
.
object
,
'stock_owner'
)
:
return
self
.
object
.
stock_owner
.
counter
else
:
return
self
.
object
...
...
@@ -132,19 +132,19 @@ class CounterTabsMixin(TabedViewMixin):
})
if
self
.
object
.
stock_owner
.
counter
.
type
if
hasattr
(
self
.
object
,
'stock_owner'
)
else
self
.
object
.
type
==
"BAR"
:
tab_list
.
append
({
'url'
:
reverse_lazy
(
'counter:cash_summary'
,
'url'
:
reverse_lazy
(
'counter:cash_summary'
,
kwargs
=
{
'counter_id'
:
self
.
object
.
stock_owner
.
counter
.
id
if
hasattr
(
self
.
object
,
'stock_owner'
)
else
self
.
object
.
id
}),
'slug'
:
'cash_summary'
,
'name'
:
_
(
"Cash summary"
),
})
tab_list
.
append
({
'url'
:
reverse_lazy
(
'counter:last_ops'
,
'url'
:
reverse_lazy
(
'counter:last_ops'
,
kwargs
=
{
'counter_id'
:
self
.
object
.
stock_owner
.
counter
.
id
if
hasattr
(
self
.
object
,
'stock_owner'
)
else
self
.
object
.
id
}),
'slug'
:
'last_ops'
,
'name'
:
_
(
"Last operations"
),
})
tab_list
.
append
({
'url'
:
reverse_lazy
(
'stock:take_items'
,
'url'
:
reverse_lazy
(
'stock:take_items'
,
kwargs
=
{
'stock_id'
:
self
.
object
.
stock
.
id
if
hasattr
(
self
.
object
,
'stock'
)
else
self
.
object
.
stock_owner
.
id
}),
'slug'
:
'take_items_from_stock'
,
'name'
:
_
(
"Take items from stock"
),
...
...
locale/fr/LC_MESSAGES/django.mo
View file @
423313f0
No preview for this file type
locale/fr/LC_MESSAGES/django.po
View file @
423313f0
This diff is collapsed.
Click to expand it.
sith/settings.py
View file @
423313f0
...
...
@@ -85,6 +85,7 @@ INSTALLED_APPS = (
'com'
,
'election'
,
'forum'
,
'stock'
,
)
MIDDLEWARE_CLASSES
=
(
...
...
stock/views.py
View file @
423313f0
...
...
@@ -373,7 +373,7 @@ class StockTakeItemsBaseFormView(CounterTabsMixin, CanEditMixin, DetailView, Bas
for
i
in
self
.
stock
.
items
.
filter
(
type
=
t
).
order_by
(
'name'
).
all
():
field_name
=
"item-%s"
%
(
str
(
i
.
id
))
fields
[
field_name
]
=
forms
.
IntegerField
(
required
=
False
,
label
=
str
(
i
),
initial
=
0
,
min_value
=
0
,
max_value
=
i
.
effective_quantity
,
help_text
=
_
(
"
(
%(effective_quantity)s left"
%
{
"effective_quantity"
:
str
(
i
.
effective_quantity
)}))
help_text
=
_
(
"%(effective_quantity)s left"
%
{
"effective_quantity"
:
str
(
i
.
effective_quantity
)}))
kwargs
[
field_name
]
=
i
.
effective_quantity
kwargs
[
'stock_id'
]
=
self
.
stock
.
id
kwargs
[
'counter_id'
]
=
self
.
stock
.
counter
.
id
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment