Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/12.0' into 13.0-automerge-3ede…
Browse files Browse the repository at this point in the history
…f2942aa4ff8be7b2932a7e53c565794e1c4f
  • Loading branch information
TestMergeBot authored and TestMergeBot committed Nov 14, 2019
2 parents bea249c + 3edef29 commit 3de37b8
Show file tree
Hide file tree
Showing 26 changed files with 334 additions and 529 deletions.
2 changes: 1 addition & 1 deletion pos_debt_notebook/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'category': 'Point Of Sale',
'live_test_url': 'http://apps.it-projects.info/shop/product/pos-debt-notebook?version=12.0',
"images": ['images/debt_notebook.png'],
'version': '12.0.5.3.1',
'version': '12.0.5.3.2',
'author': 'IT-Projects LLC, Ivan Yelizariev',
"support": "[email protected]",
'website': 'https://apps.odoo.com/apps/modules/12.0/pos_debt_notebook/',
Expand Down
5 changes: 4 additions & 1 deletion pos_debt_notebook/doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
`5.3.2`
-------
- **Fix:** Double move lines for POS orders

`5.3.1`
-------
- **Fix:** Credit Product Field was accessible only with **Show Full Accounting Features** option enabled so it has been moved to Sales tab


`5.3.0`
-------
- **Improvement:** New Balance is amount for selected journal, not for total Credits.
Expand Down
13 changes: 5 additions & 8 deletions pos_debt_notebook/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ def _process_order(self, pos_order):
update['order_id'] = order.id
entry = self.env['pos.credit.update'].sudo().create(update)
entry.switch_to_confirm()
order.action_pos_order_paid()
order.set_discounts()
return order

@api.model
Expand All @@ -518,13 +518,8 @@ def _order_fields(self, ui_order):
res['amount_via_discount'] = ui_order.get('amount_via_discount', 0)
return res

def action_pos_order_paid(self):
self.set_discounts(self.amount_via_discount)
# since 12.0v methods used api.depends in 11.0 use api.onchange, so we need to update some fields manually
self._onchange_amount_all()
return super(PosOrder, self).action_pos_order_paid()

def set_discounts(self, amount):
def set_discounts(self):
amount = self.amount_via_discount
for line in self.lines:
if float_is_zero(amount, self.env['decimal.precision'].precision_get('Account')):
break
Expand All @@ -538,6 +533,8 @@ def set_discounts(self, amount):
# since 12.0v methods used api.depends in 11.0 use api.onchange, so we need to update some fields manually
line._onchange_amount_line_all()
amount -= price - line.price_subtotal_incl
# since 12.0v methods used api.depends in 11.0 use api.onchange, so we need to update some fields manually
self._onchange_amount_all()
return amount

def test_paid(self):
Expand Down
2 changes: 1 addition & 1 deletion pos_invoice_pay/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"category": "Point of Sale",
# "live_test_url": "http://apps.it-projects.info/shop/product/pos-invoice-pay?version=12.0",
"images": ["images/pos_invoice_pay_main.png"],
"version": "12.0.1.2.4",
"version": "12.0.1.2.5",
"application": False,

"author": "IT-Projects LLC, Artyom Losev",
Expand Down
5 changes: 5 additions & 0 deletions pos_invoice_pay/doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
`1.2.5`
-------

**Fix:** "Print Receipt" printed unwanted buttons

`1.2.4`
-------

Expand Down
6 changes: 3 additions & 3 deletions pos_invoice_pay/static/src/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,9 @@ tr.sale-order {
.pos .pos-topheader,
.pos .pos-leftpane,
.pos .keyboard_frame,
.pos .receipt-screen header,
.pos .receipt-screen .top-content,
.pos .receipt-screen .centered-content .button {
.pos .invoice-receipt-screen header,
.pos .invoice-receipt-screen .top-content,
.pos .invoice-receipt-screen .centered-content .button {
display: none !important;
}
.pos,
Expand Down
Loading

0 comments on commit 3de37b8

Please sign in to comment.