Update new pos

This commit is contained in:
Oscar Alvarez 2021-01-15 09:36:57 -05:00
parent 07bdb9df22
commit f06f3dae9d
3 changed files with 36 additions and 5 deletions

29
.gitignore vendored Normal file
View File

@ -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__

View File

@ -10,15 +10,16 @@ from trytond.pyson import Eval
__all__ = ['Sale', 'SaleLine']
class Sale:
__metaclass__ = PoolMeta
class Sale(metaclass=PoolMeta):
__name__ = 'sale.sale'
commission = fields.Float('Commission', states={
'readonly': True,
})
def create_invoice(self):
# FIXME maybe we need move thi method to sale_pos_commission
invoice = super(Sale, self).create_invoice()
print('Si entra a comision.......', invoice)
if invoice:
invoice.agent = self.agent
invoice.commission = self.commission
@ -26,8 +27,7 @@ class Sale:
return invoice
class SaleLine:
__metaclass__ = PoolMeta
class SaleLine(metaclass=PoolMeta):
__name__ = 'sale.line'
principal = fields.Many2One('commission.agent', 'Commission Principal',
domain=[

View File

@ -1,5 +1,5 @@
[tryton]
version=5.0.0
version=5.0.1
depends:
ir
account
@ -7,6 +7,8 @@ depends:
invoice_report
commission
sale_shop
sale_pos
sale_pos_frontend
xml:
commission.xml
sale.xml