-
-
Notifications
You must be signed in to change notification settings - Fork 600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IMP] Ported pos_pricelist to v9. Based on work from x620. Added calc… #186
Conversation
You must keep commit attribution (you can squash all @x620 commits tough). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @wpichler. thanks for the work.
done a quick review for the time being. Not tested.
some remarks inline.
kind regards;
CC : @AdilHoumadi, @antespi, @StefanRijnhart, @pedrobaeza, @ismaelcj, @x620
pricelist_ids: | ||
- min_quantity : 2.0 | ||
price : 80 | ||
# seller_ids: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove useless demo data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@@ -42,16 +42,18 @@ class PosOrderLine(models.Model): | |||
@api.multi | |||
def _compute_taxes(self): | |||
res = { | |||
'total': 0, | |||
# 'total': 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@@ -24,5 +24,6 @@ class PosPriceListConfig(models.Model): | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you rename into classical name.
class PosConfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed complete - because with the next changes it is not needed any more
@@ -24,5 +24,6 @@ class PosPriceListConfig(models.Model): | |||
|
|||
display_price_with_taxes = fields.Boolean( | |||
string='Price With Taxes', | |||
help="Display Prices with taxes on POS" | |||
help="Display Prices with taxes on POS", | |||
related="iface_tax_included" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be better to detete display_price_with_taxes, and use iface_tax_included in the JS code, don't you think ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
var round_pr = utils.round_precision; | ||
var round_di = utils.round_decimals; | ||
|
||
PosDB = PosDB.extend({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this changes. you moved PosDB definition from db.js to models.js ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep - because else we would get a recursive require
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should use include instead of extend.
[IMP] Show unit price when qty is not 1 Conflicts: pos_pricelist/__openerp__.py (cherry-pick commit: e9ac0d5) [IMP] Preserve manually modified price in most cases Conflicts: pos_pricelist/static/src/js/models.js (cherry-pick commit: a10bc11) Add contributors Add contributors Corrected error: TypeError: Cannot read property 'field' of undefined (and many others before it) Error occurred: TypeError: Cannot read property 'models' of undefined (in progress) Recovery db.js Corrected error: TypeError: Cannot read property 'models' of undefined Corrected error: TypeError: round_pr is not a function Corrected error: AttributeError: 'float' object has no attribute 'decimal_places' Corrected error: KeyError: 'total' Corrected error: TypeError: _amount_line_tax() got an unexpected keyword argument 'context' Recovery tooltips (in progress) Recovery tooltips: corrected compute_price Check discount values in pricelist cards and remove outdated fields Corrected calculate discount and remove outdated code Added percent_price and fixed_price method define discount Add author in __openerp__.py Few corrections Add images and license keys Corrected license value Corrected outdated parameters Correction errors display discounts related to the pricelist customers Refactoring [FIX] pos_pricelist: FP taxes with multi-company. Fixes OCA#84 The object account.fiscal.position.tax doesn't have multi-company rules, which leads to error in environments with multi-company and these records, because it finally accesses to the parent fiscal position, which on contrary has access rules, provoking an access error. This commit added the field company_id to the model, and add the corresponding access rule. Conflicts: pos_pricelist/__openerp__.py Added sort rules by applied_on field Added applied_on field [FIX] bug when find item [FIX] bug when find item [FIX] check product_tmpl_id when collect rules (db.js) and items (models.js) Add return on method for API call convenience Force order of product fields loading [FIX] fix handle where rule.base == 'pricelist' [IMP]Prevent useless supplierinfo loading [IMP]Deal with dates in pricelist items [FIX] initialize() method with ...initialize.apply(this, arguments); must have return [FIX] Moved ...initialize.apply(this, arguments); to its original place
…e_price. Removed addProduct function - not needed here anymore
3a35b8c
to
1b8b0d5
Compare
…instead of display_price_with_taxes
Is this going to be continued? We have backported v11 functionality to v10. Maybe it's better to backport that one to v9 instead of continuing with this. |
…ulcation based on standard_price. Fixed bug in simulate_price. Removed old addProduct function - not needed anymore