Update new pos
This commit is contained in:
parent
07bdb9df22
commit
f06f3dae9d
|
@ -0,0 +1,29 @@
|
||||||
|
# See https://help.github.com/ignore-files/ for more about ignoring files.
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
/build
|
||||||
|
/dist
|
||||||
|
*egg-info
|
||||||
|
|
||||||
|
|
||||||
|
/node_modules
|
||||||
|
|
||||||
|
# testing
|
||||||
|
/coverage
|
||||||
|
|
||||||
|
# production
|
||||||
|
/build
|
||||||
|
|
||||||
|
# misc
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
|
||||||
|
package-lock*
|
||||||
|
|
||||||
|
/__pycache__
|
||||||
|
/app/__pycache__
|
||||||
|
/app/commons/__pycache__
|
8
sale.py
8
sale.py
|
@ -10,15 +10,16 @@ from trytond.pyson import Eval
|
||||||
__all__ = ['Sale', 'SaleLine']
|
__all__ = ['Sale', 'SaleLine']
|
||||||
|
|
||||||
|
|
||||||
class Sale:
|
class Sale(metaclass=PoolMeta):
|
||||||
__metaclass__ = PoolMeta
|
|
||||||
__name__ = 'sale.sale'
|
__name__ = 'sale.sale'
|
||||||
commission = fields.Float('Commission', states={
|
commission = fields.Float('Commission', states={
|
||||||
'readonly': True,
|
'readonly': True,
|
||||||
})
|
})
|
||||||
|
|
||||||
def create_invoice(self):
|
def create_invoice(self):
|
||||||
|
# FIXME maybe we need move thi method to sale_pos_commission
|
||||||
invoice = super(Sale, self).create_invoice()
|
invoice = super(Sale, self).create_invoice()
|
||||||
|
print('Si entra a comision.......', invoice)
|
||||||
if invoice:
|
if invoice:
|
||||||
invoice.agent = self.agent
|
invoice.agent = self.agent
|
||||||
invoice.commission = self.commission
|
invoice.commission = self.commission
|
||||||
|
@ -26,8 +27,7 @@ class Sale:
|
||||||
return invoice
|
return invoice
|
||||||
|
|
||||||
|
|
||||||
class SaleLine:
|
class SaleLine(metaclass=PoolMeta):
|
||||||
__metaclass__ = PoolMeta
|
|
||||||
__name__ = 'sale.line'
|
__name__ = 'sale.line'
|
||||||
principal = fields.Many2One('commission.agent', 'Commission Principal',
|
principal = fields.Many2One('commission.agent', 'Commission Principal',
|
||||||
domain=[
|
domain=[
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[tryton]
|
[tryton]
|
||||||
version=5.0.0
|
version=5.0.1
|
||||||
depends:
|
depends:
|
||||||
ir
|
ir
|
||||||
account
|
account
|
||||||
|
@ -7,6 +7,8 @@ depends:
|
||||||
invoice_report
|
invoice_report
|
||||||
commission
|
commission
|
||||||
sale_shop
|
sale_shop
|
||||||
|
sale_pos
|
||||||
|
sale_pos_frontend
|
||||||
xml:
|
xml:
|
||||||
commission.xml
|
commission.xml
|
||||||
sale.xml
|
sale.xml
|
||||||
|
|
Loading…
Reference in New Issue