Use commission product from agent's plan if defined
issue4834 review8191002
This commit is contained in:
1 parent
bdaeb77284
commit
82b88c2a6a
1 file changed
+5
@@ -275,6 +275,11 @@ class Commission(ModelSQL, ModelView):
|
||||
'principal': 'in',
|
||||
}.get(self.agent.type_)
|
||||
|
||||
@fields.depends('agent', 'product')
|
||||
def on_change_agent(self):
|
||||
if not self.product and self.agent and self.agent.plan:
|
||||
self.product = self.agent.plan.commission_product
|
||||
|
||||
def get_invoice_state(self, name):
|
||||
state = ''
|
||||
if self.invoice_line:
|
||||
|
||||
Reference in new issue
Block a user