minor fix remove on selected party by source
This commit is contained in:
parent
c1567726b4
commit
f111364db6
17
app/main.py
17
app/main.py
|
@ -35,6 +35,7 @@ from .constants import (
|
|||
SALE_FIELDS, KIND, DIALOG_REPLY_YES,
|
||||
)
|
||||
from .dialogs import DialogDeliveryParty
|
||||
import time
|
||||
|
||||
invoice_type = []
|
||||
|
||||
|
@ -446,7 +447,6 @@ class AppWindow(FrontWindow):
|
|||
})
|
||||
]
|
||||
|
||||
self.sources = self.Source.find([])
|
||||
if self.enviroment != 'restaurant' and self._config.get('use_price_list'):
|
||||
info_fields.append(
|
||||
('list_price', {
|
||||
|
@ -459,6 +459,7 @@ class AppWindow(FrontWindow):
|
|||
'color': self.label_color
|
||||
}))
|
||||
|
||||
self.sources = self.Source.find([])
|
||||
info_fields.append(
|
||||
('source', {
|
||||
'name': 'CANAL',
|
||||
|
@ -2219,14 +2220,14 @@ class AppWindow(FrontWindow):
|
|||
self.dialog_payment_term.close()
|
||||
|
||||
def on_selected_source(self, source):
|
||||
data = {'source': source}
|
||||
if source.get('party'):
|
||||
party = source.get('party')
|
||||
self.on_selected_party(party['id'])
|
||||
else:
|
||||
self.on_selected_party(self.default_party['id'])
|
||||
self.store.update(data)
|
||||
self.dialog_source.close()
|
||||
data = {'source': source}
|
||||
# if source.get('party'):
|
||||
# party = source.get('party')
|
||||
# self.on_selected_party(party['id'])
|
||||
# else:
|
||||
# self.on_selected_party(self.default_party['id'])
|
||||
self.store.update(data)
|
||||
|
||||
def on_selected_payment(self, journal):
|
||||
self.journal = journal
|
||||
|
|
Loading…
Reference in New Issue