Skip to content

Commit 288fe85

Browse files
author
ilyasProgrammer
committed
imp
1 parent c10a171 commit 288fe85

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

unlockbase_sales/unlockbase_sales.py

+7-13
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,6 @@
1212
_logger.setLevel(logging.DEBUG)
1313

1414

15-
# class PosOrder(models.Model):
16-
# _inherit = 'pos.order'
17-
#
18-
# @api.model
19-
# def create_from_ui(self):
20-
# res = super(PosOrder, self).create_from_ui()
21-
# unlock_product = self.pool['product.product'].search([('name', '=', 'unlock')])
22-
# for order in self._context:
23-
# for line in order['data']['lines']:
24-
# pass # TODO
25-
# return res
26-
27-
2815
class UnlockBase(models.Model):
2916
_inherit = 'unlockbase'
3017

@@ -140,6 +127,13 @@ def action_place_order(self, ids):
140127
raise UserError(_('Please set unlock mobile id.'))
141128
else:
142129
vals['Mobile'] = order.unlockbase_network
130+
if unlock_tool.requires_provider != 'None':
131+
if lame(order.unlockbase_provider):
132+
raise UserError(_('Please set unlock provider.'))
133+
else:
134+
vals['Mobile'] = order.unlockbase_provider
135+
136+
143137
# TODO other fields
144138
res = self.unlockbase_place_order(vals)
145139
try:

0 commit comments

Comments
 (0)