Browse Source

Merge pull request #4 from Antiun/8.0-improve-pos-pricelist

[FIX] Fixes commented by @pablocm-aserti
pull/39/head
Adil Houmadi 9 years ago
parent
commit
a7e7338949
  1. 4
      pos_pricelist/data/pos_order.yml
  2. 2
      pos_pricelist/models/point_of_sale.py
  3. 3
      pos_pricelist/security/ir.model.access.csv
  4. 4
      pos_pricelist/views/point_of_sale_view.xml

4
pos_pricelist/data/pos_order.yml

@ -22,4 +22,8 @@
#
##############################################################################
-
!context
noupdate: 1
- !function {model: pos.order, name: _install_tax_detail}

2
pos_pricelist/models/point_of_sale.py

@ -75,7 +75,7 @@ class PosOrder(models.Model):
_inherit = "pos.order"
taxes = fields.One2many(comodel_name='pos.order.tax',
inverse_name='pos_order')
inverse_name='pos_order', readonly=True)
@api.model
def _amount_line_tax(self, line):

3
pos_pricelist/security/ir.model.access.csv

@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_pos_order_tax,pos.order.tax,model_pos_order_tax,point_of_sale.group_pos_user,1,0,0,0
access_pos_order_tax_manager,pos.order.tax manager,model_pos_order_tax,point_of_sale.group_pos_manager,1,1,1,1

4
pos_pricelist/views/point_of_sale_view.xml

@ -12,8 +12,8 @@
</xpath>
<page string="Payments" position="after">
<page string="Taxes">
<field name="taxes" widget="one2many_list">
<tree string="Taxes detail">
<field name="taxes">
<tree editable="bottom" string="Taxes detail">
<field name="name"/>
<field name="base"/>
<field name="amount"/>

Loading…
Cancel
Save